Don't hard code exec path in child_process.fork
authorCheng Zhao <zcbenz@gmail.com>
Tue, 14 Apr 2015 06:05:30 +0000 (14:05 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 14 Apr 2015 06:05:30 +0000 (14:05 +0800)
atom/common/node_bindings.cc
vendor/node

index 19ed7ee..01df48f 100644 (file)
@@ -15,6 +15,7 @@
 #include "base/message_loop/message_loop.h"
 #include "base/path_service.h"
 #include "content/public/browser/browser_thread.h"
+#include "content/public/common/content_paths.h"
 #include "native_mate/locker.h"
 #include "native_mate/dictionary.h"
 
@@ -157,6 +158,10 @@ node::Environment* NodeBindings::CreateEnvironment(
   mate::Dictionary process(context->GetIsolate(), env->process_object());
   process.Set("type", process_type);
   process.Set("resourcesPath", resources_path);
+  // The path to helper app.
+  base::FilePath helper_exec_path;
+  PathService::Get(content::CHILD_PROCESS_EXE, &helper_exec_path);
+  process.Set("helperExecPath", helper_exec_path);
   return env;
 }
 
index da4d745..9f7ab57 160000 (submodule)
@@ -1 +1 @@
-Subproject commit da4d745446fcc63bfc205477703533712dd01e2c
+Subproject commit 9f7ab575d78fa4c50cc5529f15646c8a37eb3258