Add process.versions["atom-shell"].

This commit is contained in:
Cheng Zhao 2013-08-08 17:26:20 +08:00
parent 6684cdd72a
commit dd05759c01

View file

@ -6,6 +6,7 @@
#include "base/debug/debugger.h" #include "base/debug/debugger.h"
#include "base/logging.h" #include "base/logging.h"
#include "common/atom_version.h"
#include "vendor/node/src/node.h" #include "vendor/node/src/node.h"
namespace atom { namespace atom {
@ -36,6 +37,9 @@ void AtomBindings::BindTo(v8::Handle<v8::Object> process) {
node::SetMethod(process, "crash", Crash); node::SetMethod(process, "crash", Crash);
node::SetMethod(process, "activateUvLoop", ActivateUVLoop); node::SetMethod(process, "activateUvLoop", ActivateUVLoop);
node::SetMethod(process, "log", Log); node::SetMethod(process, "log", Log);
process->Get(v8::String::New("versions"))->ToObject()->
Set(v8::String::New("atom-shell"), v8::String::New(ATOM_VERSION_STRING));
} }
// static // static