<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/node_messaging.h, branch crypto_set_integer_macro</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>src: name EmbededderGraph edges and use class names for nodes</title>
<updated>2018-10-04T13:32:30+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2018-09-23T21:52:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=92fa0fcdb76e2b6cb0040eede97fe3c167c31897'/>
<id>92fa0fcdb76e2b6cb0040eede97fe3c167c31897</id>
<content type='text'>
This patch:

- Refactors the `MemoryRetainer` API so that the impementer no longer
  calls `TrackThis()` that sets the size of node on the top of the
  stack, which may be hard to understand. Instead now they implements
  `SelfSize()` to provide their self sizes. Also documents
  the API in the header.
- Refactors `MemoryTracker` so it calls `MemoryInfoName()` and
  `SelfSize()` of `MemoryRetainer` to retrieve info about them, and
  separate `node_names` and `edge_names` so the edges can be properly
  named with reference names and the nodes can be named with class
  names. (Previously the nodes are named with reference names while the
  edges are all indexed and appear as array elements).
- Adds `SET_MEMORY_INFO_NAME()`, `SET_SELF_SIZE()` and
  `SET_NO_MEMORY_INFO()` convenience macros
- Fixes a few `MemoryInfo` calls in some `MemoryRetainers` to track
  their references properly.
- Refactors the heapdump tests to check both node names and edge names,
  distinguishing between wrapped JS nodes (without prefixes)
  and embedder wrappers (prefixed with `Node / `).

PR-URL: https://github.com/nodejs/node/pull/23072
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch:

- Refactors the `MemoryRetainer` API so that the impementer no longer
  calls `TrackThis()` that sets the size of node on the top of the
  stack, which may be hard to understand. Instead now they implements
  `SelfSize()` to provide their self sizes. Also documents
  the API in the header.
- Refactors `MemoryTracker` so it calls `MemoryInfoName()` and
  `SelfSize()` of `MemoryRetainer` to retrieve info about them, and
  separate `node_names` and `edge_names` so the edges can be properly
  named with reference names and the nodes can be named with class
  names. (Previously the nodes are named with reference names while the
  edges are all indexed and appear as array elements).
- Adds `SET_MEMORY_INFO_NAME()`, `SET_SELF_SIZE()` and
  `SET_NO_MEMORY_INFO()` convenience macros
- Fixes a few `MemoryInfo` calls in some `MemoryRetainers` to track
  their references properly.
- Refactors the heapdump tests to check both node names and edge names,
  distinguishing between wrapped JS nodes (without prefixes)
  and embedder wrappers (prefixed with `Node / `).

PR-URL: https://github.com/nodejs/node/pull/23072
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: add proper MemoryInfoName to wrappers</title>
<updated>2018-07-27T07:51:19+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2018-07-22T01:12:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=28a3e280eca67f906ae3b47730fe21a389b7bccb'/>
<id>28a3e280eca67f906ae3b47730fe21a389b7bccb</id>
<content type='text'>
- Use camel case names for memory retainers inherited from AsyncWrap
  instead of their provider names (which are all in upper case)
- Assign class names to wraps so that they appear in the heap snapshot
  as nodes with class names as node names. Previously some nodes are
  named with reference names, which are supposed to be edge names
  instead.

PR-URL: https://github.com/nodejs/node/pull/21939
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Use camel case names for memory retainers inherited from AsyncWrap
  instead of their provider names (which are all in upper case)
- Assign class names to wraps so that they appear in the heap snapshot
  as nodes with class names as node names. Previously some nodes are
  named with reference names, which are supposed to be edge names
  instead.

PR-URL: https://github.com/nodejs/node/pull/21939
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: enable more detailed memory tracking</title>
<updated>2018-07-13T17:53:15+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-06-10T14:40:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=57e301539bff2599974b7269a56377330c9b730e'/>
<id>57e301539bff2599974b7269a56377330c9b730e</id>
<content type='text'>
This will enable more detailed heap snapshots based on
a newer V8 API.

This commit itself is not tied to that API and could
be backported.

PR-URL: https://github.com/nodejs/node/pull/21742
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will enable more detailed heap snapshots based on
a newer V8 API.

This commit itself is not tied to that API and could
be backported.

PR-URL: https://github.com/nodejs/node/pull/21742
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>messaging: fix edge cases with transferring ports</title>
<updated>2018-07-04T02:54:03+00:00</updated>
<author>
<name>Timothy Gu</name>
<email>timothygu99@gmail.com</email>
</author>
<published>2018-06-25T03:10:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=f374d6aaf9a2a171c9cd100a4ca2d26a68f72cb8'/>
<id>f374d6aaf9a2a171c9cd100a4ca2d26a68f72cb8</id>
<content type='text'>
Currently, transferring the port on which postMessage is called causes a
segmentation fault, and transferring the target port causes a subsequent
port.onmessage setting to throw, or a deadlock if onmessage is set
before the postMessage. Fix both of these behaviors and align the
methods more closely with the normative definitions in the HTML
Standard.

Also, per spec postMessage must not throw just because the ports are
disentangled. Implement that behavior.

PR-URL: https://github.com/nodejs/node/pull/21540
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, transferring the port on which postMessage is called causes a
segmentation fault, and transferring the target port causes a subsequent
port.onmessage setting to throw, or a deadlock if onmessage is set
before the postMessage. Fix both of these behaviors and align the
methods more closely with the normative definitions in the HTML
Standard.

Also, per spec postMessage must not throw just because the ports are
disentangled. Implement that behavior.

PR-URL: https://github.com/nodejs/node/pull/21540
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: do proper error checking in `AsyncWrap::MakeCallback`</title>
<updated>2018-06-13T22:43:45+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-06-07T12:43:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=22c826f5aa3811e758686fd00a8fe15728f6fc37'/>
<id>22c826f5aa3811e758686fd00a8fe15728f6fc37</id>
<content type='text'>
At least one method on a native object is added as a getter,
namely `MessagePort.prototype.onmessage`. When a MessagePort
attempts to call this method from C++ in response to receiving
data, it will first invoke that getter and then call the function.

Since `worker.terminate()` interrupts execution, this means
that the getter may fail (without being faulty code on its own).
This means that at least one test exercising these methods in
combination has been flaky and could have crashed, because
we did not actually check that the getter returns a value
so far, resulting in dereferencing an empty `Local`.

The proper fix for this is to use the non-deprecated overload
of `Get()` and check the result like we should be doing.
Also, as a (related) fix, don’t crash if the method
is not a function but rather something else, like a getter
could provide.

Example test failure: https://ci.nodejs.org/job/node-test-commit-linux-containered/4976/nodes=ubuntu1604_sharedlibs_zlib_x64/console

    17:56:56 not ok 1955 parallel/test-worker-dns-terminate
    17:56:56   ---
    17:56:56   duration_ms: 1.237
    17:56:56   severity: crashed
    17:56:56   exitcode: -11
    17:56:56   stack: |-

PR-URL: https://github.com/nodejs/node/pull/21189
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At least one method on a native object is added as a getter,
namely `MessagePort.prototype.onmessage`. When a MessagePort
attempts to call this method from C++ in response to receiving
data, it will first invoke that getter and then call the function.

Since `worker.terminate()` interrupts execution, this means
that the getter may fail (without being faulty code on its own).
This means that at least one test exercising these methods in
combination has been flaky and could have crashed, because
we did not actually check that the getter returns a value
so far, resulting in dereferencing an empty `Local`.

The proper fix for this is to use the non-deprecated overload
of `Get()` and check the result like we should be doing.
Also, as a (related) fix, don’t crash if the method
is not a function but rather something else, like a getter
could provide.

Example test failure: https://ci.nodejs.org/job/node-test-commit-linux-containered/4976/nodes=ubuntu1604_sharedlibs_zlib_x64/console

    17:56:56 not ok 1955 parallel/test-worker-dns-terminate
    17:56:56   ---
    17:56:56   duration_ms: 1.237
    17:56:56   severity: crashed
    17:56:56   exitcode: -11
    17:56:56   stack: |-

PR-URL: https://github.com/nodejs/node/pull/21189
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: initial implementation</title>
<updated>2018-06-06T17:43:52+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2017-09-01T15:03:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=0df031acadcc6490379d72676203a980c8d60592'/>
<id>0df031acadcc6490379d72676203a980c8d60592</id>
<content type='text'>
Implement multi-threading support for most of the API.

Thanks to Stephen Belanger for reviewing this change in its
original form, to Olivia Hugger for reviewing the
documentation and some of the tests coming along with it,
and to Alexey Orlenko and Timothy Gu for reviewing other
parts of the tests.

Refs: https://github.com/ayojs/ayo/pull/110
Refs: https://github.com/ayojs/ayo/pull/114
Refs: https://github.com/ayojs/ayo/pull/117

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement multi-threading support for most of the API.

Thanks to Stephen Belanger for reviewing this change in its
original form, to Olivia Hugger for reviewing the
documentation and some of the tests coming along with it,
and to Alexey Orlenko and Timothy Gu for reviewing other
parts of the tests.

Refs: https://github.com/ayojs/ayo/pull/110
Refs: https://github.com/ayojs/ayo/pull/114
Refs: https://github.com/ayojs/ayo/pull/117

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: add `SharedArrayBuffer` sharing</title>
<updated>2018-06-06T17:43:46+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-05-13T17:39:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b0404047c1e4f7652aaf6ecf911d5850d5acf570'/>
<id>b0404047c1e4f7652aaf6ecf911d5850d5acf570</id>
<content type='text'>
Logic is added to the `MessagePort` mechanism that
attaches hidden objects to those instances when they are transferred
that track their lifetime and maintain a reference count, to make
sure that memory is freed at the appropriate times.

Thanks to Stephen Belanger for reviewing this change in its original PR.

Refs: https://github.com/ayojs/ayo/pull/106

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Logic is added to the `MessagePort` mechanism that
attaches hidden objects to those instances when they are transferred
that track their lifetime and maintain a reference count, to make
sure that memory is freed at the appropriate times.

Thanks to Stephen Belanger for reviewing this change in its original PR.

Refs: https://github.com/ayojs/ayo/pull/106

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: support MessagePort passing in messages</title>
<updated>2018-06-06T17:43:45+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2017-10-07T21:39:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=749a13b76c351d515ed489844ece575b8918d2ed'/>
<id>749a13b76c351d515ed489844ece575b8918d2ed</id>
<content type='text'>
Support passing `MessagePort` instances through other `MessagePort`s,
as expected by the `MessagePort` spec.

Thanks to Stephen Belanger for reviewing this change in its original PR.

Refs: https://github.com/ayojs/ayo/pull/106

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support passing `MessagePort` instances through other `MessagePort`s,
as expected by the `MessagePort` spec.

Thanks to Stephen Belanger for reviewing this change in its original PR.

Refs: https://github.com/ayojs/ayo/pull/106

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: implement `MessagePort` and `MessageChannel`</title>
<updated>2018-06-06T17:43:44+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2017-09-05T20:38:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e7a2367471177c96f454a18319cf8d2fb25482f9'/>
<id>e7a2367471177c96f454a18319cf8d2fb25482f9</id>
<content type='text'>
Implement `MessagePort` and `MessageChannel` along the lines of
the DOM classes of the same names. `MessagePort`s initially
support transferring only `ArrayBuffer`s.

Thanks to Stephen Belanger for reviewing this change in its
original form, to Benjamin Gruenbaum for reviewing the
added tests in their original form, and to Olivia Hugger
for reviewing the documentation in its original form.

Refs: https://github.com/ayojs/ayo/pull/98

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement `MessagePort` and `MessageChannel` along the lines of
the DOM classes of the same names. `MessagePort`s initially
support transferring only `ArrayBuffer`s.

Thanks to Stephen Belanger for reviewing this change in its
original form, to Benjamin Gruenbaum for reviewing the
added tests in their original form, and to Olivia Hugger
for reviewing the documentation in its original form.

Refs: https://github.com/ayojs/ayo/pull/98

PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Shingo Inoue &lt;leko.noor@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: John-David Dalton &lt;john.david.dalton@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</pre>
</div>
</content>
</entry>
</feed>
