Commit graph

86 commits

Author SHA1 Message Date
Mikael Finstad
67a6fbf265
docs: fixed a typo in process.defaultApp doc (#37342)
docs: improve `defaultApp`
2023-02-20 13:06:19 +01:00
Robo
da0fd286b4
feat: UtilityProcess API (#34980)
* chore: initial scaffolding

* chore: implement interface and docs

* chore: address code style review

* fix: cleanup of utility process on shutdown

* chore: simplify NodeBindings::CreateEnvironment

* chore: rename disableLibraryValidation => allowLoadingUnsignedLibraries

* chore: implement process.parentPort

* chore(posix): implement stdio pipe interface

* chore(win): implement stdio interface

* chore: reenable SetNodeOptions for utility process

* chore: add specs

* chore: fix lint

* fix: update kill API

* fix: update process.parentPort API

* fix: exit event

* docs: update exit event

* fix: tests on linux

* chore: expand on some comments

* fix: shutdown of pipe reader

Avoid logging since it is always the case that reader end of
pipe will terminate after the child process.

* fix: remove exit code check for crash spec

* fix: rm PR_SET_NO_NEW_PRIVS for unsandbox utility process

* chore: fix incorrect rebase

* fix: address review feedback

* chore: rename utility_process -> utility

* chore: update docs

* chore: cleanup c++ implemantation

* fix: leak in NodeServiceHost impl

* chore: minor cleanup

* chore: cleanup JS implementation

* chore: flip default stdio to inherit

* fix: some api improvements

* Support cwd option
* Remove path restriction for modulePath
* Rewire impl for env support

* fix: add tests for cwd and env option

* chore: alt impl for reading stdio handles

* chore: support message queuing

* chore: fix lint

* chore: new UtilityProcess => utilityProcess.fork

* fix: support for uncaught exception exits

* chore: remove process.execArgv as default

* fix: windows build

* fix: style changes

* fix: docs and style changes

* chore: update patches

* spec: disable flaky test on win32 arm CI

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2022-10-19 22:49:49 -07:00
David Sanders
fc7f38c7ce
docs: remove "marked" from process.getBlinkMemoryInfo() (#33263) 2022-03-16 11:51:56 +01:00
Milan Burda
e6b1d95a1c
docs: type names changed from wrapper to primitive (#31752) 2021-11-15 22:13:18 -06:00
Will Anderson
8c3165434a
docs: update Node global symbols example to use contextBridge (#28245)
* docs: update Node global symbols example to use contextBridge

* Trigger Build

* docs: change Node API example to show how to expose a crypto API

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* docs: Fix lint warning for crypto code sample

* docs: update node API example description to emphasize APIs instead of symbols

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-22 11:01:12 +09:00
Samuel Attard
f35fc93080
chore: rename process.contextIsolation to process.contextIsolated (#28259)
* chore: rename process.contextIsolation to process.contextIsolated

* thing
2021-03-18 14:00:19 -07:00
Milan Burda
fc7f2042ec
feat: add process.contextIsolation property (#28030) 2021-03-17 11:23:29 -07:00
Milan Burda
485fa5bea9
feat: add process.contextId used by @electron/remote (#28007) 2021-03-17 11:23:03 -07:00
Milan Burda
14c8e000cb
feat: add process.uptime() to sandboxed renderers (#26684) 2020-11-30 16:49:18 +09:00
David Sanders
abb1504ecc
docs: use asterisks for unordered lists (#26552) 2020-11-23 12:15:27 -05:00
David Sanders
43dbd1bdf8
chore: cleanup whitespace in docs (#26356) 2020-11-05 14:12:43 -08:00
Samuel Attard
0d2e967960
feat: expose electron/{process} typed modules (#22937)
* feat: expose electron/{process} typed modules

* chore: update imports for common modules

* chore: update typescript generator

* chore: remap electron/* to the internal packages
2020-04-06 17:04:09 -07:00
Shelley Vohr
af1e8a347e chore: remove unused promisify code (#21114) 2019-11-14 14:50:50 +09:00
Shelley Vohr
cdff1bde22
docs: fix process.getSystemVersion() type (#20736) 2019-10-27 09:40:41 -07:00
Samuel Attard
db3cf52add
docs: add support for readonly,deprecated and platform doc annotations (#19478) 2019-07-26 16:12:59 -07:00
Milan Burda
a1226d75ff feat: add process.getBlinkMemoryInfo() (#17762) 2019-05-30 11:50:35 +02:00
Samuel Attard
a96b6e2c96 build: move to the new docs parser (#18103)
* build: move to the new docs parser

* chore: remove the bad getTitle param doc

* build: update parser/ts gen deps + fix some docs issues highlighted by GH desktop

* chore: apply suggestions from code review

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>

* chore: update docs for accidentally removed things

* chore: update docs/api/command-line.md

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>
2019-05-06 08:29:01 -07:00
Samuel Attard
f901170a4f
docs: fix doc linter warnings (#17818) 2019-04-16 19:03:17 -04:00
Milan Burda
a82bbd010e build: strip trailing whitespace in docs (#17488) 2019-03-20 13:12:47 -07:00
Milan Burda
de1bacddd9 docs: process.getProcessMemoryInfo() returns a Promise (#16593)
* docs: process.getProcessMemoryInfo() returns a Promise
* chore: bump electron-typescript-definitions to get Promise<T> fix
2019-03-20 17:26:57 +01:00
Milan Burda
a04d9ef35b feat: add process.getSystemVersion() (#16599) 2019-02-18 12:59:48 +00:00
Samuel Attard
58a6fe13d6
feat: preloads and nodeIntegration in iframes (#16425)
* feat: add support for node / preloads in subframes

This feature has delibrately been built / implemented in such a way
that it has minimum impact on existing apps / code-paths.
Without enabling the new "nodeSupportInSubFrames" option basically none of this
new code will be hit.

The things that I believe need extra scrutiny are:

* Introduction of `event.reply` for IPC events and usage of `event.reply` instead of `event.sender.send()`
* Usage of `node::FreeEnvironment(env)` when the new option is enabled in order to avoid memory leaks.  I have tested this quite a bit and haven't managed to cause a crash but it is still feature flagged behind the "nodeSupportInSubFrames" flag to avoid potential impact.

Closes #10569
Closes #10401
Closes #11868
Closes #12505
Closes #14035

* feat: add support preloads in subframes for sandboxed renderers

* spec: add tests for new nodeSupportInSubFrames option

* spec: fix specs for .reply and ._replyInternal for internal messages

* chore: revert change to use flag instead of environment set size

* chore: clean up subframe impl

* chore: apply suggestions from code review

Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>

* chore: clean up reply usage

* chore: fix TS docs generation

* chore: cleanup after rebase

* chore: rename wrap to add in event fns
2019-01-22 11:24:46 -08:00
Milan Burda
07f8f5f95a refactor: eliminate duplicate code exposing process APIs (#15824) 2018-11-28 11:08:17 -05:00
Nitish Sakhawalkar
9890d1e251 feat: Implement process.getProcessMemoryInfo to get the process memory usage (#14847)
* feat: Implement process.getMemoryFootprint to get the process memory usage

* Add spec

* fix: must enter node env in callback

* Update function call

* Update spec

* Update API data

* update spec

* Update include

* update test for shared bytes

* Update atom/common/api/atom_bindings.cc

Co-Authored-By: nitsakh <nitsakh@icloud.com>

* Update atom/common/api/atom_bindings.cc

Co-Authored-By: nitsakh <nitsakh@icloud.com>

* Update API

* Update the callback isolate

* Update to work after app ready

* Update docs

* Update docs/api/process.md

Co-Authored-By: nitsakh <nitsakh@icloud.com>

* Update docs/api/process.md

Co-Authored-By: nitsakh <nitsakh@icloud.com>

* Fix crash
2018-11-28 17:57:53 +09:00
Shelley Vohr
0a5f8611e8
chore: add promise api runtime flag (#15841)
* chore: add promise api runtime flag

* add promisification plan document

* fix process.md typo
2018-11-26 16:00:46 -05:00
Jeremy Apthorp
0642be296d
fix: crash in sandbox on linux when getting execPath (#15701) 2018-11-15 12:59:01 -08:00
Michelle Tilley
2a8e8a0603 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`
2018-11-08 10:28:06 -04:00
Milan Burda
ce38be74df refactor: simplify process object initialization for sandboxed renderers (#14878)
Also fix `process.windowsStore`.
2018-09-30 23:24:00 +02:00
Milan Burda
e22142ef9c feat: add process.takeHeapSnapshot() / webContents.takeHeapSnapshot() (#14456) 2018-09-18 11:00:31 -07:00
Samuel Attard
14df89f214 Remove the 'getProcessMemoryInfo' API
* Underlying APIs have been removed in Chromium
  * https://chromium-review.googlesource.com/c/chromium/src/+/969089
  * https://chromium-review.googlesource.com/c/chromium/src/+/953723
  * https://bugs.chromium.org/p/chromium/issues/detail?id=819289
* https://github.com/electron/electron/projects/11#card-11509601
2018-09-11 20:21:32 +02:00
Milan Burda
fc85d02786 feat: expose missing process APIs in sandboxed renderers (#13505) 2018-08-21 11:05:45 -07:00
Husayn
19cb5bad94 feat: Add creationTime function to process (#13542)
* Add process creation time

* Making docs clear for process creation time

* Address comments for process creation time

* Add process info cc file

* fixing comments around documentation

* Update doc for return val

* Capitalize number in docs

* chore: bump electron-typescript-definitions
2018-08-10 09:03:30 -05:00
Milan Burda
db38c8b620 Fix process.execPath returning parent process path instead of the helper in sandboxed renderer (#13839) 2018-07-30 11:13:42 +10:00
Milan Burda
6ad0a22602 Add process.getHeapStatistics() (#13183) 2018-06-10 22:00:36 +10:00
Toinane
0a0d88a5dc
remove all double spaces not needed 2017-11-29 11:58:24 +01:00
Toinane
323ea2b27b
fix(docs): fix all missing dots and add some links 2017-11-29 11:38:35 +01:00
John Kleinschmidt
a4e0af2fbf Updated referenced command line flag. 2017-06-21 15:01:55 -04:00
John Kleinschmidt
671f5c20f7 Add process properties in lieu of command line options.
Resolves #9139
For certain node command line options, those options can be set via the
process object (process.noDeprecation, process.throwDeprecation,
process.traceDeprecation, and process.traceProcessWarnings) so they are
documented here.

Also, sorted properties and methods alphabetically for easier
readability.
2017-06-21 14:58:44 -04:00
Zeke Sikelianos
116403ed03 remove electron prefix 2017-05-26 15:57:39 -07:00
Charlie Hess
49f76b8bc3 Add Electron prefixes. 2017-05-26 15:56:54 -07:00
Charlie Hess
b88327e025 Type definitions for getCPUUsage / getIOCounters 2017-05-26 15:56:54 -07:00
Hari Krishna Reddy Juturu
8bc4d3f8bd GetIOCounters is not implemented on mac 2017-05-04 14:33:59 -07:00
Hari Krishna Reddy Juturu
8a5aa04756 Adding CPU and I/O metrics to process module 2017-05-04 14:33:59 -07:00
Samuel Attard
a80148aa29
Add missing property types on the process docs 2017-03-25 14:51:23 +11:00
Zeke Sikelianos
e57cb713b2 link process annotations to glossary 2016-12-21 13:47:40 -08:00
Zeke Sikelianos
468d8b7707 reference node's process object 2016-11-16 09:54:29 -08:00
Zeke Sikelianos
1da97f729e process object is available in renderer processes too 2016-11-16 09:54:19 -08:00
Zeke Sikelianos
ac68de6215 document process(es) for all APIs 2016-11-03 10:26:00 -07:00
Kevin Sawicki
65e6da2673 Add newlines before lists 2016-10-25 12:38:08 +09:00
Samuel Attard
d2a701a465 Document the return values of all methods in the docs 2016-09-25 12:59:30 +13:00