<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/node_buffer.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>src: inline `SLICE_START_END()` in node_buffer.cc</title>
<updated>2019-09-02T05:56:56+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-08-28T12:35:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=5a52bdad9ba95ef20a8af1a1f2bd72c008cbf2f1'/>
<id>5a52bdad9ba95ef20a8af1a1f2bd72c008cbf2f1</id>
<content type='text'>
This macro is only used once, so it doesn’t need to be a macro.

PR-URL: https://github.com/nodejs/node/pull/29357
Reviewed-By: Jiawen Geng &lt;technicalcute@gmail.com&gt;
Reviewed-By: Masashi Hirano &lt;shisama07@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Michael Dawson &lt;michael_dawson@ca.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This macro is only used once, so it doesn’t need to be a macro.

PR-URL: https://github.com/nodejs/node/pull/29357
Reviewed-By: Jiawen Geng &lt;technicalcute@gmail.com&gt;
Reviewed-By: Masashi Hirano &lt;shisama07@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Luigi Pinca &lt;luigipinca@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Michael Dawson &lt;michael_dawson@ca.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>buffer: consolidate encoding parsing</title>
<updated>2019-08-28T19:13:38+00:00</updated>
<author>
<name>Brian White</name>
<email>mscdex@mscdex.net</email>
</author>
<published>2019-08-20T03:25:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=bb1af6c82f495e432821c30d21ccde3efb9eb72b'/>
<id>bb1af6c82f495e432821c30d21ccde3efb9eb72b</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/29217
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/29217
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: add error codes to errors thrown in C++</title>
<updated>2019-08-09T22:58:58+00:00</updated>
<author>
<name>Yaniv Friedensohn</name>
<email>yaniv.friedensohn@gmail.com</email>
</author>
<published>2019-05-11T17:00:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a0e2c6d2843ea6e37035a949827cdcc7949026d6'/>
<id>a0e2c6d2843ea6e37035a949827cdcc7949026d6</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/27700
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/27700
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: use ArrayBufferViewContents more frequently</title>
<updated>2019-05-29T17:28:38+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-05-26T20:34:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=5026db142ab5d07c7144dfb272512d3388476a77'/>
<id>5026db142ab5d07c7144dfb272512d3388476a77</id>
<content type='text'>
Using `ArrayBufferViewContents` over
`Buffer::Data()`/`Buffer::Length()` or `SPREAD_BUFFER_ARG` has the
advantages of creating fewer individual variables to keep track off,
not being a “magic” macro that creates variables, reducing code size,
and being faster when receiving on-heap TypedArrays.

PR-URL: https://github.com/nodejs/node/pull/27920
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@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>
Using `ArrayBufferViewContents` over
`Buffer::Data()`/`Buffer::Length()` or `SPREAD_BUFFER_ARG` has the
advantages of creating fewer individual variables to keep track off,
not being a “magic” macro that creates variables, reducing code size,
and being faster when receiving on-heap TypedArrays.

PR-URL: https://github.com/nodejs/node/pull/27920
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@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: fix check for accepting Buffers into Node’s allocator</title>
<updated>2019-04-14T21:06:48+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-04-10T08:53:54+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=427fce711f864f206a52ee8883442d443a8c4d34'/>
<id>427fce711f864f206a52ee8883442d443a8c4d34</id>
<content type='text'>
This condition was incorrect. We currently take the fallback
path in default Node builds, which always works, but may come with
some overhead, whereas the intention was that we use the fast path
in this condition.

This is causing issues for embedders, because we would erroneously
try to take the fast path when they don’t provide a Node.js-style
`ArrayBufferAlloactor`, and crash as a consequence of that.

This also requires us to relax the check in the debugging ArrayBuffer
allocator a bit, because since d117e41e50667d7a36, 0-sized ArrayBuffers
may actually point to allocations of size 1. Previously, that wasn’t
caught because the fallback path circumvented our ArrayBufferAllocator.

Refs: https://github.com/nodejs/node/commit/84e02b178ad14fae0df2a514e8a39bfa50ffdc2d#r33116006

PR-URL: https://github.com/nodejs/node/pull/27174
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@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>
This condition was incorrect. We currently take the fallback
path in default Node builds, which always works, but may come with
some overhead, whereas the intention was that we use the fast path
in this condition.

This is causing issues for embedders, because we would erroneously
try to take the fast path when they don’t provide a Node.js-style
`ArrayBufferAlloactor`, and crash as a consequence of that.

This also requires us to relax the check in the debugging ArrayBuffer
allocator a bit, because since d117e41e50667d7a36, 0-sized ArrayBuffers
may actually point to allocations of size 1. Previously, that wasn’t
caught because the fallback path circumvented our ArrayBufferAllocator.

Refs: https://github.com/nodejs/node/commit/84e02b178ad14fae0df2a514e8a39bfa50ffdc2d#r33116006

PR-URL: https://github.com/nodejs/node/pull/27174
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&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>
<entry>
<title>src: inline macro DISALLOW_COPY_AND_ASSIGN</title>
<updated>2019-03-18T01:58:22+00:00</updated>
<author>
<name>gengjiawen</name>
<email>technicalcute@gmail.com</email>
</author>
<published>2019-03-13T14:56:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b215bf9dacde65f7904fe87586547b9a8ac5f950'/>
<id>b215bf9dacde65f7904fe87586547b9a8ac5f950</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/26634
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR-URL: https://github.com/nodejs/node/pull/26634
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Refael Ackermann &lt;refack@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>embedding: refactor public `ArrayBufferAllocator` API</title>
<updated>2019-03-13T09:14:14+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-03-08T15:19:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=0e3adddd0d6e5d90b5224c62ef26b561320d1cff'/>
<id>0e3adddd0d6e5d90b5224c62ef26b561320d1cff</id>
<content type='text'>
Use a RAII approach by default, and make it possible for embedders
to use the `ArrayBufferAllocator` directly as a V8
`ArrayBuffer::Allocator`, e.g. when passing to `Isolate::CreateParams`
manually.

PR-URL: https://github.com/nodejs/node/pull/26525
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a RAII approach by default, and make it possible for embedders
to use the `ArrayBufferAllocator` directly as a V8
`ArrayBuffer::Allocator`, e.g. when passing to `Isolate::CreateParams`
manually.

PR-URL: https://github.com/nodejs/node/pull/26525
Reviewed-By: Gireesh Punathil &lt;gpunathi@in.ibm.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: apply clang-tidy rule modernize-deprecated-headers</title>
<updated>2019-02-27T04:35:53+00:00</updated>
<author>
<name>gengjiawen</name>
<email>technicalcute@gmail.com</email>
</author>
<published>2019-02-17T02:53:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=8137668c531935c58347cd8e78147d3a9d3cc339'/>
<id>8137668c531935c58347cd8e78147d3a9d3cc339</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/26159
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@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>
PR-URL: https://github.com/nodejs/node/pull/26159
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
