]> khamidou — GitHub mirrors - electron.git/commitdiff
Add process.versions["atom-shell"].
authorCheng Zhao <zcbenz@gmail.com>
Thu, 8 Aug 2013 09:26:20 +0000 (17:26 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 8 Aug 2013 09:26:20 +0000 (17:26 +0800)
common/api/atom_bindings.cc

index 1f478c127de02a26b837de2b669eae47cf65f5c2..32afe3bb81fd1d772638cc316e8580f687cc7e86 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "base/debug/debugger.h"
 #include "base/logging.h"
+#include "common/atom_version.h"
 #include "vendor/node/src/node.h"
 
 namespace atom {
@@ -36,6 +37,9 @@ void AtomBindings::BindTo(v8::Handle<v8::Object> process) {
   node::SetMethod(process, "crash", Crash);
   node::SetMethod(process, "activateUvLoop", ActivateUVLoop);
   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