Skip to content

Commit 0df0f6c

Browse files
committed
doc: indent wrapped Permission Model execArgv notes
Signed-off-by: yunshingng <yunshingng25@gmail.com>
1 parent bcb04c8 commit 0df0f6c

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

‎doc/api/permissions.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,13 @@ easy to configure permissions as needed when using `npx`.
330330

331331
There are constraints you need to know before using this system:
332332

333-
* The model does not inherit to a worker thread. A default `worker_threads.Worker` (no `execArgv` option) still receives
334-
the parent process CLI flags, including `--permission` and `--allow-*` if those were passed to the parent. Setting
335-
`execArgv` explicitly, including `execArgv: []`, replaces the inherited flags. The worker then does not keep the
336-
parent's Permission Model grants unless those flags are listed again in `execArgv`. That difference is intended, not a
337-
bypass.
333+
* The model does not inherit to a worker thread. A default
334+
`worker_threads.Worker` (no `execArgv` option) still receives the parent
335+
process CLI flags, including `--permission` and `--allow-*` if those were
336+
passed to the parent. Setting `execArgv` explicitly, including
337+
`execArgv: []`, replaces the inherited flags. The worker then does not keep
338+
the parent's Permission Model grants unless those flags are listed again in
339+
`execArgv`. That difference is intended, not a bypass.
338340
* When using the Permission Model the following features will be restricted:
339341
* Native modules
340342
* Network

‎doc/api/worker_threads.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,11 +1630,13 @@ changes:
16301630
V8 options (such as `--max-old-space-size`) and options that affect the
16311631
process (such as `--title`) are not supported. If set, this is provided
16321632
as [`process.execArgv`][] inside the worker. By default, options are
1633-
inherited from the parent thread. Passing an explicit `execArgv` (including an empty array) replaces that
1634-
inheritance: the worker receives only the listed flags. Under the [Permission
1635-
Model](permissions.md#permission-model), that means an explicit `execArgv` can drop the parent's `--permission` /
1636-
`--allow-*` grants. Omit `execArgv` to keep the parent's CLI flags. This is intended. See [Permission Model
1637-
limitations](permissions.md#limitations-and-known-issues).
1633+
inherited from the parent thread.
1634+
Passing an explicit `execArgv` (including an empty array) replaces that
1635+
inheritance: the worker receives only the listed flags. Under the
1636+
[Permission Model](permissions.md#permission-model), that means an explicit
1637+
`execArgv` can drop the parent's `--permission` / `--allow-*` grants.
1638+
Omit `execArgv` to keep the parent's CLI flags. This is intended. See
1639+
[Permission Model limitations](permissions.md#limitations-and-known-issues).
16381640
* `stdin` {boolean} If this is set to `true`, then `worker.stdin`
16391641
provides a writable stream whose contents appear as `process.stdin`
16401642
inside the Worker. By default, no data is provided.
@@ -2228,8 +2230,7 @@ thread spawned will spawn another until the application crashes.
22282230

22292231
[Addons worker support]: addons.md#worker-support
22302232
[ECMAScript module loader]: esm.md#data-imports
2231-
[HTML structured clone algorithm]:
2232-
https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
2233+
[HTML structured clone algorithm]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
22332234
[LockManager]: #class-lockmanager
22342235
[Signals events]: process.md#signal-events
22352236
[Web Workers]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API

0 commit comments

Comments
 (0)