<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/src/node_http2.cc, 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: simplify alignment-handling code</title>
<updated>2020-06-19T15:34:20+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2020-06-14T22:56:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=2899588f28f4d02a61a19ecc8454ddaf14c7b6b3'/>
<id>2899588f28f4d02a61a19ecc8454ddaf14c7b6b3</id>
<content type='text'>
Use a common function to handle alignment computations in
multiple places.

PR-URL: https://github.com/nodejs/node/pull/33884
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@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 a common function to handle alignment computations in
multiple places.

PR-URL: https://github.com/nodejs/node/pull/33884
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: implement support for max settings entries</title>
<updated>2020-06-02T18:35:51+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2020-04-27T17:47:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=3948830ce6408be620b09a70bf66158623022af0'/>
<id>3948830ce6408be620b09a70bf66158623022af0</id>
<content type='text'>
Adds the maxSettings option to limit the number of settings
entries allowed per SETTINGS frame. Default 32

Fixes: https://hackerone.com/reports/446662
CVE-ID: CVE-2020-11080
PR-URL: https://github.com/nodejs-private/node-private/pull/204
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adds the maxSettings option to limit the number of settings
entries allowed per SETTINGS frame. Default 32

Fixes: https://hackerone.com/reports/446662
CVE-ID: CVE-2020-11080
PR-URL: https://github.com/nodejs-private/node-private/pull/204
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: extract AllocatedBuffer from env.h</title>
<updated>2020-05-30T23:20:00+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2020-05-07T20:31:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=56ff1ee55a57b1169dc567f0f51e58a6f2ccda6d'/>
<id>56ff1ee55a57b1169dc567f0f51e58a6f2ccda6d</id>
<content type='text'>
Cleanup up env.h by removing things that are not
specific to `Environment`.

PR-URL: https://github.com/nodejs/node/pull/33291
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleanup up env.h by removing things that are not
specific to `Environment`.

PR-URL: https://github.com/nodejs/node/pull/33291
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: David Carlier &lt;devnexen@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: remove unused using declarations</title>
<updated>2020-05-28T14:02:14+00:00</updated>
<author>
<name>Daniel Bevenius</name>
<email>daniel.bevenius@gmail.com</email>
</author>
<published>2020-05-26T06:48:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=4a20cc937f6a2b830a2752e35da7e389bbc4e006'/>
<id>4a20cc937f6a2b830a2752e35da7e389bbc4e006</id>
<content type='text'>
This commit removes the unused using declarations reported by lint-cpp.

PR-URL: https://github.com/nodejs/node/pull/33268
Refs: https://github.com/nodejs/node/issues/29226
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Beth Griggs &lt;Bethany.Griggs@uk.ibm.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit removes the unused using declarations reported by lint-cpp.

PR-URL: https://github.com/nodejs/node/pull/33268
Refs: https://github.com/nodejs/node/issues/29226
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Christian Clauss &lt;cclauss@me.com&gt;
Reviewed-By: Daniel Bevenius &lt;daniel.bevenius@gmail.com&gt;
Reviewed-By: Beth Griggs &lt;Bethany.Griggs@uk.ibm.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: retrieve binding data from the context</title>
<updated>2020-05-06T04:44:04+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2020-04-19T19:51:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=86fdaa745572a3bec4370ac7bd05d18e6bf64c01'/>
<id>86fdaa745572a3bec4370ac7bd05d18e6bf64c01</id>
<content type='text'>
Instead of passing them through the data bound to function
templates, store references to them in a list embedded inside
the context.
This makes the function templates more context-independent,
and makes it possible to embed binding data in non-main contexts.

Co-authored-by: Anna Henningsen &lt;anna@addaleax.net&gt;

PR-URL: https://github.com/nodejs/node/pull/33139
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>
Instead of passing them through the data bound to function
templates, store references to them in a list embedded inside
the context.
This makes the function templates more context-independent,
and makes it possible to embed binding data in non-main contexts.

Co-authored-by: Anna Henningsen &lt;anna@addaleax.net&gt;

PR-URL: https://github.com/nodejs/node/pull/33139
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2,doc: minor fixes</title>
<updated>2020-04-28T17:20:19+00:00</updated>
<author>
<name>Alba Mendez</name>
<email>me@alba.sh</email>
</author>
<published>2020-04-27T01:15:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=ee9280a02a4f8810a2d4fd409d08266ce95f2184'/>
<id>ee9280a02a4f8810a2d4fd409d08266ce95f2184</id>
<content type='text'>
Some small fixes on HTTP/2 and its documentation:

 - Add a note that, on server streams, it's not necessary
   to start data flow.

 - Set EOF flag if we have marked all data for sending:
   there's no need to wait until the queue is
   actually empty (and send a separate, empty DATA).

   (Note that, even with this change, a separate DATA
   frame will always be sent, because the streams
   layer waits until data has been flushed before
   dispatching EOF)

PR-URL: https://github.com/nodejs/node/pull/28044
Reviewed-By: Matteo Collina &lt;matteo.collina@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>
Some small fixes on HTTP/2 and its documentation:

 - Add a note that, on server streams, it's not necessary
   to start data flow.

 - Set EOF flag if we have marked all data for sending:
   there's no need to wait until the queue is
   actually empty (and send a separate, empty DATA).

   (Note that, even with this change, a separate DATA
   frame will always be sent, because the streams
   layer waits until data has been flushed before
   dispatching EOF)

PR-URL: https://github.com/nodejs/node/pull/28044
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: fix compiler warnings in node_http2.cc</title>
<updated>2020-04-24T18:06:58+00:00</updated>
<author>
<name>Daniel Bevenius</name>
<email>daniel.bevenius@gmail.com</email>
</author>
<published>2020-04-23T04:15:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=654c0ace7b44da722b313bae2e7cb0ae6a9341a4'/>
<id>654c0ace7b44da722b313bae2e7cb0ae6a9341a4</id>
<content type='text'>
Currently, the following compiler warnings are generated:
../src/node_http2.cc: In static member function
‘static int node::http2::Http2Session::OnStreamClose(nghttp2_session*,
    int32_t, uint32_t, void*)’:
../src/node_http2.cc:994:16: warning:
variable ‘def’ set but not used [-Wunused-but-set-variable]
  994 |   Local&lt;Value&gt; def = v8::False(env-&gt;isolate());
      |                ^~~
../src/node_http2.cc: In static member function
‘static void node::http2::Http2Session::Ping(
    const v8::FunctionCallbackInfo&lt;v8::Value&gt;&amp;)’:
../src/node_http2.cc:2755:16: warning:
unused variable ‘env’ [-Wunused-variable]
 2755 |   Environment* env = Environment::GetCurrent(args);
      |                ^~~
../src/node_http2.cc: In static member function
‘static void node::http2::Http2Session::Settings(
const v8::FunctionCallbackInfo&lt;v8::Value&gt;&amp;)’:
../src/node_http2.cc:2774:16: warning:
unused variable ‘env’ [-Wunused-variable]
 2774 |   Environment* env = Environment::GetCurrent(args);
      |                ^~~

This commit removes these unused variables.

PR-URL: https://github.com/nodejs/node/pull/33014
Reviewed-By: Zeyu Yang &lt;himself65@outlook.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Juan José Arboleda &lt;soyjuanarbol@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, the following compiler warnings are generated:
../src/node_http2.cc: In static member function
‘static int node::http2::Http2Session::OnStreamClose(nghttp2_session*,
    int32_t, uint32_t, void*)’:
../src/node_http2.cc:994:16: warning:
variable ‘def’ set but not used [-Wunused-but-set-variable]
  994 |   Local&lt;Value&gt; def = v8::False(env-&gt;isolate());
      |                ^~~
../src/node_http2.cc: In static member function
‘static void node::http2::Http2Session::Ping(
    const v8::FunctionCallbackInfo&lt;v8::Value&gt;&amp;)’:
../src/node_http2.cc:2755:16: warning:
unused variable ‘env’ [-Wunused-variable]
 2755 |   Environment* env = Environment::GetCurrent(args);
      |                ^~~
../src/node_http2.cc: In static member function
‘static void node::http2::Http2Session::Settings(
const v8::FunctionCallbackInfo&lt;v8::Value&gt;&amp;)’:
../src/node_http2.cc:2774:16: warning:
unused variable ‘env’ [-Wunused-variable]
 2774 |   Environment* env = Environment::GetCurrent(args);
      |                ^~~

This commit removes these unused variables.

PR-URL: https://github.com/nodejs/node/pull/33014
Reviewed-By: Zeyu Yang &lt;himself65@outlook.com&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Juan José Arboleda &lt;soyjuanarbol@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Sam Roberts &lt;vieuxtech@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>http2: refactor and cleanup http2</title>
<updated>2020-04-21T20:39:55+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2020-04-15T22:21:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=91ca22106c8d20dd4b09741c59c2f24f3a287277'/>
<id>91ca22106c8d20dd4b09741c59c2f24f3a287277</id>
<content type='text'>
* cleanup constants in http2 binding
  The error constants were just doing some weird things. Cleanup
  and improve maintainability.
* simplify settings to reduce duplicate code
* improve style consistency and correctness
  Use snake_case for getters and setters at c++ level,
  avoid unnecessary use of enums,
  use consistent style for exported vs. internal constants,
  avoid unnecessary memory info reporting,
  use setters/getters for flags_ for improved code readability
* make EmitStatistics function private
* un-nest Http2Settings and Http2Ping
* refactoring and cleanup of Http2Settings and Http2Ping
* avoid ** syntax for readability
  The **session and **stream syntax for getting the underlying
  nghttp2 pointers is not ideal for readability
* use const references for Http2Priority
* remove unnecessary GetStream function
* refactor Http2Scope to use BaseObjectPtr
* move utility function to anonymous namespace
* refactor and simplify Origins
* Use an AllocatedBuffer instead of MaybeStackBuffer
* Use a const reference instead of pointer
* use BaseObjectPtr for Http2Streams map
* move MemoryInfo impl to cc

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

PR-URL: https://github.com/nodejs/node/pull/32884
Reviewed-By: Matteo Collina &lt;matteo.collina@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>
* cleanup constants in http2 binding
  The error constants were just doing some weird things. Cleanup
  and improve maintainability.
* simplify settings to reduce duplicate code
* improve style consistency and correctness
  Use snake_case for getters and setters at c++ level,
  avoid unnecessary use of enums,
  use consistent style for exported vs. internal constants,
  avoid unnecessary memory info reporting,
  use setters/getters for flags_ for improved code readability
* make EmitStatistics function private
* un-nest Http2Settings and Http2Ping
* refactoring and cleanup of Http2Settings and Http2Ping
* avoid ** syntax for readability
  The **session and **stream syntax for getting the underlying
  nghttp2 pointers is not ideal for readability
* use const references for Http2Priority
* remove unnecessary GetStream function
* refactor Http2Scope to use BaseObjectPtr
* move utility function to anonymous namespace
* refactor and simplify Origins
* Use an AllocatedBuffer instead of MaybeStackBuffer
* Use a const reference instead of pointer
* use BaseObjectPtr for Http2Streams map
* move MemoryInfo impl to cc

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

PR-URL: https://github.com/nodejs/node/pull/32884
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Franziska Hinkelmann &lt;franziska.hinkelmann@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: add AliasedStruct utility</title>
<updated>2020-04-14T00:21:43+00:00</updated>
<author>
<name>James M Snell</name>
<email>jasnell@gmail.com</email>
</author>
<published>2020-04-11T02:42:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=cecb08f0c828dd5da8e4c6f8414bb1f9c778319e'/>
<id>cecb08f0c828dd5da8e4c6f8414bb1f9c778319e</id>
<content type='text'>
For http2 (and eventually QUIC) we have a struct that is backed
by a v8::BackingStore and exposed to the JavaScript side as an
ArrayBuffer and TypedArray. This is similar to AliasedBuffer
except that it is fronted by a struct on the C++ side.

```c++
struct foo {
  uint32_t ex1;
  uint32_t ex2;
};

AliasedStruct&lt;foo&gt; foo_;

foo_-&gt;ex1 = 1;
foo_-&gt;ex2 = 2;

foo_.GetArrayBuffer();
```

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

PR-URL: https://github.com/nodejs/node/pull/32778
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Gerhard Stöbich &lt;deb2001-github@yahoo.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For http2 (and eventually QUIC) we have a struct that is backed
by a v8::BackingStore and exposed to the JavaScript side as an
ArrayBuffer and TypedArray. This is similar to AliasedBuffer
except that it is fronted by a struct on the C++ side.

```c++
struct foo {
  uint32_t ex1;
  uint32_t ex2;
};

AliasedStruct&lt;foo&gt; foo_;

foo_-&gt;ex1 = 1;
foo_-&gt;ex2 = 2;

foo_.GetArrayBuffer();
```

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

PR-URL: https://github.com/nodejs/node/pull/32778
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Gerhard Stöbich &lt;deb2001-github@yahoo.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: move HTTP/2 state out of Environment</title>
<updated>2020-04-06T00:06:37+00:00</updated>
<author>
<name>Anna Henningsen</name>
<email>anna@addaleax.net</email>
</author>
<published>2019-03-05T01:16:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=f54b5b2fe4731ca491f9a7284cf2c8042966ac22'/>
<id>f54b5b2fe4731ca491f9a7284cf2c8042966ac22</id>
<content type='text'>
Moves state that is specific to HTTP/2 into the HTTP/2 implementation
as a cleanup.

PR-URL: https://github.com/nodejs/node/pull/32538
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Moves state that is specific to HTTP/2 into the HTTP/2 implementation
as a cleanup.

PR-URL: https://github.com/nodejs/node/pull/32538
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
