diff --git a/atom/renderer/atom_sandboxed_renderer_client.cc b/atom/renderer/atom_sandboxed_renderer_client.cc index fb6ec0a0ac40..08b1c340fc13 100644 --- a/atom/renderer/atom_sandboxed_renderer_client.cc +++ b/atom/renderer/atom_sandboxed_renderer_client.cc @@ -80,12 +80,6 @@ v8::Local GetBinding(v8::Isolate* isolate, return exports; } -base::FilePath::StringType GetExecPath() { - base::FilePath path; - base::PathService::Get(base::FILE_EXE, &path); - return path.value(); -} - v8::Local CreatePreloadScript(v8::Isolate* isolate, v8::Local preloadSrc) { auto script = v8::Script::Compile(preloadSrc); @@ -157,9 +151,7 @@ void AtomSandboxedRendererClient::InitializeBindings( process.SetMethod("getIOCounters", &AtomBindings::GetIOCounters); process.Set("argv", base::CommandLine::ForCurrentProcess()->argv()); - process.Set("execPath", GetExecPath()); process.SetReadOnly("pid", base::GetCurrentProcId()); - process.Set("resourcesPath", NodeBindings::GetHelperResourcesPath()); process.SetReadOnly("sandboxed", true); process.SetReadOnly("type", "renderer"); diff --git a/docs/api/process.md b/docs/api/process.md index 5b042c5783ec..c8c2560ff621 100644 --- a/docs/api/process.md +++ b/docs/api/process.md @@ -23,7 +23,6 @@ In sandboxed renderers the `process` object contains only a subset of the APIs: - `pid` - `arch` - `platform` -- `resourcesPath` - `sandboxed` - `type` - `version` diff --git a/lib/browser/rpc-server.js b/lib/browser/rpc-server.js index 2bc0af4c66b7..a9ed670add1f 100644 --- a/lib/browser/rpc-server.js +++ b/lib/browser/rpc-server.js @@ -540,7 +540,8 @@ ipcMain.on('ELECTRON_BROWSER_SANDBOX_LOAD', function (event) { platform: process.platform, env: process.env, version: process.version, - versions: process.versions + versions: process.versions, + execPath: process.helperExecPath } } }) diff --git a/spec/api-browser-window-spec.js b/spec/api-browser-window-spec.js index 9e64e89699f1..1e4bc7180d21 100644 --- a/spec/api-browser-window-spec.js +++ b/spec/api-browser-window-spec.js @@ -1830,7 +1830,6 @@ describe('BrowserWindow module', () => { assert.strictEqual(test.platform, remote.process.platform) assert.deepStrictEqual(...resolveGetters(test.env, remote.process.env)) assert.strictEqual(test.execPath, remote.process.helperExecPath) - assert.strictEqual(test.resourcesPath, remote.process.resourcesPath) assert.strictEqual(test.sandboxed, true) assert.strictEqual(test.type, 'renderer') assert.strictEqual(test.version, remote.process.version) diff --git a/spec/fixtures/module/preload-sandbox.js b/spec/fixtures/module/preload-sandbox.js index f2fe0d044de1..92cba0b3eb6b 100644 --- a/spec/fixtures/module/preload-sandbox.js +++ b/spec/fixtures/module/preload-sandbox.js @@ -14,7 +14,6 @@ pid: process.pid, arch: process.arch, platform: process.platform, - resourcesPath: process.resourcesPath, sandboxed: process.sandboxed, type: process.type, version: process.version,