@@ -23,7 +23,7 @@ a Node.js-specific environment.
23
23
24
24
The full code can be found [ in the Node.js source tree] [ embedtest.cc ] .
25
25
26
- ### Setting up per-process state
26
+ ### Setting up a per-process state
27
27
28
28
Node.js requires some per-process state management in order to run:
29
29
@@ -72,7 +72,7 @@ int main(int argc, char** argv) {
72
72
}
73
73
```
74
74
75
- ### Per -instance state
75
+ ### Setting up a per -instance state
76
76
77
77
<!-- YAML
78
78
changes:
@@ -86,11 +86,12 @@ Node.js has a concept of a “Node.js instance”, that is commonly being referr
86
86
to as `node::Environment`. Each `node::Environment` is associated with:
87
87
88
88
* 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
91
91
* 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.
94
95
95
96
In order to set up a `v8::Isolate`, an `v8::ArrayBuffer::Allocator` needs
96
97
to be provided. One possible choice is the default Node.js allocator, which
0 commit comments