Permalink
Switch branches/tags
Commits on Oct 18, 2018
  1. stream: undo internalBinding() conversion in compat mechanism

    addaleax authored and danbev committed Oct 14, 2018
    PR-URL: #23662
    Refs: #22675
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
    Reviewed-By: Weijia Wang <starkwang@126.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Commits on Oct 16, 2018
  1. zlib: refactor zlib internals

    addaleax authored and danbev committed Sep 22, 2018
    Split out things that are specific to zlib as a specific
    compression library, vs. the interface that is common to
    most C compression libraries.
    
    This should pave the way for including support for e.g.
    brotli.
    
    PR-URL: #23360
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Commits on Oct 13, 2018
  1. deps: cherry-pick b0af309 from upstream V8

    addaleax committed Oct 10, 2018
    Original commit message:
    
        [api] Remove deprecated wasm methods
    
        These methods were deprecated in 7.0, now we can remove them.
    
        R=adamk@chromium.org
    
        Bug: v8:7868
        Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
        Change-Id: I60badb378a055152bdd27aed67d11ddf74fce174
        Reviewed-on: https://chromium-review.googlesource.com/1209283
        Reviewed-by: Adam Klein <adamk@chromium.org>
        Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
        Cr-Commit-Position: refs/heads/master@{#55695}
    
    Refs: v8/v8@b0af309
    
    PR-URL: #23415
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Commits on Oct 12, 2018
  1. zlib: move `bytesRead` accessors to runtime deprecation

    addaleax committed Oct 7, 2018
    This paves way for making `bytesRead` consistent with all other
    Node.js streams that provide a property with this name.
    
    PR-URL: #23308
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
  2. zlib: move process.binding('zlib') to internalBinding

    addaleax committed Oct 7, 2018
    PR-URL: #23307
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
    Reviewed-By: Weijia Wang <starkwang@126.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  3. zlib: generate error code names in C++

    addaleax committed Oct 7, 2018
    This makes it easier to implement the lookup in a way that targets
    error codes from a specific compression library, as a way towards
    supporting multiple ones (e.g. brotli).
    
    PR-URL: #23413
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  4. test: move some gc tests back to parallel/, unmark flaky

    addaleax committed Oct 9, 2018
    These should no longer be flaky after the libuv update.
    
    Refs: #23336
    
    PR-URL: #23356
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
Commits on Oct 9, 2018
  1. zlib: simplify flushing mechanism

    addaleax committed Sep 30, 2018
    Previously, flushing on zlib streams was implemented through
    stream 'drain' handlers. This has a number of downsides; in
    particular, it is complex, and could lead to unpredictable
    behaviour, since it meant that in a sequence like
    
    ```js
    compressor.write('abc');
    compressor.flush();
    waitForMoreDataAsynchronously(() => {
      compressor.write('def');
    });
    ```
    
    it was not fully deterministic whether the flush happens after
    the second chunk is written or the first one.
    
    This commit replaces this mechanism by one that piggy-backs
    along the stream’s write queue, using a “special” `Buffer`
    instance that signals that a flush is currently due.
    
    PR-URL: #23186
    Reviewed-By: James M Snell <jasnell@gmail.com>
Commits on Oct 7, 2018
  1. zlib: use common owner symbol to access JS wrapper

    addaleax committed Oct 1, 2018
    Use the same symbol that other `AsyncWrap` instances also use
    for accessing the JS wrapper.
    
    PR-URL: #23189
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Commits on Oct 6, 2018
  1. doc: improve `stream.Writable` ctor encoding option docs

    addaleax committed Oct 3, 2018
    - Document `defaultEncoding`. This was previously undocumented.
    - Clarify `decodeStrings`. In particular, the previous description was
      talking about decoding, which matches the unfortunate option name,
      but what actually happens is usually refererred to as encoding
      a string into a binary form.
    
    PR-URL: #23246
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Commits on Oct 5, 2018
  1. deps: provide more V8 backwards compatibility

    addaleax committed Sep 29, 2018
    Add back a number deprecated APIs, using shims that
    should work well enough at least for the duration of Node 11
    and do not come with significant maintenance overhead.
    
    Refs: #23122
    
    PR-URL: #23158
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: Yang Guo <yangguo@chromium.org>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
  2. deps: revert 9136dd8088a9 from upstream V8

    addaleax committed Oct 4, 2018
    Reverting this enables us to provide slower, but longer-lasting
    replacements for the deprecated APIs.
    
    Original commit message:
    
        Put back deleted V8_DEPRECATE_SOON methods
    
        This partially reverts
        https://chromium-review.googlesource.com/c/v8/v8/+/1177861,
        which deleted many V8_DEPRECATE_SOON methods rather than moving them to
        V8_DEPRECATED first. This puts them back and marks them V8_DEPRECATED.
    
        Note V8_DEPRECATED that were deleted in the same CL stay deleted.
    
        NOTRY=true
        NOPRESUBMIT=true
        NOTREECHECKS=true
    
        Bug: v8:7786, v8:8240
        Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
        Change-Id: I00330036d957f98dab403465b25e30d8382aac22
        Reviewed-on: https://chromium-review.googlesource.com/1251422
        Commit-Queue: Dan Elphick <delphick@chromium.org>
        Reviewed-by: Yang Guo <yangguo@chromium.org>
        Reviewed-by: Michael Hablich <hablich@chromium.org>
        Cr-Commit-Position: refs/branch-heads/7.0@{#49}
        Cr-Branched-From: 6e2adae6f7f8e891cfd01f3280482b20590427a6-refs/heads/7.0.276@{#1}
        Cr-Branched-From: bc08a8624cbbea7a2d30071472bc73ad9544eadf-refs/heads/master@{#55424}
    
    Refs: v8/v8@9136dd8
    Refs: #23122
    
    PR-URL: #23158
    Reviewed-By: Yang Guo <yangguo@chromium.org>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
Commits on Oct 4, 2018
  1. src: remove long-deprecated APIs without `Isolate*` arg

    addaleax committed Sep 30, 2018
    These have been deprecated since 75adde0
    (February 2014) and most likely do not see much ecosystem usage
    to begin with.
    
    PR-URL: #23178
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
  2. test: add stdin writable regression test

    addaleax committed Sep 24, 2018
    Make sure that `process.stdin.write()`, and in particular
    ending the stream, works.
    
    PR-URL: #23053
    Reviewed-By: James M Snell <jasnell@gmail.com>
  3. process: allow reading from stdout/stderr sockets

    addaleax committed Sep 24, 2018
    Allow reading from stdio streams that are conventionally
    associated with process output, since this is only convention.
    
    This involves disabling the oddness around closing stdio
    streams. Its purpose is to prevent the file descriptors
    0 through 2 from being closed, since doing so can lead
    to information leaks when new file descriptors are being
    opened; instead, not doing anything seems like a more
    reasonable choice.
    
    Fixes: #21203
    
    PR-URL: #23053
    Reviewed-By: James M Snell <jasnell@gmail.com>
  4. tools: allow input for TTY tests

    addaleax committed Sep 24, 2018
    Since faking TTY input is not otherwise fake-able, we need
    support in the test runner for it.
    
    PR-URL: #23053
    Reviewed-By: James M Snell <jasnell@gmail.com>
  5. Revert "tty: make _read throw ERR_TTY_WRITABLE_NOT_READABLE"

    addaleax committed Sep 24, 2018
    This reverts commit 91eec00.
    
    Refs: #21654
    Refs: #21203
    
    PR-URL: #23053
    Reviewed-By: James M Snell <jasnell@gmail.com>
  6. zlib: move, rename, document internal params() cb

    addaleax authored and danbev committed Sep 30, 2018
    Give the callback a more specific name, explain what it does
    and why it is necessary, and move it to a location much closer
    to its use site.
    
    PR-URL: #23187
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Denys Otrishko <shishugi@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
  7. src: clean up zlib write code

    addaleax authored and danbev committed Sep 30, 2018
    Split the existing `Write()` method into one that takes care
    of translating the arguments from JS to C++, and a non-static
    method for the actual write operations, as well as some minor
    stylistic drive-by fixes.
    
    PR-URL: #23183
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  8. src: use default parameters for `UVException()`

    addaleax authored and danbev committed Sep 30, 2018
    PR-URL: #23176
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  9. src: deprecate `UVException()` without `Isolate*`

    addaleax authored and danbev committed Sep 30, 2018
    This method, like all other methods which use `Isolate::GetCurrent()`,
    should be avoided.
    
    This was probably overlooked in 75adde0.
    
    PR-URL: #23175
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  10. src: deprecate V8 date conversion helpers

    addaleax authored and danbev committed Sep 30, 2018
    These helpers provide no benefit over the existing V8 API,
    and at least one of them fetches the current `Isolate` through
    `Isolate::GetCurrent()` (which should be avoided).
    
    PR-URL: #23179
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
Commits on Oct 3, 2018
  1. src: remove public API for option variables

    addaleax committed Sep 24, 2018
    PR-URL: #23069
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
  2. src: use JS inheritance for `AsyncWrap`

    addaleax committed Sep 23, 2018
    For all classes descending from `AsyncWrap`, use JS inheritance
    instead of manually adding methods to the individual classes.
    
    This allows cleanup of some code around transferring handles
    over IPC.
    
    PR-URL: #23094
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
Commits on Oct 2, 2018
  1. src: fix indentation for `AsyncResource`

    addaleax committed Sep 30, 2018
    This un-breaks the linter, which currently does not seem to
    run on this part of the file.
    
    PR-URL: #23177
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Denys Otrishko <shishugi@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Commits on Sep 30, 2018
  1. doc: formalize `auto` usage in C++ style guide

    addaleax committed Sep 22, 2018
    We generally avoid using `auto` if not necessary. This
    formalizes this rules by writing them down in the C++ style guide.
    
    PR-URL: #23028
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Commits on Sep 27, 2018
  1. crypto: downgrade DEP0115 to `--pending-deprecation` only

    addaleax committed Sep 22, 2018
    Aliases are very cheap to maintain, so an unconditional runtime
    deprecation that affects existing ecosystem code is not
    a good idea. This commit turns the runtime deprecation into
    a `--pending-deprecation` one.
    
    Fixes: #23013
    
    PR-URL: #23017
    Reviewed-By: Michaël Zasso <targos@protonmail.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: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Commits on Sep 25, 2018
  1. test: remove unnecessary assertions

    addaleax committed Sep 23, 2018
    It’s not necessary to assert that the internal `hasRef()`
    method exists, since it is always called directly afterwards
    in these tests. Furthermore, the test is overly specific,
    in that it expects them on a specific position in the prototype
    chain.
    
    PR-URL: #23040
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Denys Otrishko <shishugi@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  2. worker: reduce `MessagePort` prototype to documented API

    addaleax committed Sep 23, 2018
    `MessagePort` is special because it has to be a C++ API
    that is exposed to userland. Therefore, there is a number
    of internal methods on its native prototype; this commit
    reduces this set of methods to only what is documented in
    the API.
    
    PR-URL: #23037
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>
  3. worker: hide MessagePort init function behind symbol

    addaleax committed Sep 23, 2018
    This reduces unintended exposure of internals.
    
    PR-URL: #23037
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>
  4. src: simplify `MessagePort` construction code a bit

    addaleax committed Sep 23, 2018
    Using `ASSIGN_OR_RETURN_UNWRAP` would return if the
    created `MessagePort` object had no internal fields.
    That would be a bug, so switch to a checked conversion instead.
    
    PR-URL: #23036
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  5. cli: normalize `_` → `-` when parsing options

    addaleax authored and danbev committed Sep 22, 2018
    This allows for option syntax similar to V8’s one, e.g.
    `--no_warnings` has the same effect as `--no-warnings`.
    
    PR-URL: #23020
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Richard Lau <riclau@uk.ibm.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  6. src: use RAII cleanup in node_i18n.cc

    addaleax authored and danbev committed Sep 22, 2018
    PR-URL: #23021
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  7. src: define zlib constants in node_zlib.cc

    addaleax authored and danbev committed Sep 22, 2018
    This is in order to avoid having two separate definitions
    for `node_zlib_mode`.
    
    PR-URL: #23019
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Gus Caplan <me@gus.host>
  8. src: make `ZCtx::Init()` non-static

    addaleax authored and danbev committed Sep 22, 2018
    PR-URL: #23019
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Gus Caplan <me@gus.host>