You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/en/blog/release/v20.6.0.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ This feature was contributed by Antoine du Hamel in <https://github.com/nodejs/n
53
53
54
54
#### Node.js C++ addons now have experimental support for cppgc (Oilpan), a C++ garbage collection library in V8.
55
55
56
-
Now when Node.js starts up, it makes sure that there is a `v8::CppHeap` attached to the V8 isolate. This enables users to allocate in the `v8::CppHeap` using `<cppgc/*>` headers from V8, which are now also included into the Node.js headers available to addons. Note that since Node.js only bundles the cppgc library coming from V8, [the ABI stability](https://nodejs.org/docs/guides/abi-stability#abi-stability-in-nodejs) of cppgc is currently not guaranteed in semver-minor and -patch updates, but we do not expect the ABI to break often, as it has been stable and battle-tested in Chromium for years. We may consider including cppgc into the ABI stability guarantees when it gets enough adoption internally and externally.
56
+
Now when Node.js starts up, it makes sure that there is a `v8::CppHeap` attached to the V8 isolate. This enables users to allocate in the `v8::CppHeap` using `<cppgc/*>` headers from V8, which are now also included into the Node.js headers available to addons. Note that since Node.js only bundles the cppgc library coming from V8, [the ABI stability](/docs/guides/abi-stability#abi-stability-in-nodejs) of cppgc is currently not guaranteed in semver-minor and -patch updates, but we do not expect the ABI to break often, as it has been stable and battle-tested in Chromium for years. We may consider including cppgc into the ABI stability guarantees when it gets enough adoption internally and externally.
57
57
58
58
To help addon authors create JavaScript-to-C++ references of which V8's garbage collector can be aware, a helper function [`node::SetCppgcReference(isolate, js_object, cppgc_object)`](https://github.com/nodejs/node/blob/v20.6.0/test/addons/cppgc-object/binding.cc) has been added to `node.h`. V8 may provide a native alternative in the future, which could then replace this Node.js-specific helper. In the mean time, users can use this API to avoid having to hard-code the layout of JavaScript wrapper objects. An example of how to create garbage-collected C++ objects in the unified heap and wrap it in a JavaScript object can be found in the [Node.js addon tests](https://github.com/nodejs/node/blob/v20.6.0/test/addons/cppgc-object/binding.cc).
To generate a flamegraph from this result, follow [this tutorial](https://nodejs.org/docs/guides/diagnostics-flamegraph/#create-a-flame-graph-with-system-perf-tools)
75
+
To generate a flamegraph from this result, follow [this tutorial](/docs/guides/diagnostics-flamegraph/#create-a-flame-graph-with-system-perf-tools)
76
76
from step 6.
77
77
78
78
Because `perf` output is not a Node.js specific tool, it might have issues with how JavaScript code is optimized in
79
-
Node.js. See [perf output issues](https://nodejs.org/docs/guides/diagnostics-flamegraph/#perf-output-issues) for a
79
+
Node.js. See [perf output issues](/docs/guides/diagnostics-flamegraph/#perf-output-issues) for a
If you worked with JavaScript in the browser, you know how much of the interaction of the user is handled through events: mouse clicks, keyboard button presses, reacting to mouse movements, and so on.
10
10
11
-
On the backend side, Node.js offers us the option to build a similar system using the [`events` module](https://nodejs.org/api/events/).
11
+
On the backend side, Node.js offers us the option to build a similar system using the [`events` module](https://nodejs.org/api/events.html).
12
12
13
13
This module, in particular, offers the `EventEmitter` class, which we'll use to handle our events.
14
14
@@ -67,4 +67,4 @@ The EventEmitter object also exposes several other methods to interact with even
67
67
-`removeListener()` / `off()`: remove an event listener from an event
68
68
-`removeAllListeners()`: remove all listeners for an event
69
69
70
-
You can read more about these methods in the [official documentation](https://nodejs.org/api/events/).
70
+
You can read more about these methods in the [official documentation](https://nodejs.org/api/events.html).
0 commit comments