async_hooks: use parent promise as triggerId in init hook by JiaLiPassion · Pull Request #13367 · nodejs/node

@nodejs-github-bot added async_wrap c++

Issues and PRs that require attention from people who are familiar with C++.

labels

Jun 1, 2017

AndreasMadsen

@AndreasMadsen AndreasMadsen added async_hooks

Issues and PRs related to the async hooks subsystem.

feature request

Issues that request new features to be added to Node.js.

semver-minor

PRs that contain new features and should be released in the next minor version.

and removed feature request

Issues that request new features to be added to Node.js.

labels

Jun 1, 2017

addaleax

@AndreasMadsen

AndreasMadsen

@hayes hayes mentioned this pull request

Jun 3, 2017

addaleax pushed a commit that referenced this pull request

Jun 3, 2017
async_hooks init callback will be triggered when promise newly created,
in previous version, the parent promise which pass from chrome V8
PromiseHook is ignored, so we can't tell the promise is a pure
new promise or a chained promise.

In this commit, we use the parent promise's id as triggerId to
trigger the init callback.

Fixes: #13302
PR-URL: #13367
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

jasnell pushed a commit that referenced this pull request

Jun 5, 2017
async_hooks init callback will be triggered when promise newly created,
in previous version, the parent promise which pass from chrome V8
PromiseHook is ignored, so we can't tell the promise is a pure
new promise or a chained promise.

In this commit, we use the parent promise's id as triggerId to
trigger the init callback.

Fixes: #13302
PR-URL: #13367
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

jasnell added a commit to jasnell/node that referenced this pull request

Jun 7, 2017

rvagg pushed a commit that referenced this pull request

Jun 8, 2017
* **Async Hooks**
  * When one `Promise` leads to the creation of a new `Promise`, the parent
    `Promise` will be identified as the trigger
    [[`135f4e6643`](135f4e6643)]
    [#13367](#13367).
* **Dependencies**
  * libuv has been updated to 1.12.0
    [[`968596ec77`](968596ec77)]
    [#13306](#13306).
  * npm has been updated to 5.0.3
    [[`ffa7debd7a`](ffa7debd7a)]
    [#13487](#13487).
* **File system**
  * The `fs.exists()` function now works correctly with `util.promisify()`
    [[`6e0eccd7a1`](6e0eccd7a1)]
    [#13316](#13316).
  * fs.Stats times are now also available as numbers
    [[`c756efb25a`](c756efb25a)]
    [#13173](#13173).
* **Inspector**
  * It is now possible to bind to a random port using `--inspect=0`
    [[`cc6ec2fb27`](cc6ec2fb27)]
    [#5025](#5025).
* **Zlib**
  * A regression in the Zlib module that made it impossible to properly
    subclasses `zlib.Deflate` and other Zlib classes has been fixed.
    [[`6aeb555cc4`](6aeb555cc4)]
    [#13374](#13374).

rvagg pushed a commit that referenced this pull request

Jun 8, 2017
* **Async Hooks**
  * When one `Promise` leads to the creation of a new `Promise`, the parent
    `Promise` will be identified as the trigger
    [[`135f4e6643`](135f4e6643)]
    [#13367](#13367).
* **Dependencies**
  * libuv has been updated to 1.12.0
    [[`968596ec77`](968596ec77)]
    [#13306](#13306).
  * npm has been updated to 5.0.3
    [[`ffa7debd7a`](ffa7debd7a)]
    [#13487](#13487).
* **File system**
  * The `fs.exists()` function now works correctly with `util.promisify()`
    [[`6e0eccd7a1`](6e0eccd7a1)]
    [#13316](#13316).
  * fs.Stats times are now also available as numbers
    [[`c756efb25a`](c756efb25a)]
    [#13173](#13173).
* **Inspector**
  * It is now possible to bind to a random port using `--inspect=0`
    [[`cc6ec2fb27`](cc6ec2fb27)]
    [#5025](#5025).
* **Zlib**
  * A regression in the Zlib module that made it impossible to properly
    subclasses `zlib.Deflate` and other Zlib classes has been fixed.
    [[`6aeb555cc4`](6aeb555cc4)]
    [#13374](#13374).

@gms1 gms1 mentioned this pull request

Jun 9, 2017