fix: make certain values on process
read-only (#15628)
* docs: Add 'worker' as a possible value for `process.type` * fix: make certain properties on `process` read only: * `mas` * `windowsStore` * `versions.electron` * `versions.chrome` * `type` * `pid` * `sandboxed`
This commit is contained in:
parent
4e53019b75
commit
2a8e8a0603
4 changed files with 11 additions and 12 deletions
|
@ -158,18 +158,18 @@ void AtomSandboxedRendererClient::InitializeBindings(
|
|||
|
||||
process.Set("argv", base::CommandLine::ForCurrentProcess()->argv());
|
||||
process.Set("execPath", GetExecPath());
|
||||
process.Set("pid", base::GetCurrentProcId());
|
||||
process.SetReadOnly("pid", base::GetCurrentProcId());
|
||||
process.Set("resourcesPath", NodeBindings::GetHelperResourcesPath());
|
||||
process.Set("sandboxed", true);
|
||||
process.Set("type", "renderer");
|
||||
process.SetReadOnly("sandboxed", true);
|
||||
process.SetReadOnly("type", "renderer");
|
||||
|
||||
#if defined(MAS_BUILD)
|
||||
process.Set("mas", true);
|
||||
process.SetReadOnly("mas", true);
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
if (IsRunningInDesktopBridge())
|
||||
process.Set("windowsStore", true);
|
||||
process.SetReadOnly("windowsStore", true);
|
||||
#endif
|
||||
|
||||
// Pass in CLI flags needed to setup the renderer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue