<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/string_bytes.h, branch sam-github-tsc</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: ignore GCC -Wcast-function-type for v8.h</title>
<updated>2020-04-14T08:26:42+00:00</updated>
<author>
<name>Daniel Bevenius</name>
<email>daniel.bevenius@gmail.com</email>
</author>
<published>2020-04-06T04:25:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=f21cf456bf36bd73d8cb6715c745e23efc22a29f'/>
<id>f21cf456bf36bd73d8cb6715c745e23efc22a29f</id>
<content type='text'>
Currently, the following warnings are emitted during compilation:
In file included from ../src/string_bytes.h:29,
                 from ../src/string_bytes.cc:22:
../deps/v8/include/v8.h:
In instantiation of ‘void v8::PersistentBase&lt;T&gt;::SetWeak(
    P*,typename v8::WeakCallbackInfo&lt;P&gt;::Callback, v8::WeakCallbackType)
[with P = node::BaseObject;
T = v8::Object;
typename v8::WeakCallbackInfo&lt;P&gt;::Callback =
    void (*)(const v8::WeakCallbackInfo&lt;node::BaseObject&gt;&amp;)]’:
../src/base_object-inl.h:135:42:   required from here
../deps/v8/include/v8.h:10732:16: warning:
cast between incompatible function types from
‘v8::WeakCallbackInfo&lt;node::BaseObject&gt;::Callback’ {aka
‘void (*)(const v8::WeakCallbackInfo&lt;node::BaseObject&gt;&amp;)’} to
‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&lt;void&gt;&amp;)’}
[-Wcast-function-type]
10732 |                reinterpret_cast&lt;Callback&gt;(callback), type);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And the same from test/cctest/test_aliased_buffer.cc

We have an open pull request against v8 for this:
https://chromium-review.googlesource.com/c/v8/v8/+/2080361

PR-URL: https://github.com/nodejs/node/pull/32679
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&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, the following warnings are emitted during compilation:
In file included from ../src/string_bytes.h:29,
                 from ../src/string_bytes.cc:22:
../deps/v8/include/v8.h:
In instantiation of ‘void v8::PersistentBase&lt;T&gt;::SetWeak(
    P*,typename v8::WeakCallbackInfo&lt;P&gt;::Callback, v8::WeakCallbackType)
[with P = node::BaseObject;
T = v8::Object;
typename v8::WeakCallbackInfo&lt;P&gt;::Callback =
    void (*)(const v8::WeakCallbackInfo&lt;node::BaseObject&gt;&amp;)]’:
../src/base_object-inl.h:135:42:   required from here
../deps/v8/include/v8.h:10732:16: warning:
cast between incompatible function types from
‘v8::WeakCallbackInfo&lt;node::BaseObject&gt;::Callback’ {aka
‘void (*)(const v8::WeakCallbackInfo&lt;node::BaseObject&gt;&amp;)’} to
‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&lt;void&gt;&amp;)’}
[-Wcast-function-type]
10732 |                reinterpret_cast&lt;Callback&gt;(callback), type);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And the same from test/cctest/test_aliased_buffer.cc

We have an open pull request against v8 for this:
https://chromium-review.googlesource.com/c/v8/v8/+/2080361

PR-URL: https://github.com/nodejs/node/pull/32679
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: add node_crypto_common and refactor</title>
<updated>2020-03-03T00:27:19+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2020-02-29T01:13:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=dd8183632d4bc8929371ee4676ef9bb5c95f7aaa'/>
<id>dd8183632d4bc8929371ee4676ef9bb5c95f7aaa</id>
<content type='text'>
Two things in one on this commit:

(a) For the QUIC implementation, we need to separate out various bits
    from node_crypto.cc to allow them to be reused. That's where this
    commit starts.

(b) Quite a bit of the node_crypto.cc code was just messy in terms of
    it's organization and lack of error handling and use of Local vs.
    MaybeLocal. This cleans that up a bit and hopefully makes certain
    parts a bit more manageable also.

Signed-off-by: James M Snell &lt;jasnell@gmail.com&gt;

PR-URL: https://github.com/nodejs/node/pull/32016
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Two things in one on this commit:

(a) For the QUIC implementation, we need to separate out various bits
    from node_crypto.cc to allow them to be reused. That's where this
    commit starts.

(b) Quite a bit of the node_crypto.cc code was just messy in terms of
    it's organization and lack of error handling and use of Local vs.
    MaybeLocal. This cleans that up a bit and hopefully makes certain
    parts a bit more manageable also.

Signed-off-by: James M Snell &lt;jasnell@gmail.com&gt;

PR-URL: https://github.com/nodejs/node/pull/32016
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: cleanup unused headers</title>
<updated>2019-11-28T22:21:08+00:00</updated>
<author>
<name>Alexandre Ferrando</name>
<email>alferpal@gmail.com</email>
</author>
<published>2019-11-07T19:34:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=7686b5a34f9146bb44919d1cd73214c2d86de44c'/>
<id>7686b5a34f9146bb44919d1cd73214c2d86de44c</id>
<content type='text'>
Node codebase has evolved a lot in the more than 10 years of its
existence. As more features (and code) have been added, changed,
removed, it's sometimes hard to keep track of what gets used and what
not.

This commits attempts to clean some of those potentially left-over
headers using suggestions from  include-what-you-use

Refs: https://github.com/nodejs/node/issues/27531

PR-URL: https://github.com/nodejs/node/pull/30328
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&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>
Node codebase has evolved a lot in the more than 10 years of its
existence. As more features (and code) have been added, changed,
removed, it's sometimes hard to keep track of what gets used and what
not.

This commits attempts to clean some of those potentially left-over
headers using suggestions from  include-what-you-use

Refs: https://github.com/nodejs/node/issues/27531

PR-URL: https://github.com/nodejs/node/pull/30328
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&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>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: fulfill Maybe contract in InlineDecoder</title>
<updated>2018-12-30T19:15:39+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-12-19T20:50:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b4b9e0e28c434de926593e42248b7c18b7839b12'/>
<id>b4b9e0e28c434de926593e42248b7c18b7839b12</id>
<content type='text'>
Use an empty/nothing `Maybe&lt;&gt;` to indicate a pending exception.

PR-URL: https://github.com/nodejs/node/pull/25140
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Shelley Vohr &lt;codebytere@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>
Use an empty/nothing `Maybe&lt;&gt;` to indicate a pending exception.

PR-URL: https://github.com/nodejs/node/pull/25140
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
Reviewed-By: Shelley Vohr &lt;codebytere@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: allow UTF-16 in generic StringBytes decode call</title>
<updated>2018-09-03T20:33:42+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-08-31T14:57:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=71f633a32f1f5617c1c7b60ad936342a579bff74'/>
<id>71f633a32f1f5617c1c7b60ad936342a579bff74</id>
<content type='text'>
This allows removing a number of special cases in other
parts of the code, at least one of which was incorrect
in expecting aligned input when that was not guaranteed.

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

PR-URL: https://github.com/nodejs/node/pull/22622
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows removing a number of special cases in other
parts of the code, at least one of which was incorrect
in expecting aligned input when that was not guaranteed.

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

PR-URL: https://github.com/nodejs/node/pull/22622
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: warn about odd UTF-16 decoding function signature</title>
<updated>2018-09-03T20:32:06+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2018-08-31T14:52:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=6455bea52ba262cea8d1c706ec8a2eec192ec643'/>
<id>6455bea52ba262cea8d1c706ec8a2eec192ec643</id>
<content type='text'>
Using a `uint16_t` sequence for UTF-16 processing would typically
imply that the sequence already contains the correct 16-bit
code units.

However, our API does not account for that. The previous comments
were somewhat misleading, since endianness is typically applied to
sequences of bytes, which is not something that this API works with.

PR-URL: https://github.com/nodejs/node/pull/22623
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Using a `uint16_t` sequence for UTF-16 processing would typically
imply that the sequence already contains the correct 16-bit
code units.

However, our API does not account for that. The previous comments
were somewhat misleading, since endianness is typically applied to
sequences of bytes, which is not something that this API works with.

PR-URL: https://github.com/nodejs/node/pull/22623
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: rework (mostly internal) functions to use Maybes</title>
<updated>2018-09-02T12:25:16+00:00</updated>
<author>
<name>Ujjwal Sharma</name>
<email>usharma1998@gmail.com</email>
</author>
<published>2018-08-29T13:39:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a55c57b8c48d4d09d3fb74ffddab6e87d10f2030'/>
<id>a55c57b8c48d4d09d3fb74ffddab6e87d10f2030</id>
<content type='text'>
Rework all affected functions to use Maybes, thus improving error
handling substantially in internal functions, API functions as well as
utilities.

Co-authored-by: Michaël Zasso &lt;targos@protonmail.com&gt;
PR-URL: https://github.com/nodejs/node/pull/21935
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rework all affected functions to use Maybes, thus improving error
handling substantially in internal functions, API functions as well as
utilities.

Co-authored-by: Michaël Zasso &lt;targos@protonmail.com&gt;
PR-URL: https://github.com/nodejs/node/pull/21935
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: use String::Write{OneByte,Utf8} with isolate</title>
<updated>2018-08-29T10:28:14+00:00</updated>
<author>
<name>Michaël Zasso</name>
<email>targos@protonmail.com</email>
</author>
<published>2018-08-26T08:28:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=a64fd7f320af90dd76b7d922f104e5715797f0a6'/>
<id>a64fd7f320af90dd76b7d922f104e5715797f0a6</id>
<content type='text'>
PR-URL: https://github.com/nodejs/node/pull/22531
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@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>
PR-URL: https://github.com/nodejs/node/pull/22531
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@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>src: fix fs.write() externalized string handling</title>
<updated>2018-01-23T18:17:39+00:00</updated>
<author>
<name>Ben Noordhuis</name>
<email>info@bnoordhuis.nl</email>
</author>
<published>2018-01-23T00:17:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=b2b9d11a14c85296f2435894bcc43b94c10dce07'/>
<id>b2b9d11a14c85296f2435894bcc43b94c10dce07</id>
<content type='text'>
* Respect `encoding` argument when the string is externalized.

* Copy the string when the write request can outlive the externalized
  string.

This commit removes `StringBytes::GetExternalParts()` because it is
fundamentally broken.

Fixes: https://github.com/nodejs/node/issues/18146
PR-URL: https://github.com/nodejs/node/pull/18216
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Respect `encoding` argument when the string is externalized.

* Copy the string when the write request can outlive the externalized
  string.

This commit removes `StringBytes::GetExternalParts()` because it is
fundamentally broken.

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