New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v8.4.0 proposal #14811

Merged
merged 97 commits into from Aug 15, 2017

Conversation

Projects
None yet
@addaleax
Member

addaleax commented Aug 13, 2017

2017-08-15, Version 8.4.0 (Current), @addaleax

Notable changes

  • HTTP2

    • Experimental support for the built-in http2 has been added via the
      --expose-http2 flag.
      #14239
  • Inspector

    • require() is available in the inspector console now.
      #8837
    • Multiple contexts, as created by the vm module, are supported now.
      #14465
  • N-API

    • New APIs for creating number values have been introduced.
      #14573
  • Stream

    • For Duplex streams, the high water mark option can now be set
      independently for the readable and the writable side.
      #14636
  • Util

    • util.format now supports the %o and %O specifiers for printing
      objects.
      #14558

Commits

  • [a6539ece2c] - assert: optimize code path for deepEqual Maps (Ruben Bridgewater) #14501
  • [2716b626b0] - async_hooks: CHECK that resource is not empty (Anna Henningsen) #14694
  • [b3c1c6ff7f] - benchmark: fix and extend assert benchmarks (Ruben Bridgewater) #14147
  • [139b08863e] - benchmark: Correct constructor for freelist (Gareth Ellis) #14627
  • [574cc379b9] - benchmark: remove unused parameters (nishijayaraj) #14640
  • [fef2aa7e27] - (SEMVER-MINOR) deps: add nghttp2 dependency (James M Snell) #14239
  • [2d806f4f71] - deps: cherry-pick f19b889 from V8 upstream (Alexey Kozyatinskiy) #14465
  • [dd521d0a28] - deps,tools: add missing nghttp2 license (Anna Henningsen) #14806
  • [621c03acfe] - doc: delint (Refael Ackermann) #14707
  • [230cb55574] - doc: fix header level typo (Refael Ackermann) #14707
  • [af85b6e058] - doc: fix http2 sample code for http2.md (Keita Akutsu) #14667
  • [1e7ddb200f] - doc: explain browser support of http/2 without SSL (Gil Tayar) #14670
  • [be716d00cc] - (SEMVER-MINOR) doc: include http2.md in all.md (James M Snell) #14239
  • [9e51802f53] - doc: add missing changes: metadata for util (Anna Henningsen) #14810
  • [4811fea553] - doc: add missing changes: metadata for streams (Anna Henningsen) #14810
  • [20fb69063a] - doc: fix docs style in util.md (Daijiro Wachi) #14711
  • [0de63e6888] - doc: fix docs style in intl.md (Daijiro Wachi) #14711
  • [ee2ae0f30b] - doc: expanded description of buffer.slice (Vishal Bisht) #14720
  • [9888bb1238] - doc: improve fs.read() doc text (Rich Trott) #14631
  • [d604173a66] - doc: clarify the position argument for fs.read (dcharbonnier) #14631
  • [d3b072276b] - doc: add docs for AssertionError (Mandeep Singh) #14261
  • [4e15a6b76a] - doc: fix order of AtExit callbacks in addons.md (Daniel Bevenius) #14048
  • [e07dfffad0] - doc: remove undef NDEBUG from addons.md (Daniel Bevenius) #14048
  • [c5ee34e39b] - encoding: rudimentary TextDecoder support w/o ICU (Timothy Gu) #14489
  • [e0001dc601] - (SEMVER-MINOR) http: move utcDate to internal/http.js (James M Snell) #14239
  • [1d40850338] - http2: fix [kInspect]() output for Http2Stream (Evan Lucas) #14753
  • [c5740f9111] - http2: name padding buffer fields (Anna Henningsen) #14744
  • [8a0d101adf] - http2: use per-environment buffers (Anna Henningsen) #14744
  • [92c37fe5fd] - http2: improve perf of passing headers to C++ (Anna Henningsen) #14723
  • [47bf705f75] - http2: rename some nghttp2 stream flags (Kelvin Jin) #14637
  • [723d1af5e7] - (SEMVER-MINOR) http2: fix flakiness in timeout (James M Snell) #14239
  • [6a30448bac] - (SEMVER-MINOR) http2: fix linting after rebase (James M Snell) #14239
  • [efd929e402] - (SEMVER-MINOR) http2: fix compilation error after V8 update (James M Snell) #14239
  • [f46c50b3e2] - (SEMVER-MINOR) http2: add some doc detail for invalid header chars (James M Snell) #14239
  • [b43caf92c0] - (SEMVER-MINOR) http2: fix documentation errors (James M Snell) #14239
  • [33b03b2ab2] - (SEMVER-MINOR) http2: minor cleanup (James M Snell) #14239
  • [174ab6fda0] - (SEMVER-MINOR) http2: use static allocated arrays (James M Snell) #14239
  • [9a4be4adc4] - (SEMVER-MINOR) http2: get trailers working with the compat api (James M Snell) #14239
  • [3e5b07a8fb] - (SEMVER-MINOR) http2: refactor trailers API (James M Snell) #14239
  • [26e1f8e01c] - (SEMVER-MINOR) http2: address initial pr feedback (James M Snell) #14239
  • [7824fa0b40] - (SEMVER-MINOR) http2: make writeHead behave like HTTP/1. (Matteo Collina) #14239
  • [b778838337] - (SEMVER-MINOR) http2: doc and fixes to the Compatibility API (Matteo Collina) #14239
  • [8f3bbd9b68] - (SEMVER-MINOR) http2: add range support for respondWith{File|FD} (James M Snell) #14239
  • [61696f1215] - (SEMVER-MINOR) http2: fix socketOnTimeout and a segfault (James M Snell) #14239
  • [2620769e7f] - (SEMVER-MINOR) http2: refinement and test for socketError (James M Snell) #14239
  • [cd0f4c6652] - (SEMVER-MINOR) http2: fix abort when client.destroy inside end event (James M Snell) #14239
  • [e8cc193bcc] - (SEMVER-MINOR) http2: fix documentation nits (James M Snell) #14239
  • [a49146e446] - (SEMVER-MINOR) http2: remove redundant return in test (James M Snell) #14239
  • [3eb61b00de] - (SEMVER-MINOR) http2: add tests and benchmarks (James M Snell) #14239
  • [9623ee0f99] - (SEMVER-MINOR) http2: introducing HTTP/2 (James M Snell) #14239
  • [029567a460] - inspector: support extra contexts (Eugene Ostroukhov) #14465
  • [d89f9f82b0] - (SEMVER-MINOR) inspector: allow require in Runtime.evaluate (Jan Krems) #8837
  • [ac1b81ad75] - lib: move deprecationWarned var (Daniel Bevenius) #14769
  • [8433b1ad37] - lib: use Timer.now() in readline module (Rich Trott) #14681
  • [917ace283f] - (SEMVER-MINOR) n-api: add napi_get_node_version (Anna Henningsen) #14696
  • [5e2cce59ef] - (SEMVER-MINOR) n-api: optimize number API performance (Jason Ginchereau) #14573
  • [c94f346b93] - net: use rest parameters instead of arguments (Tobias Nießen) #13472
  • [1c00875747] - repl: include folder extensions in autocomplete (Teddy Katz) #14727
  • [59d1d56da6] - src: remove unused http2_socket_buffer from env (Anna Henningsen) #14740
  • [268a1ff3f1] - src: mention that node options are space-separated (Gabriel Schulhof) #14709
  • [9237ef868e] - src: avoid creating local data variable (Daniel Bevenius) #14732
  • [f83827d64b] - src: use local isolate instead of args.GetIsolate (Daniel Bevenius) #14768
  • [d7d22ead2b] - src: add comments for cares library init refcount (Anna Henningsen) #14743
  • [b87fae927d] - src: remove duplicate loop (Anna Henningsen) #14750
  • [033773c17b] - src: add overlooked handle to cleanup (Anna Henningsen) #14749
  • [dd6444d401] - src,http2: DRY header/trailer handling code up (Anna Henningsen) #14688
  • [ef8ac7b5ac] - (SEMVER-MINOR) stream: support readable/writableHWM for Duplex (Guy Margalit) #14636
  • [6d9f94f93f] - test: cover all HTTP methods that parser supports (Oky Antoro) #14773
  • [e4854fccfc] - test: use regular expressions in throw assertions (Vincent Xue) #14318
  • [66788fc4d0] - test: increase http2 coverage (Michael Albert) #14701
  • [dbb9c370d4] - test: add crypto check to http2 tests (Daniel Bevenius) #14657
  • [97f622b99e] - (SEMVER-MINOR) test: fix flaky test-http2-client-unescaped-path on osx (James M Snell) #14239
  • [9d752d5282] - (SEMVER-MINOR) test: fix flakiness in test-http2-client-upload (James M Snell) #14239
  • [82c63a55ea] - test: add test-benchmark-arrays (Rich Trott) #14728
  • [0eab77c86f] - test: allow inspector to reopen with same port (Gibson Fahnestock) #14320
  • [9bbbf12827] - test: remove redundant using in cctest (XadillaX) #14739
  • [7eb9f6f6e4] - test: make totalLen snake case (Daniel Bevenius) #14765
  • [977e22857a] - test: make test-tls-connect checks more strict (Rich Trott) #14695
  • [a781bb4508] - Revert "test: disable MultipleEnvironmentsPerIsolate" (Anna Henningsen) #14749
  • [8ff2a5c338] - Revert "test: add DISABLED_ prefix to commented out test" (Anna Henningsen) #14749
  • [0bc3124c80] - test: properly order freeing resources in cctest (Anna Henningsen) #14749
  • [3f1bb0a551] - test: split out load-sensitive readline tests (Rich Trott) #14681
  • [5d99d7dff2] - test: add block scoping to test-readline-interface (Rich Trott) #14615
  • [58742729da] - test: set module loading error for aix (Prakash Palaniappan) #14511
  • [06ba2dae30] - test: fix conversion of microseconds in test (Nick Stanish) #14706
  • [30837b3b90] - test: improve check in test-os (Rich Trott) #14655
  • [55aba6aee7] - test: replace indexOf with includes (Miguel Angel Asencio Hurtado) #14630
  • [935d34bd6b] - test: fix test-readline-interface (Azard) #14677
  • [2ee3320f2c] - test: improve multiple timers tests (James M Snell) #14616
  • [71f2e76353] - test: use ciphers supported by shared OpenSSL (Jérémy Lal) #14566
  • [f73f659186] - test: mitigate RegEx exceeding 80 chars (Aditya Anand) #14607
  • [96147c980c] - test: read proper inspector message size (Bartosz Sosnowski) #14596
  • [e84c9d7176] - (SEMVER-MINOR) tls: add tlsSocket.disableRenegotiation() (James M Snell) #14239
  • [a0e05e884e] - tools: fix tools/addon-verify.js (Daniel Bevenius) #14048
  • [116841056a] - util: improve util.inspect performance (Ruben Bridgewater) #14492
  • [7203924fea] - (SEMVER-MINOR) util: implement %o and %O as formatting specifiers (Greg Alexander) #14558

gla5001 and others added some commits Jul 31, 2017

util: implement %o and %O as formatting specifiers
Implementing the %o and %O formatting specifiers for util.format.
Based on discussion in issue, this specifier should just call
util.inspect to format the value.

PR-URL: #14558
Fixes: #14545
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
test: read proper inspector message size
Fix a bug when messages bigger than 64kb where incorrectly parsed by
the inspector-helper.

PR-URL: #14596
Fixes: #14507
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
inspector: allow require in Runtime.evaluate
Some parts were written by Timothy Gu <timothygu99@gmail.com>.

PR-URL: #8837
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Aleksei Koziatinskii <ak239spb@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
test: mitigate RegEx exceeding 80 chars
Format commit wrapping lines containing RegEx and exceeding 80
chars.

PR-URL: #14607
Fixes: #14586
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
test: use ciphers supported by shared OpenSSL
On Debian with OpenSSL 1.1 CLI, the ciphers used in those tests were
unknown.

PR-URL: #14566
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
n-api: optimize number API performance
 - Add separate APIs for creating different kinds of numbers,
   because creating a V8 number value from an integer is faster
   than creating one from a double.
 - When getting number values, avoid getting the current context
   because the context will not actually be used and is expensive
   to obtain.
 - When creating values, don't use v8::TryCatch (NAPI_PREAMBLE),
   because these functions have no possibility of executing JS code.

Refs: #14379
PR-URL: #14573
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
test: improve multiple timers tests
PR-URL: #14616
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
stream: support readable/writableHWM for Duplex
This commits adds support for readableHighWaterMark and
writableHighWaterMark in Duplex stream, so that they can be set without
accessing the internal state.

Fixes: #14555
PR-URL: #14636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
test: fix test-readline-interface
Previous unit test delay is too short for parallel test on raspberry pi,
it will fail sometimes.  This PR use common.platformTimeout and widen
the time gap.

PR-URL: #14677
Ref: #14674
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
benchmark: remove unused parameters
Functions onOnline and onMessage in benchmark/cluster/echo.js
had unused parameters. They were removed.

PR-URL: #14640
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
test: replace indexOf with includes
Refs: #12586
PR-URL: #14630
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
test: improve check in test-os
The check for `os.networkInterfaces()` in `test-os.js` may be too
strict. It's apparently possible for a machine to be configured with
multiple IPv4 loopback interfaces. Increase specificity of filter to
check on only the object we expect.

PR-URL: #14655
Fixes: #14654
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
test: fix conversion of microseconds in test
PR-URL: #14706
Fixes: #8728
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
tools: fix tools/addon-verify.js
The current implementation of addon-verify.js is including the code
for the "Function arguments" section in test/addons/01_callbacks and
there is no directory generated or the "Function arguments section".
This continues and leads to the last section, "AtExit", code to be
excluded. There is an test/addons/07_atexit_hooks but it contains code
from the "Passing wrapped objects around" section.

This commit modifies addon-verify to associate headers with code and
then iterates over the set and generates the files as a separate step.

PR-URL: #14048
Reviewed-By: Michaël Zasso <targos@protonmail.com>
doc: remove undef NDEBUG from addons.md
When working on commit 0d95a0b
("test: remove undef NDEBUG from at-exit addons test) I searched for
usages of undef NDEBUG but did not include the doc directory (but I did
include the test directory) and missed this one.

Commit 1f02569 ("tools: fix
tools/addon-verify.js") enables the code in the "AtExit" section to be
included in the test/addons diretory and this code will again be
tested.

PR-URL: #14048
Reviewed-By: Michaël Zasso <targos@protonmail.com>
doc: fix order of AtExit callbacks in addons.md
The sanity_check AtExit callback needs to come last to verify that the
other callbacks have been completed. This was not noticed before as this
code was not been executed.

PR-URL: #14048
Reviewed-By: Michaël Zasso <targos@protonmail.com>
lib: use Timer.now() in readline module
Using Date.now() introduces problems when operating under load or
otherwise with constrained resources. Use Timer.now() to mitigate.

The problem was identified in `test-readline-interface` where under
heavy load, `\r` and `\n` were received so far apart that they were
treated as separate line endings rather than a single line ending.
Switching to `Timer.now()` prevented this from happening.

PR-URL: #14681
Refs: #14674
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
net: use rest parameters instead of arguments
In v8 6.0, rest parameters are significantly faster than other ways to
create an array of the arguments, even for small numbers.

PR-URL: #13472
Refs: #13430
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
doc: add docs for AssertionError
Fixes: #12274
PR-URL: #14261
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
test: set module loading error for aix
In test/parallel/test-module-loading-error.js, an attempt is made to
load a text file as a native executable. This results in an error
message in a platform specific manner.

AIX was not included in the list of platforms. This fix introduces
the AIX error messages.

PR-URL: #14511
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
async_hooks: CHECK that resource is not empty
This condition can be triggered through the public C++ embedder API.

PR-URL: #14694
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
doc: clarify the position argument for fs.read
What happen to the file position after a read using a position null or
integer was not clear and you can assume that the cursor of the file
descriptor is updated even if position is an integer.

PR-URL: #14631
Fixes: #8397
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
doc: improve fs.read() doc text
PR-URL: #14631
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
test: add block scoping to test-readline-interface
Use block-scoping in test-readline-interface to avoid side effects and
make tests more modular. (Some contain race conditions and will need to
be moved to the sequential directory if they can't be refactored to
avoid the race condition.)

Backport-PR-URL: #14748
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>

PR-URL: #14615
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
test: split out load-sensitive readline tests
Two test cases in `test-readline-interface` are sensitive to resource
constraints (probably due to `\r` and `\n` not arriving within the
appropriate delay to be treated as a single line ending). Move those
tests to `sequential`.

PR-URL: #14681
Fixes: #14674
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
src: add overlooked handle to cleanup
The `Environment::destroy_ids_timer_handle` should be cleaned up
by `Environment::CleanupHandles()`. Fix that by adding it to the list.

This partially fixes a cctest.

Ref: #14206
PR-URL: #14749
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
test: properly order freeing resources in cctest
The `IsolateData` instance is created before the `Environment` instance,
so free in reverse order.

Fixes: #14206
PR-URL: #14749
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Revert "test: add DISABLED_ prefix to commented out test"
This reverts commit 75bf8a9.

Ref: #14206
Ref: #14317
PR-URL: #14749
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Revert "test: disable MultipleEnvironmentsPerIsolate"
This reverts commit 95ab966.

Ref: #14206
Ref: #14246
PR-URL: #14749
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
encoding: rudimentary TextDecoder support w/o ICU
Also split up the tests.

Backport-PR-URL: #14786
Backport-Reviewed-By: Anna Henningsen <anna@addaleax.net>

PR-URL: #14489
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>

danbev and others added some commits Aug 7, 2017

test: add crypto check to http2 tests
When building --without-ssl and running the tests some of the http2 test
fail with the following error message:

internal/util.js:82
    throw new errors.Error('ERR_NO_CRYPTO');
    ^

Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto
support
    at Object.assertCrypto (internal/util.js:82:11)
    at internal/http2/core.js:5:26
    at NativeModule.compile (bootstrap_node.js:586:7)
    at NativeModule.require (bootstrap_node.js:531:18)
    at http2.js:17:5
    at NativeModule.compile (bootstrap_node.js:586:7)
    at Function.NativeModule.require (bootstrap_node.js:531:18)
    at Function.Module._load (module.js:449:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)

This commit adds hasCrypto checks and skips the tests if there is no
crypto support.

PR-URL: #14657
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
doc: explain browser support of http/2 without SSL
Since browser support HTTP/2 only using SSL, the basic example
given in the docs won't work if the client is a browser.

Added a note to documentation explaining this and how to change
the code to make browser support it.

PR-URL: #14670
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
doc: fix http2 sample code for http2.md
PR-URL: #14667
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
src,http2: DRY header/trailer handling code up
Remove duplicate code through minor refactoring.

PR-URL: #14688
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
test: increase http2 coverage
Added tests for `getPackedSettings` to check for not passing `settings`
and for `getUnpackedSettings` to check for a few cases when passing
`{ validate: true }`.

PR-URL: #14701
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
http2: improve perf of passing headers to C++
By passing a single string rather than many small ones and
a single block allocation for passing headers, save expensive
interactions with JS values and memory allocations.

PR-URL: #14723
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
src: remove unused http2_socket_buffer from env
PR-URL: #14740
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
http2: use per-environment buffers
As discussed in the review for
#14239, these buffers should
be per-Environment rather than static.

PR-URL: #14744
Reviewed-By: James M Snell <jasnell@gmail.com>
http2: name padding buffer fields
PR-URL: #14744
Reviewed-By: James M Snell <jasnell@gmail.com>
test: use regular expressions in throw assertions
Test errors thrown in addons-napi/test_constructor more specifically.

PR-URL: #14318
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
lib: move deprecationWarned var
The variable deprecationWarned currently looks a little misplaced. It is
used in emitWarning but declared after it. This commit suggest moving
the var to the beginning of the function.

PR-URL: #14769
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
test: cover all HTTP methods that parser supports
Cover all request methods that Node's HTTP parser supports in
parallel/test-http-methods.

PR-URL: #14773
Refs: #14544
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
doc: fix header level typo
PR-URL: #14707
Refs: #12756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
doc: delint
PR-URL: #14707
Refs: #12756
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
http2: fix [kInspect]() output for Http2Stream
This fixes a typo in the util.inspect output of Http2Stream. It
previously had writeableSate instead of writableState.

PR-URL: #14753
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
deps,tools: add missing nghttp2 license
Add `COPYING` from `nghttp2` and register it in
`tools/license-builder.sh`.

Also run `tools/license-builder.sh` and commit the
resulting `LICENSE` file.

Ref: https://github.com/nghttp2/nghttp2/blob/master/COPYING
PR-URL: #14806
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](#14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](#8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](#14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](#14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](#14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](#14558)

PR-URL: #14811
@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax Aug 14, 2017

Member

Updated with HTTP2 included & the inspector multi-context supported listed as a notable change.

CI: https://ci.nodejs.org/job/node-test-commit/11757/
CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/950/

Member

addaleax commented Aug 14, 2017

Updated with HTTP2 included & the inspector multi-context supported listed as a notable change.

CI: https://ci.nodejs.org/job/node-test-commit/11757/
CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/950/

@kjin kjin referenced this pull request Aug 15, 2017

Merged

[node] Add http2 type definitions #18952

5 of 7 tasks complete
@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax

addaleax Aug 15, 2017

Member

@nodejs/release This should be ready :)

Member

addaleax commented Aug 15, 2017

@nodejs/release This should be ready :)

@evanlucas

This comment has been minimized.

Show comment
Hide comment
@evanlucas

evanlucas Aug 15, 2017

Member

I'll cut if that's cool :]

Member

evanlucas commented Aug 15, 2017

I'll cut if that's cool :]

@evanlucas evanlucas merged commit 56a0577 into v8.x Aug 15, 2017

evanlucas added a commit that referenced this pull request Aug 15, 2017

evanlucas added a commit that referenced this pull request Aug 15, 2017

2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](#14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](#8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](#14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](#14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](#14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](#14558)

PR-URL: #14811
@vsemozhetbyt

This comment has been minimized.

Show comment
Hide comment
@vsemozhetbyt

vsemozhetbyt Aug 16, 2017

Member

https://nodejs.org/api/http2.html has many not rendered links now (just search ][ in a browser, skipping headings).

Member

vsemozhetbyt commented Aug 16, 2017

https://nodejs.org/api/http2.html has many not rendered links now (just search ][ in a browser, skipping headings).

MSLaguana added a commit to nodejs/node-chakracore that referenced this pull request Aug 21, 2017

2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](nodejs/node#14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](nodejs/node#8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](nodejs/node#14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](nodejs/node#14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](nodejs/node#14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](nodejs/node#14558)

PR-URL: nodejs/node#14811

@gibfahn gibfahn deleted the v8.4.0-proposal branch Sep 30, 2017

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 12, 2018

2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](nodejs#14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](nodejs#8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](nodejs#14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](nodejs#14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](nodejs#14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](nodejs#14558)

This applies parts of 1fe0741 that are
relevant to N-API.

PR-URL: nodejs#14811

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 15, 2018

2017-08-15, Version 8.4.0 (Current)
Notable changes

* **HTTP2**
  * Experimental support for the built-in `http2` has been added via the
    `--expose-http2` flag.
    [#14239](nodejs#14239)

* **Inspector**
  * `require()` is available in the inspector console now.
    [#8837](nodejs#8837)
  * Multiple contexts, as created by the `vm` module, are supported now.
    [#14465](nodejs#14465)

* **N-API**
  * New APIs for creating number values have been introduced.
    [#14573](nodejs#14573)

* **Stream**
  * For `Duplex` streams, the high water mark option can now be set
    independently for the readable and the writable side.
    [#14636](nodejs#14636)

* **Util**
  * `util.format` now supports the `%o` and `%O` specifiers for printing
    objects.
    [#14558](nodejs#14558)

This applies parts of 1fe0741 that are
relevant to N-API.

PR-URL: nodejs#14811
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment