<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/node_messaging.cc, branch Ninja.py-StringIO</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>worker: fix passing multiple SharedArrayBuffers at once</title>
<updated>2019-07-09T04:03:05+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-07-06T20:09:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=db55c3cfc14775cda810efc58bb8d7c1b7c356c4'/>
<id>db55c3cfc14775cda810efc58bb8d7c1b7c356c4</id>
<content type='text'>
V8 has a handle scope below each `GetSharedArrayBufferId()` call,
so using a `v8::Local` that outlives that handle scope to store
references to `SharedArrayBuffer`s is invalid and may cause accidental
de-duplication of passed `SharedArrayBuffer`s.

Use a persistent handle instead to address this issue.

Fixes: https://github.com/nodejs/node/issues/28559

PR-URL: https://github.com/nodejs/node/pull/28582
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
V8 has a handle scope below each `GetSharedArrayBufferId()` call,
so using a `v8::Local` that outlives that handle scope to store
references to `SharedArrayBuffer`s is invalid and may cause accidental
de-duplication of passed `SharedArrayBuffer`s.

Use a persistent handle instead to address this issue.

Fixes: https://github.com/nodejs/node/issues/28559

PR-URL: https://github.com/nodejs/node/pull/28582
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: make MessagePort constructor non-callable</title>
<updated>2019-06-13T03:56:44+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-06-02T17:42:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=0640526303bbe9c41801e2ad795f9cccb29f1fa4'/>
<id>0640526303bbe9c41801e2ad795f9cccb29f1fa4</id>
<content type='text'>
Refactor the C++ code for creating `MessagePort`s to skip calling the
constructor and instead directly instantiating the `InstanceTemplate`,
and always throw an error from the `MessagePort` constructor.

This aligns behaviour with the web, and creating single `MessagePort`s
does not make sense anyway.

PR-URL: https://github.com/nodejs/node/pull/28032
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@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>
Refactor the C++ code for creating `MessagePort`s to skip calling the
constructor and instead directly instantiating the `InstanceTemplate`,
and always throw an error from the `MessagePort` constructor.

This aligns behaviour with the web, and creating single `MessagePort`s
does not make sense anyway.

PR-URL: https://github.com/nodejs/node/pull/28032
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: add typechecking for postMessage transfer list</title>
<updated>2019-06-10T13:41:09+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-06-02T18:24:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=269c1d69c957811d7f5054a524df8f151b5c5781'/>
<id>269c1d69c957811d7f5054a524df8f151b5c5781</id>
<content type='text'>
If the transfer list argument is present, it should be an array.
This commit adds typechecking to that effect. This aligns behaviour
with browsers.

PR-URL: https://github.com/nodejs/node/pull/28033
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the transfer list argument is present, it should be an array.
This commit adds typechecking to that effect. This aligns behaviour
with browsers.

PR-URL: https://github.com/nodejs/node/pull/28033
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: use DataCloneError for unknown native objects</title>
<updated>2019-06-10T13:22:54+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-06-02T14:46:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=7bd2a3fcb407970babc88650ff030526ccf79f9f'/>
<id>7bd2a3fcb407970babc88650ff030526ccf79f9f</id>
<content type='text'>
This aligns the behaviour better with the web.

PR-URL: https://github.com/nodejs/node/pull/28025
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This aligns the behaviour better with the web.

PR-URL: https://github.com/nodejs/node/pull/28025
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Tiancheng "Timothy" Gu &lt;timothygu99@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: expose DOMException to internalBinding('message') for testing</title>
<updated>2019-06-09T17:51:30+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-06-05T15:06:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=890223dede339622e7e66e8629805f7904840870'/>
<id>890223dede339622e7e66e8629805f7904840870</id>
<content type='text'>
Instead of using a hack to get it in the test.

PR-URL: https://github.com/nodejs/node/pull/28072
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of using a hack to get it in the test.

PR-URL: https://github.com/nodejs/node/pull/28072
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove memory_tracker-inl.h from header files</title>
<updated>2019-05-23T15:51:39+00:00</updated>
<author>
<name>Sam Roberts</name>
<email>vieuxtech@gmail.com</email>
</author>
<published>2019-05-17T20:11:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=2ecef9b5f21d4f30a84d7ca80acf40ea041a8980'/>
<id>2ecef9b5f21d4f30a84d7ca80acf40ea041a8980</id>
<content type='text'>
Inline headers should only be included into the .cc files that use them.

PR-URL: https://github.com/nodejs/node/pull/27755
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
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>
Inline headers should only be included into the .cc files that use them.

PR-URL: https://github.com/nodejs/node/pull/27755
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
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>worker: add ability to unshift message from MessagePort</title>
<updated>2019-05-19T20:01:34+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-04-17T22:56:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=76f2168393d5b97aadce573415143383ccd3d78e'/>
<id>76f2168393d5b97aadce573415143383ccd3d78e</id>
<content type='text'>
In combination with Atomics, this makes it possible to implement
generic synchronous functionality, e.g. `importScript()`, in Workers
purely by communicating with other threads.

This is a continuation of https://github.com/nodejs/node/pull/26686,
where a preference for a solution was voiced that allowed reading
individual messages, rather than emitting all messages through events.

PR-URL: https://github.com/nodejs/node/pull/27294
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In combination with Atomics, this makes it possible to implement
generic synchronous functionality, e.g. `importScript()`, in Workers
purely by communicating with other threads.

This is a continuation of https://github.com/nodejs/node/pull/26686,
where a preference for a solution was voiced that allowed reading
individual messages, rather than emitting all messages through events.

PR-URL: https://github.com/nodejs/node/pull/27294
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: use special message as MessagePort close command</title>
<updated>2019-05-17T12:01:27+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-05-14T23:24:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=6019060cbb0620d685c8a106a4184475420e922b'/>
<id>6019060cbb0620d685c8a106a4184475420e922b</id>
<content type='text'>
When a `MessagePort` connected to another `MessagePort` closes, the
latter `MessagePort` will be closed as well. Until now, this is done
by testing whether the ports are still entangled after processing
messages. This leaves open a race condition window in which messages
sent just before the closure can be lost when timing is unfortunate.
(A description of the timing is in the test file.)

This can be addressed by using a special message instead, which is
the last message received by a `MessagePort`. This way, all previously
sent messages are processed first.

Fixes: https://github.com/nodejs/node/issues/22762
PR-URL: https://github.com/nodejs/node/pull/27705
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a `MessagePort` connected to another `MessagePort` closes, the
latter `MessagePort` will be closed as well. Until now, this is done
by testing whether the ports are still entangled after processing
messages. This leaves open a race condition window in which messages
sent just before the closure can be lost when timing is unfortunate.
(A description of the timing is in the test file.)

This can be addressed by using a special message instead, which is
the last message received by a `MessagePort`. This way, all previously
sent messages are processed first.

Fixes: https://github.com/nodejs/node/issues/22762
PR-URL: https://github.com/nodejs/node/pull/27705
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>worker: move `receiving_messages_` field to `MessagePort`</title>
<updated>2019-05-17T12:01:23+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-04-17T22:54:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=001526cc4ce6b3ec55fddcc927d9f610b162a657'/>
<id>001526cc4ce6b3ec55fddcc927d9f610b162a657</id>
<content type='text'>
This is a property of the native object associated with the
`MessagePort`, not something that should be set on the
conceptual `MessagePort` that may be transferred around.

PR-URL: https://github.com/nodejs/node/pull/27705
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a property of the native object associated with the
`MessagePort`, not something that should be set on the
conceptual `MessagePort` that may be transferred around.

PR-URL: https://github.com/nodejs/node/pull/27705
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove util-inl.h from header files</title>
<updated>2019-05-13T20:43:26+00:00</updated>
<author>
<name>Sam Roberts</name>
<email>vieuxtech@gmail.com</email>
</author>
<published>2019-05-09T19:52:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b6bfc193788b1838bee73d584fe089e1104b9f88'/>
<id>b6bfc193788b1838bee73d584fe089e1104b9f88</id>
<content type='text'>
Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.

PR-URL: https://github.com/nodejs/node/pull/27631
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Its intended that *-inl.h header files are only included into the src
files that call the inline methods. Explicitly include it into the files
that need it.

PR-URL: https://github.com/nodejs/node/pull/27631
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
