mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Don't hard code exec path in child_process.fork
This commit is contained in:
@@ -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
2
vendor/node
vendored
Submodule vendor/node updated: da4d745446...9f7ab575d7
Reference in New Issue
Block a user