Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5de2567

Browse filesBrowse files
gireeshpunathilRafaelGSS
authored andcommitted
doc: improve c++ embedder API doc
normalise the headers, fixup bullet points and expand `node::IsolateData` scope for clarity. PR-URL: #55597 Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4c34891 commit 5de2567
Copy full SHA for 5de2567

File tree

Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed
Open diff view settings
Collapse file

‎doc/api/embedding.md‎

Copy file name to clipboardExpand all lines: doc/api/embedding.md
+7-6Lines changed: 7 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ a Node.js-specific environment.
2323

2424
The full code can be found [in the Node.js source tree][embedtest.cc].
2525

26-
### Setting up per-process state
26+
### Setting up a per-process state
2727

2828
Node.js requires some per-process state management in order to run:
2929

@@ -72,7 +72,7 @@ int main(int argc, char** argv) {
7272
}
7373
```
7474
75-
### Per-instance state
75+
### Setting up a per-instance state
7676
7777
<!-- YAML
7878
changes:
@@ -86,11 +86,12 @@ Node.js has a concept of a “Node.js instance”, that is commonly being referr
8686
to as `node::Environment`. Each `node::Environment` is associated with:
8787
8888
* Exactly one `v8::Isolate`, i.e. one JS Engine instance,
89-
* Exactly one `uv_loop_t`, i.e. one event loop, and
90-
* A number of `v8::Context`s, but exactly one main `v8::Context`.
89+
* Exactly one `uv_loop_t`, i.e. one event loop,
90+
* A number of `v8::Context`s, but exactly one main `v8::Context`, and
9191
* One `node::IsolateData` instance that contains information that could be
92-
shared by multiple `node::Environment`s that use the same `v8::Isolate`.
93-
Currently, no testing is performed for this scenario.
92+
shared by multiple `node::Environment`s. The embedder should make sure
93+
that `node::IsolateData` is shared only among `node::Environment`s that
94+
use the same `v8::Isolate`, Node.js does not perform this check.
9495
9596
In order to set up a `v8::Isolate`, an `v8::ArrayBuffer::Allocator` needs
9697
to be provided. One possible choice is the default Node.js allocator, which

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.