<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/node_util.cc, branch try_Python3_on_macOS</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: do not crash when accessing empty WeakRefs</title>
<updated>2019-09-02T06:10:54+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-08-24T00:12:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=2cc757f0c703598c1bc5777e79c9344c946df2cc'/>
<id>2cc757f0c703598c1bc5777e79c9344c946df2cc</id>
<content type='text'>
Making `.incRef()` and `.decRef()` fail silently leads to better error
messages when trying to access the underlying value (as opposed to
crashing inside these methods).

Refs: https://github.com/nodejs/node/pull/25461#issuecomment-524481482

PR-URL: https://github.com/nodejs/node/pull/29289
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Making `.incRef()` and `.decRef()` fail silently leads to better error
messages when trying to access the underlying value (as opposed to
crashing inside these methods).

Refs: https://github.com/nodejs/node/pull/25461#issuecomment-524481482

PR-URL: https://github.com/nodejs/node/pull/29289
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>domain: use strong reference to domain while active</title>
<updated>2019-07-25T03:40:42+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-06-20T02:24:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=43e5478e2f51343b66f4d243bb4800d8e422f764'/>
<id>43e5478e2f51343b66f4d243bb4800d8e422f764</id>
<content type='text'>
When an uncaught exception is thrown inside a domain, the domain is
removed from the stack as of 43a51708589ac789ce08beaeb49d6d778dfbdc49.
This means that it might not be kept alive as an object anymore,
and may be garbage collected before the `after()` hook can run,
which tries to exit it as well.

Resolve that by making references to the domain strong while it is
active.

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

PR-URL: https://github.com/nodejs/node/pull/28313
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Vladimir de Turckheim &lt;vlad2t@hotmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an uncaught exception is thrown inside a domain, the domain is
removed from the stack as of 43a51708589ac789ce08beaeb49d6d778dfbdc49.
This means that it might not be kept alive as an object anymore,
and may be garbage collected before the `after()` hook can run,
which tries to exit it as well.

Resolve that by making references to the domain strong while it is
active.

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

PR-URL: https://github.com/nodejs/node/pull/28313
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Vladimir de Turckheim &lt;vlad2t@hotmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: refactor uncaught exception handling</title>
<updated>2019-06-19T08:16:37+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-06-15T00:07:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a33c3c6d33fa81fa59a5aa95246d7f599e6abdd3'/>
<id>a33c3c6d33fa81fa59a5aa95246d7f599e6abdd3</id>
<content type='text'>
The C++ land `node::FatalException()` is not in fact fatal anymore.
It gives the user a chance to handle the uncaught exception
globally by listening to the `uncaughtException` event. This patch
renames it to `TriggerUncaughtException` in C++ to avoid the confusion.

In addition rename the JS land handler to `onGlobalUncaughtException`
to reflect its purpose - we have to keep the alias
`process._fatalException` and use that for now since it has been
monkey-patchable in the user land.

This patch also

- Adds more comments to the global uncaught exception handling routine
- Puts a few other C++ error handling functions into the `errors`
  namespace
- Moves error-handling-related bindings to the `errors` binding.

Refs: https://github.com/nodejs/node/commit/2b252acea47af3ebeac3d7e68277f015667264cc

PR-URL: https://github.com/nodejs/node/pull/28257
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Franziska Hinkelmann &lt;franziska.hinkelmann@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The C++ land `node::FatalException()` is not in fact fatal anymore.
It gives the user a chance to handle the uncaught exception
globally by listening to the `uncaughtException` event. This patch
renames it to `TriggerUncaughtException` in C++ to avoid the confusion.

In addition rename the JS land handler to `onGlobalUncaughtException`
to reflect its purpose - we have to keep the alias
`process._fatalException` and use that for now since it has been
monkey-patchable in the user land.

This patch also

- Adds more comments to the global uncaught exception handling routine
- Puts a few other C++ error handling functions into the `errors`
  namespace
- Moves error-handling-related bindings to the `errors` binding.

Refs: https://github.com/nodejs/node/commit/2b252acea47af3ebeac3d7e68277f015667264cc

PR-URL: https://github.com/nodejs/node/pull/28257
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Franziska Hinkelmann &lt;franziska.hinkelmann@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: handle exceptions from ToDetailString()</title>
<updated>2019-06-09T20:34:42+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-06-02T13:47:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=626f24374741c4ee83c7da45542b99e67855707d'/>
<id>626f24374741c4ee83c7da45542b99e67855707d</id>
<content type='text'>
These methods may fail if execution is terminating.

PR-URL: https://github.com/nodejs/node/pull/28019
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&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>
These methods may fail if execution is terminating.

PR-URL: https://github.com/nodejs/node/pull/28019
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&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>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>
<entry>
<title>util: inspect constructor closer</title>
<updated>2019-05-04T15:45:47+00:00</updated>
<author>
<name>Ruben Bridgewater</name>
<email>ruben@bridgewater.de</email>
</author>
<published>2019-05-01T20:21:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=7910b025a26839483f4ae1d50a60d00c8d32f81b'/>
<id>7910b025a26839483f4ae1d50a60d00c8d32f81b</id>
<content type='text'>
This adds an extra check to `util.inspect` to closer inspect object
constructors in case there's not much other information about the
constructor.

PR-URL: https://github.com/nodejs/node/pull/27522
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds an extra check to `util.inspect` to closer inspect object
constructors in case there's not much other information about the
constructor.

PR-URL: https://github.com/nodejs/node/pull/27522
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: prefer v8::Global over node::Persistent</title>
<updated>2019-04-29T22:23:33+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-04-17T21:16:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=723d5c058fa180684df13bd2a83bbf3ca6201957'/>
<id>723d5c058fa180684df13bd2a83bbf3ca6201957</id>
<content type='text'>
`v8::Global` is essentially a nicer variant of `node::Persistent` that,
in addition to reset-on-destroy, also implements move semantics.

This commit makes the necessary replacements, removes
`node::Persistent` and (now-)unnecessary inclusions of the
`node_persistent.h` header, and makes some of the functions that
take Persistents as arguments more generic so that they work with all
`v8::PersistentBase` flavours.

PR-URL: https://github.com/nodejs/node/pull/27287
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Eugene Ostroukhov &lt;eostroukhov@google.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`v8::Global` is essentially a nicer variant of `node::Persistent` that,
in addition to reset-on-destroy, also implements move semantics.

This commit makes the necessary replacements, removes
`node::Persistent` and (now-)unnecessary inclusions of the
`node_persistent.h` header, and makes some of the functions that
take Persistents as arguments more generic so that they work with all
`v8::PersistentBase` flavours.

PR-URL: https://github.com/nodejs/node/pull/27287
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Eugene Ostroukhov &lt;eostroukhov@google.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: move SIGINT watchdog utils to the contextify binding</title>
<updated>2019-04-22T10:43:40+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-04-18T02:58:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=19e3e02a2db996a3df36e00df6c6b57cec516c9e'/>
<id>19e3e02a2db996a3df36e00df6c6b57cec516c9e</id>
<content type='text'>
These are used when evaluating scripts so it makes more sense
to put them in the contextify binding whose other methods are
going to be used together.

PR-URL: https://github.com/nodejs/node/pull/27290
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These are used when evaluating scripts so it makes more sense
to put them in the contextify binding whose other methods are
going to be used together.

PR-URL: https://github.com/nodejs/node/pull/27290
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: move guessHandleType in the util binding</title>
<updated>2019-04-20T05:25:41+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2019-04-18T02:46:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=8d901bb44e52077c4778261764892c959a94a6f2'/>
<id>8d901bb44e52077c4778261764892c959a94a6f2</id>
<content type='text'>
It does not make too much sense to have modules unrelated to TTY
load the TTY binding just to use this method. Put this in the
util binding instead.

PR-URL: https://github.com/nodejs/node/pull/27289
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It does not make too much sense to have modules unrelated to TTY
load the TTY binding just to use this method. Put this in the
util binding instead.

PR-URL: https://github.com/nodejs/node/pull/27289
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: replace FromJust() with Check() when possible</title>
<updated>2019-04-12T19:33:37+00:00</updated>
<author>
<name>Sam Roberts</name>
<email>vieuxtech@gmail.com</email>
</author>
<published>2019-04-09T22:21:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=060d901f87b3d87314f8540eb02f315e2952f581'/>
<id>060d901f87b3d87314f8540eb02f315e2952f581</id>
<content type='text'>
FromJust() is often used not for its return value, but for its
side-effects. In these cases, Check() exists, and is more clear as to
the intent. From its comment:

  To be used, where the actual value of the Maybe is not needed, like
  Object::Set.

See: https://github.com/nodejs/node/pull/26929/files#r269256335

PR-URL: https://github.com/nodejs/node/pull/27162
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FromJust() is often used not for its return value, but for its
side-effects. In these cases, Check() exists, and is more clear as to
the intent. From its comment:

  To be used, where the actual value of the Maybe is not needed, like
  Object::Set.

See: https://github.com/nodejs/node/pull/26929/files#r269256335

PR-URL: https://github.com/nodejs/node/pull/27162
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: Michaël Zasso &lt;targos@protonmail.com&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Yongsheng Zhang &lt;zyszys98@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
