Don't hard code exec path in child_process.fork

This commit is contained in:
Cheng Zhao 2015-04-14 14:05:30 +08:00
parent 4353c6d402
commit a72c7b38a5
2 changed files with 6 additions and 1 deletions

View 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;
}

2
vendor/node vendored

@ -1 +1 @@
Subproject commit da4d745446fcc63bfc205477703533712dd01e2c
Subproject commit 9f7ab575d78fa4c50cc5529f15646c8a37eb3258