Skip to content
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

[v9.x backport] node internals' postmortem metadata (#14901, #18530, #18653, #18576) #18550

Closed
wants to merge 47 commits into from

Commits on Feb 26, 2018

  1. net: use _final instead of on('finish')

    Shutting down the connection is what `_final` is there for.
    
    PR-URL: nodejs#18608
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    ea86656 View commit details
    Browse the repository at this point in the history
  2. src: fix deprecation warning in node_perf.cc

    Currently the following deprecation warning is produced when compiling
    node_perf.cc:
    
    ./src/node_perf.cc:91:11:
    warning: 'MakeCallback' is deprecated: Use MakeCallback(...,
          async_context) [-Wdeprecated-declarations]
        node::MakeCallback(env->isolate(),
              ^
    ../src/node.h:172:50:
    note: 'MakeCallback' has been explicitly marked deprecated here
                    NODE_EXTERN v8::Local<v8::Value> MakeCallback(
                                                     ^
    1 warning generated.
    
    This commit adds an async_context to the call and checks the maybe
    result.
    
    PR-URL: nodejs#18877
    Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
    danbev authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    1fd4e4d View commit details
    Browse the repository at this point in the history
  3. doc: remove CII badge in README

    PR-URL: nodejs#18908
    Reviewed-By: Rod Vagg <rod@vagg.org>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
    Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Gus Caplan <me@gus.host>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    silverwind authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    15c9a71 View commit details
    Browse the repository at this point in the history
  4. cluster: fix inspector port assignment

    Make sure that inspector ports in cluster are inside the valid range:
    `[1024, 65535]`.
    Fixes flaky `test-inspector-port-zero-cluster`.
    
    PR-URL: nodejs#18696
    Fixes: nodejs#18303
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    santigimeno authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    dfe0bc1 View commit details
    Browse the repository at this point in the history
  5. net: inline and simplify onSocketEnd

    PR-URL: nodejs#18607
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    9d73910 View commit details
    Browse the repository at this point in the history
  6. vm: consolidate validation

    PR-URL: nodejs#18816
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    timotew authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    ad98ff1 View commit details
    Browse the repository at this point in the history
  7. tools: fix custom eslint rule errors

    This fixes a few rules by making sure the input is actually ready
    to be checked. Otherwise those can throw TypeErrors or result in
    faulty error messages.
    
    PR-URL: nodejs#18853
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    BridgeAR authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    e29acf8 View commit details
    Browse the repository at this point in the history
  8. build, win: vcbuild improvements

    Removes extra erroor messages when Python is not installed. Removes
    "vswhere not found" message when no VS2017 installation is found.
    Adds support for DEBUG_HELPER to vcbuild.bat.
    
    Fixes: nodejs#16864
    
    PR-URL: nodejs#17015
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    bzoz authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    04f0482 View commit details
    Browse the repository at this point in the history
  9. http: allow _httpMessage to be GC'ed

    Set `socket._httpMessage` to `null` before emitting the `'connect'` or
    `'upgrade'` event.
    
    PR-URL: nodejs#18865
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    lpinca authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    e3f901c View commit details
    Browse the repository at this point in the history
  10. test: http2 compat response.write() error checks

    PR-URL: nodejs#18859
    Reviewed-By: James M Snell <jasnell@gmail.com>
    trivikr authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    2ad7cb9 View commit details
    Browse the repository at this point in the history
  11. repl: fix tab-complete warning

    When create a nest repl, will register `Runtime.executionContextCreated`
    listener to the inspector session.This patch will fix listener
    repeatedly register.
    
    PR-URL: nodejs#18881
    Fixes: nodejs#18284
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    killagu authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    f6e2ba4 View commit details
    Browse the repository at this point in the history
  12. src: fix abort when taking a heap snapshot

    Remove an erroneous CHECK that asserted the persistent object's internal
    field pointer still pointed to a valid object.  If ClearWrap() has been
    called, the field pointer equals nullptr and that is expected behavior.
    
    PR-URL: nodejs#18898
    Fixes: nodejs#18256
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Matheus Marchini <matheus@sthima.com>
    bnoordhuis authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    8773c10 View commit details
    Browse the repository at this point in the history
  13. http: remove default 'drain' listener on upgrade

    Ensure that the default `'drain'` listener is removed before the
    `'connect'` or `'upgrade'` event is emitted.
    
    PR-URL: nodejs#18866
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    lpinca authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    4bce02a View commit details
    Browse the repository at this point in the history
  14. doc: fix link in onboarding.md

    Remove link to the outdated members team
    
    PR-URL: nodejs#18878
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Matheus Marchini <matheus@sthima.com>
    justin0022 authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    b4e13b0 View commit details
    Browse the repository at this point in the history
  15. doc: update description of 'clientError' event

    Default behavior is to send a '400 Bad Request' response if the socket
    is writable.
    
    PR-URL: nodejs#18885
    Refs: nodejs#15324
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    lpinca authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    8d0cc17 View commit details
    Browse the repository at this point in the history
  16. doc: remove extraneous "for example" text

    No need to announce obvious example code as being example code. Remove
    unneeded "for example" text as one small way to try to keep the docs
    more concise..
    
    PR-URL: nodejs#18890
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Matheus Marchini <matheus@sthima.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
    Trott authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    d240009 View commit details
    Browse the repository at this point in the history
  17. url: reduce deplicated codes in autoEscapeStr

    PR-URL: nodejs#18613
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    starkwang authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    5477060 View commit details
    Browse the repository at this point in the history
  18. deps: upgrade libuv to 1.19.2

    PR-URL: nodejs#18918
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    cjihrig authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    d58dcec View commit details
    Browse the repository at this point in the history
  19. tools: ignore VS compiler output in deps/v8

    PR-URL: nodejs#18952
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    targos authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    0075f8c View commit details
    Browse the repository at this point in the history
  20. src: remove node namespace qualifiers

    This commit removes unneccessary node namespace qualifiers in node.cc
    for consistency.
    
    PR-URL: nodejs#18962
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
    Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
    danbev authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    89323da View commit details
    Browse the repository at this point in the history
  21. doc: readable.push(undefined) in non-object mode

    `readable.push()` supports `undefined` in non-object mode, but it was
    not previously documented.
    
    PR-URL: nodejs#18283
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    陈刚 authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    eb4ab48 View commit details
    Browse the repository at this point in the history
  22. doc: add process.debugPort to doc/api/process.md

    Fixes: nodejs#18639
    
    PR-URL: nodejs#18716
    Refs: nodejs#18639
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Matheus Marchini <matheus@sthima.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    flickz authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    b5ecc45 View commit details
    Browse the repository at this point in the history
  23. doc: update 2fa information in onboarding.md

    Because it is no longer possible to add someone to the nodejs GitHub
    organization if they do not have two-factor authentication enabled,
    update the text of the onboarding documentatino to reflect this.
    
    PR-URL: nodejs#18968
    Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
    Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
    Reviewed-By: Weijia Wang <starkwang@126.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Matheus Marchini <matheus@sthima.com>
    Trott authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    795f39b View commit details
    Browse the repository at this point in the history
  24. doc: mention git-node in the collaborator guide

    PR-URL: nodejs#18960
    Fixes: nodejs#18197
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
    Reviewed-By: Weijia Wang <starkwang@126.com>
    Reviewed-By: Matheus Marchini <matheus@sthima.com>
    Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
    joyeecheung authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    415e777 View commit details
    Browse the repository at this point in the history
  25. doc: remove Returns: {undefined}

    Removed * Returns: {undefined} in doc/ to prevent confusing users
    
    PR-URL: nodejs#18951
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Sho Miyamoto authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    5c727a0 View commit details
    Browse the repository at this point in the history
  26. build: make gyp user defined variables lowercase

    I mistakenly introduced user defined variables using uppercase
    characters, reading the gyp documentation they state:
    "Predefined variables. By convention, these are named with
    CAPITAL_LETTERS. Predefined variables are set automatically by GYP"
    and also "By convention, user-defined variables are named with
    lowercase_letters."
    
    This commit renames the user defined variables to lowercase to follow
    the above mentioned convention.
    
    Backport-PR-URL: nodejs#18899
    PR-URL: nodejs#16238
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    danbev authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    534de4a View commit details
    Browse the repository at this point in the history
  27. tools, test: fix prof polyfill readline

    `node --prof foo.js` may not print the full profile log file, leaving
    the last line broken (for example `tick,`. When that happens, `readline`
    will be stuck in an infinite loop. This patch fixes it.
    
    Also introduced `common.isCPPSymbolsNotMapped` to avoid duplicated code
    on tick-processor tests.
    
    Backport-PR-URL: nodejs#18901
    PR-URL: nodejs#18641
    Reviewed-By: Khaidi Chu <i@2333.moe>
    Reviewed-By: Matheus Marchini <matheus@sthima.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    killagu authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    70c9ad9 View commit details
    Browse the repository at this point in the history
  28. build: include the libuv and zlib into node

    Add libuv and zlib into node executable and shared lib. Also fix an
    issue that openssl is not fully included in node executable for macOS.
    
    Signed-off-by: Yihong Wang <yh.wang@ibm.com>
    
    Fixes: nodejs#17444
    PR-URL: nodejs#18383
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    yhwang authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    8beecb2 View commit details
    Browse the repository at this point in the history
  29. process: use more direct sync I/O for stdio

    This avoids routing writes through the full LibuvStreamWrap
    write machinery. In particular, it enables the next commit,
    because otherwise the callback passed to `_write()`
    would not be called synchronously for pipes on Windows
    (because the latter does not support `uv_try_write()`,
    even for blocking I/O).
    
    PR-URL: nodejs#18019
    Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    61436e8 View commit details
    Browse the repository at this point in the history
  30. src: remove HasWriteQueue()

    Tests are passing without it, and this otherwise makes the
    code harder to reason about because the `async` flag on the
    write request object would not be set even though the callback
    would still be pending.
    
    PR-URL: nodejs#18019
    Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    d2a752f View commit details
    Browse the repository at this point in the history
  31. src: use DoTryWrite() for not-all-Buffer writev()s too

    PR-URL: nodejs#18019
    Reviewed-By: James M Snell <jasnell@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    c8741ba View commit details
    Browse the repository at this point in the history
  32. tty: fix console printing on Windows

    This broke writing non-ASCII data to the console on Windows because
    the result would be codepage-dependent.
    
    This partially reverts 8b751f7.
    
    Fixes: nodejs#18189
    Refs: nodejs#18019
    
    PR-URL: nodejs#18214
    Fixes: nodejs#18189
    Refs: nodejs#18019
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    35b0936 View commit details
    Browse the repository at this point in the history
  33. test: stdio pipe behavior tests

    Add two regression tests for stdio over pipes.
    
    test-stdio-pipe-access tests if accessing stdio pipe that is being read
    by another process does not deadlocks Node.js. This was reported in
    nodejs#10836 and was fixed in v8.3.0.
    The deadlock would happen intermittently, so we run the test 5 times.
    
    test-stdio-pipe-redirect tests if redirecting one child process stdin to
    another process stdout does not crash Node as reported in
    nodejs#17493. It was fixed in
    nodejs#18019.
    
    PR-URL: nodejs#18614
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
    bzoz authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    a3aebea View commit details
    Browse the repository at this point in the history
  34. src: refactor stream callbacks and ownership

    Instead of setting individual callbacks on streams and tracking
    stream ownership through a boolean `consume_` flag, always have
    one specific listener object in charge of a stream, and call
    methods on that object rather than generic C-style callbacks.
    
    PR-URL: nodejs#18334
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    367241a View commit details
    Browse the repository at this point in the history
  35. src: simplify handles for libuv streams

    Instead of passing along the handle object, just set it as a
    property on the stream handle object and let the read handler
    grab it from there.
    
    PR-URL: nodejs#18334
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    6a70933 View commit details
    Browse the repository at this point in the history
  36. test: introduce SetUpTestCase/TearDownTestCase

    This commit add SetUpTestCase and TearDownTestCase functions that will
    be called once per test case. Currently we only have SetUp/TearDown
    which are called for each test.
    
    This commit moves the initialization and configuration of Node and V8 to
    be done on a per test case basis, but gives each test a new Isolate.
    
    Backport-PR-URL: nodejs#18957
    PR-URL: nodejs#18558
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    danbev authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    3e1d810 View commit details
    Browse the repository at this point in the history
  37. lib: add process to internal module wrapper

    Share `process` through the module wrapper rather than relying
    on nobody messing with `global.process`.
    
    Backport-PR-URL: nodejs#19006
    PR-URL: nodejs#17198
    Fixes: nodejs#6802
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Lance Ball <lball@redhat.com>
    Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Timothy Gu <timothygu99@gmail.com>
    Reviewed-By: Refael Ackermann <refack@gmail.com>
    addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    337d529 View commit details
    Browse the repository at this point in the history
  38. process: refactor nextTick for clarity

    Do not share unnecessary information about nextTick state
    between JS & C++, instead only track whether a nextTick
    is scheduled or not.
    
    Turn nextTickQueue into an Object instead of a class
    since multiple instances are never created.
    
    Other assorted refinements and refactoring.
    
    Backport-PR-URL: nodejs#19006
    PR-URL: nodejs#17738
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    apapirovski authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    fc2fc21 View commit details
    Browse the repository at this point in the history
  39. process: do not directly schedule _tickCallback in _fatalException

    When a process encounters a _fatalException that is caught, it should
    schedule execution of nextTicks but not in an arbitrary place of the
    next Immediates queue. Instead, add a no-op function to the queue
    that will ensure processImmediate runs, which will then ensure
    that nextTicks are processed at the end.
    
    Backport-PR-URL: nodejs#19006
    PR-URL: nodejs#17841
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    apapirovski authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    7f9b554 View commit details
    Browse the repository at this point in the history
  40. timers: make setImmediate() immune to tampering

    Make setImmediate() immune to `process` global tampering by removing
    the dependency on the `process._immediateCallback` property.
    
    Backport-PR-URL: nodejs#19006
    PR-URL: nodejs#17736
    Fixes: nodejs#17681
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
    Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    bnoordhuis authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    839a3f7 View commit details
    Browse the repository at this point in the history
  41. src: use AliasedBuffer for TickInfo

    Backport-PR-URL: nodejs#19006
    PR-URL: nodejs#17881
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Khaidi Chu <i@2333.moe>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    apapirovski authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    d82efdb View commit details
    Browse the repository at this point in the history
  42. timers: refactor setImmediate error handling

    If an error is encountered during the processing of Immediates, schedule
    the remaining queue to finish after all error handling code runs (if the
    process is still alive to do so). The new changes make the Immediates
    error handling behaviour entirely deterministic and predictable, as the
    full queue will be flushed on each Immediates cycle, regardless of
    whether an error is encountered or not.
    
    Currently this processing is scheduled for nextTick which can yield
    unpredictable results as the nextTick might happen as early as close
    callbacks phase or as late as after the next event loop turns Immediates
    all fully processed. The latter can result in two full cycles of
    Immediates processing during one even loop turn.
    
    The current implementation also doesn't differentiate between Immediates
    scheduled for the current queue run or the next one, so Immediates that
    were scheduled for the next turn of the event loop, will process
    alongside the ones that were scheduled for the current turn.
    
    Backport-PR-URL: nodejs#19006
    PR-URL: nodejs#17879
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    apapirovski authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    d2475cc View commit details
    Browse the repository at this point in the history
  43. timers: allow Immediates to be unrefed

    Refactor Immediates handling to allow for them to be unrefed, similar
    to setTimeout, but without extra handles.
    
    Document the new `immediate.ref()` and `immediate.unref()` methods.
    
    Add SetImmediateUnref on the C++ side.
    
    Backport-PR-URL: nodejs#19006
    PR-URL: nodejs#18139
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    apapirovski authored and addaleax committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    2177138 View commit details
    Browse the repository at this point in the history
  44. src, test: node internals' postmortem metadata

    Before these changes, only V8 added postmortem metadata to Node's
    binary, limiting the possibilities for debugger's developers to add some
    features that rely on investigating Node's internal structures.
    
    These changes are first steps towards empowering debug tools to
    navigate Node's internal structures. One example of what can be
    achieved with this is shown at nodejs/llnode#122 (a command which prints
    information about handles and requests on the queue for a core dump
    file). Node postmortem metadata are prefixed with nodedbg_.
    
    This also adds tests to validate if all postmortem metadata are
    calculated correctly, plus some documentation on what is postmortem
    metadata and a few care to be taken to avoid breaking it.
    
    Ref: nodejs/llnode#122
    Ref: nodejs/post-mortem#46
    
    PR-URL: nodejs#14901
    Refs: nodejs/post-mortem#46
    Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Matheus Marchini authored and Matheus Marchini committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    b04d42d View commit details
    Browse the repository at this point in the history
  45. test: fix cctest -Wunused-variable warning

    PR-URL: nodejs#18530
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
    bnoordhuis authored and Matheus Marchini committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    7d12ef6 View commit details
    Browse the repository at this point in the history
  46. src: do not redefine private for GenDebugSymbols

    Redefining private breaks any private inheritance in the
    included files. We can simply declare GenDebugSymbols()
    as friends in related classes to gain the access that we need.
    
    PR-URL: nodejs#18653
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    joyeecheung authored and Matheus Marchini committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    d26e658 View commit details
    Browse the repository at this point in the history
  47. build: add node_lib_target_name to cctest deps

    Currently the cctest target depend on the node_core_target_name
    target. But it is the node_lib_target_name target that compiles the
    sources now which means that if a source file in src is updated the
    cctest executable will not be re-linked against it, but will remain
    unchanged. The code will still be compiled, just not linked which
    means that if you are debugging you'll not see the changes and also a
    warning will be displayed about this issue.
    
    This commit changes the cctest target to depend on node_lib_target_name.
    
    PR-URL: nodejs#18576
    Reviewed-By: Matheus Marchini <matheus@sthima.com>
    Reviewed-By: Yihong Wang <yh.wang@ibm.com>
    Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    danbev authored and Matheus Marchini committed Feb 26, 2018
    Configuration menu
    Copy the full SHA
    686a66d View commit details
    Browse the repository at this point in the history