GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: cherry-pick Swallowed Rejection Hook from V8 by targos · Pull Request #21838 · nodejs/node

Conversation

@targos

@targos targos commented Jul 16, 2018

Copy link
Copy Markdown
Member

Cherry-picks two commits:

  • v8/v8@2075910
  • v8/v8@907d7bc

Refs: nodejs/promises-debugging#8

Being an API change, they are not eligible for upstream back-merge.

/cc @nodejs/v8-update @MayaLekova @nodejs/promises-debugging

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss and benjamingr reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@nodejs-github-bot

This comment has been minimized.

Sign in to view
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. v8 engine Issues and PRs related to the V8 dependency. labels Jul 16, 2018
@targos

targos commented Jul 16, 2018

Copy link
Copy Markdown
Member Author

I could cherry-pick the commits without a conflict but got a compilation error:

In file included from ../deps/v8/src/debug/debug.h:19,
                 from ../deps/v8/src/runtime/runtime-promise.cc:10:
../deps/v8/src/frames.h: In member function ‘void v8::internal::InnerPointerToCodeCache::Flush()’:
../deps/v8/src/frames.h:47:41: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct v8::internal::InnerPointerToCodeCache::InnerPointerToCodeCacheEntry’; use assignment or value-initialization instead [-Wclass-memaccess]
     memset(&cache_[0], 0, sizeof(cache_));
                                         ^
../deps/v8/src/frames.h:36:10: note: ‘struct v8::internal::InnerPointerToCodeCache::InnerPointerToCodeCacheEntry’ declared here
   struct InnerPointerToCodeCacheEntry {
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/runtime/runtime-promise.cc: In function ‘v8::internal::Object* v8::internal::__RT_impl_Runtime_PromiseRejectAfterResolved(v8::internal::Arguments, v8::internal::Isolate*)’:
../deps/v8/src/runtime/runtime-promise.cc:48:10: error: ‘ReadOnlyRoots’ was not declared in this scope
   return ReadOnlyRoots(isolate).undefined_value();
          ^~~~~~~~~~~~~
../deps/v8/src/runtime/runtime-promise.cc:48:10: note: suggested alternative: ‘ReadOnlySpace’
   return ReadOnlyRoots(isolate).undefined_value();
          ^~~~~~~~~~~~~
          ReadOnlySpace
../deps/v8/src/runtime/runtime-promise.cc: In function ‘v8::internal::Object* v8::internal::__RT_impl_Runtime_PromiseResolveAfterResolved(v8::internal::Arguments, v8::internal::Isolate*)’:
../deps/v8/src/runtime/runtime-promise.cc:58:10: error: ‘ReadOnlyRoots’ was not declared in this scope
   return ReadOnlyRoots(isolate).undefined_value();
          ^~~~~~~~~~~~~
../deps/v8/src/runtime/runtime-promise.cc:58:10: note: suggested alternative: ‘ReadOnlySpace’
   return ReadOnlyRoots(isolate).undefined_value();
          ^~~~~~~~~~~~~
          ReadOnlySpace
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jul 16, 2018

Copy link
Copy Markdown
Member Author

Compilation fixed.
Now a few of our tests are failing. It looks like there needs to be a change in node to support the new hook.
/cc @bmeurer is that expected?

Repro:

$ ./node -e "new Promise((resolve, reject) => { resolve(true); reject(false); })"
 1: 0x8afb30 node::Abort() [./node]
 2: 0x87e77b  [./node]
 3: 0xf0a88d v8::internal::Isolate::ReportPromiseReject(v8::internal::Handle<v8::internal::JSPromise>, v8::internal::Handle<v8::internal::Object>, v8::PromiseRejectEvent) [./node]
 4: 0x10e1bfd v8::internal::Runtime_PromiseRejectAfterResolved(int, v8::internal::Object**, v8::internal::Isolate*) [./node]
 5: 0x2793eb2841bd
[1]    29190 abort (core dumped)  ./node -e
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

devsnek
devsnek reviewed Jul 16, 2018
View reviewed changes
Comment thread deps/v8/include/v8.h Outdated

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@devsnek

devsnek commented Jul 16, 2018

Copy link
Copy Markdown
Member

@targos

node/src/bootstrapper.cc

Line 72 in 210fea5

UNREACHABLE();

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Jul 16, 2018

Copy link
Copy Markdown
Member

@targos just a few days ago in the @nodejs/promises-debugging group we discussed this together and I asked @MayaLekova if she could backport that upstream. Should we maybe wait for that? :-)

In general I am happy to have it in Node and I have no strong opinion but I thought it is best to have it upstream.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeurer

bmeurer commented Jul 17, 2018

Copy link
Copy Markdown
Member

@BridgeAR we cannot backport on the V8 side since it requires changes in Chrome, which goes against our policy. You'll need to float this as patch on top of Node instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MayaLekova

MayaLekova commented Jul 17, 2018

Copy link
Copy Markdown
Contributor

@BridgeAR I wasn't sure about the changes in Chrome when we talked, so yesterday after trying to backport this, we decided that the only option is to have it floated for Node.js. So @targos took the initiative.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jul 17, 2018

Copy link
Copy Markdown
Member Author

@nodejs/promises-debugging would someone of you like to take it from here and make the necessary changes on Node's side? I'd also be happy to do it myself if you give me directions. I just haven't followed the original discussions and don't how you planned to use this hook.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bmeurer

bmeurer commented Jul 17, 2018

Copy link
Copy Markdown
Member

@targos I'd suggest to go with v8@d11dafa initially and then with a later PR add actual functionality.

targos and benjamingr reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bmeurer and others added 3 commits July 17, 2018 11:55
@bmeurer @targos
src: prepare for V8 Swallowed Rejection Hook
1b60c23
This is done in preparation for landing

  https://chromium-review.googlesource.com/c/v8/v8/+/1126099

on the V8 side, which extends the existing PromiseRejectEvent mechanism
with new hooks for reject/resolve after a Promise was previously
resolved already.

Refs: nodejs/promises-debugging#8
Design: https://goo.gl/2stLUY
@targos
deps: cherry-pick 2075910 from upstream V8
68d10b6
Original commit message:

    [turbofan] Remove optimization of default Promise capability functions.

    The JSCallReducer could in theory inline the default resolve and reject
    functions passed to the executor in the Promise constructor. But that
    inlining is almost never triggered because we don't have SFI based feedback
    in the CallIC. Also the use of the Promise constructor is discouraged,
    so we shouldn't really need to squeeze the last bit of performance out
    of this even in the future.

    Getting rid of this optimization will make significantly easier to
    implement the Swallowed Rejection Hook, as there's less churn on the
    TurboFan side then.

    Bug: v8:7919
    Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
    Reviewed-on: https://chromium-review.googlesource.com/1125926
    Commit-Queue: Benedikt Meurer <[email protected]>
    Reviewed-by: Jaroslav Sevcik <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54210}

Refs: v8/v8@2075910
@targos
deps: cherry-pick 907d7bc from upstream V8
d4166de
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <[email protected]>
    Reviewed-by: Benedikt Meurer <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Benedikt Meurer <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54309}

Refs: v8/v8@907d7bc
@targos

targos commented Jul 17, 2018

Copy link
Copy Markdown
Member Author

@bmeurer I included your commit. This is ready for review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos
targos force-pushed the v8-promises branch from d5d0066 to d4166de Compare July 17, 2018 09:59
@targos

targos commented Jul 17, 2018

Copy link
Copy Markdown
Member Author

CI: https://ci.nodejs.org/job/node-test-pull-request/15908/
V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/1525/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

devsnek
devsnek approved these changes Jul 17, 2018
View reviewed changes
@devsnek devsnek mentioned this pull request Jul 17, 2018
Proposal for hook into resolution attempts of already resolved/rejected promise nodejs/promises-debugging#8
Closed
benjamingr
benjamingr approved these changes Jul 17, 2018
View reviewed changes
jasnell
jasnell approved these changes Jul 17, 2018
View reviewed changes
hashseed
hashseed approved these changes Jul 18, 2018
View reviewed changes
bmeurer
bmeurer approved these changes Jul 18, 2018
View reviewed changes
@devsnek devsnek added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jul 18, 2018
targos pushed a commit that referenced this pull request Jul 19, 2018
@bmeurer @targos
src: prepare for V8 Swallowed Rejection Hook
756f63e
This is done in preparation for landing

  https://chromium-review.googlesource.com/c/v8/v8/+/1126099

on the V8 side, which extends the existing PromiseRejectEvent mechanism
with new hooks for reject/resolve after a Promise was previously
resolved already.

Refs: nodejs/promises-debugging#8
Design: https://goo.gl/2stLUY

PR-URL: #21838
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
targos added a commit that referenced this pull request Jul 19, 2018
@targos
deps: cherry-pick 2075910 from upstream V8
4ce35fa
Original commit message:

    [turbofan] Remove optimization of default Promise capability functions.

    The JSCallReducer could in theory inline the default resolve and reject
    functions passed to the executor in the Promise constructor. But that
    inlining is almost never triggered because we don't have SFI based feedback
    in the CallIC. Also the use of the Promise constructor is discouraged,
    so we shouldn't really need to squeeze the last bit of performance out
    of this even in the future.

    Getting rid of this optimization will make significantly easier to
    implement the Swallowed Rejection Hook, as there's less churn on the
    TurboFan side then.

    Bug: v8:7919
    Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
    Reviewed-on: https://chromium-review.googlesource.com/1125926
    Commit-Queue: Benedikt Meurer <[email protected]>
    Reviewed-by: Jaroslav Sevcik <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#54210}

Refs: v8/v8@2075910

PR-URL: #21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
targos added a commit that referenced this pull request Jul 19, 2018
@targos
deps: cherry-pick 907d7bc from upstream V8
d0a545c
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <[email protected]>
    Reviewed-by: Benedikt Meurer <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Benedikt Meurer <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#54309}

Refs: v8/v8@907d7bc

PR-URL: #21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
@targos

targos commented Jul 19, 2018

Copy link
Copy Markdown
Member Author

Landed in 756f63e 4ce35fa d0a545c

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos targos closed this Jul 19, 2018
targos added a commit to targos/node that referenced this pull request Jul 25, 2018
@targos
deps: cherry-pick 2075910 from upstream V8
e7ece11
Original commit message:

    [turbofan] Remove optimization of default Promise capability functions.

    The JSCallReducer could in theory inline the default resolve and reject
    functions passed to the executor in the Promise constructor. But that
    inlining is almost never triggered because we don't have SFI based feedback
    in the CallIC. Also the use of the Promise constructor is discouraged,
    so we shouldn't really need to squeeze the last bit of performance out
    of this even in the future.

    Getting rid of this optimization will make significantly easier to
    implement the Swallowed Rejection Hook, as there's less churn on the
    TurboFan side then.

    Bug: v8:7919
    Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
    Reviewed-on: https://chromium-review.googlesource.com/1125926
    Commit-Queue: Benedikt Meurer <[email protected]>
    Reviewed-by: Jaroslav Sevcik <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54210}

Refs: v8/v8@2075910

PR-URL: nodejs#21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
targos added a commit to targos/node that referenced this pull request Jul 25, 2018
@targos
deps: cherry-pick 907d7bc from upstream V8
b30114c
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <[email protected]>
    Reviewed-by: Benedikt Meurer <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Benedikt Meurer <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54309}

Refs: v8/v8@907d7bc

PR-URL: nodejs#21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
targos added a commit to targos/node that referenced this pull request Jul 26, 2018
@targos
deps: cherry-pick 2075910 from upstream V8
7280780
Original commit message:

    [turbofan] Remove optimization of default Promise capability functions.

    The JSCallReducer could in theory inline the default resolve and reject
    functions passed to the executor in the Promise constructor. But that
    inlining is almost never triggered because we don't have SFI based feedback
    in the CallIC. Also the use of the Promise constructor is discouraged,
    so we shouldn't really need to squeeze the last bit of performance out
    of this even in the future.

    Getting rid of this optimization will make significantly easier to
    implement the Swallowed Rejection Hook, as there's less churn on the
    TurboFan side then.

    Bug: v8:7919
    Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
    Reviewed-on: https://chromium-review.googlesource.com/1125926
    Commit-Queue: Benedikt Meurer <[email protected]>
    Reviewed-by: Jaroslav Sevcik <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54210}

Refs: v8/v8@2075910

PR-URL: nodejs#21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
targos added a commit to targos/node that referenced this pull request Jul 26, 2018
@targos
deps: cherry-pick 907d7bc from upstream V8
68aa129
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <[email protected]>
    Reviewed-by: Benedikt Meurer <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Benedikt Meurer <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54309}

Refs: v8/v8@907d7bc

PR-URL: nodejs#21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
targos added a commit to targos/node that referenced this pull request Jul 26, 2018
@targos
deps: cherry-pick 2075910 from upstream V8
d7b955e
Original commit message:

    [turbofan] Remove optimization of default Promise capability functions.

    The JSCallReducer could in theory inline the default resolve and reject
    functions passed to the executor in the Promise constructor. But that
    inlining is almost never triggered because we don't have SFI based feedback
    in the CallIC. Also the use of the Promise constructor is discouraged,
    so we shouldn't really need to squeeze the last bit of performance out
    of this even in the future.

    Getting rid of this optimization will make significantly easier to
    implement the Swallowed Rejection Hook, as there's less churn on the
    TurboFan side then.

    Bug: v8:7919
    Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
    Reviewed-on: https://chromium-review.googlesource.com/1125926
    Commit-Queue: Benedikt Meurer <[email protected]>
    Reviewed-by: Jaroslav Sevcik <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54210}

Refs: v8/v8@2075910

PR-URL: nodejs#21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
targos added a commit to targos/node that referenced this pull request Jul 26, 2018
@targos
deps: cherry-pick 907d7bc from upstream V8
0edbfb1
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <[email protected]>
    Reviewed-by: Benedikt Meurer <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Benedikt Meurer <[email protected]>
    Cr-Commit-Position: refs/heads/master@{nodejs#54309}

Refs: v8/v8@907d7bc

PR-URL: nodejs#21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
@targos targos mentioned this pull request Jul 31, 2018
v10.8.0 proposal #22040
Merged
This was referenced Aug 1, 2018
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-nodejs#212
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#223
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#224
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#225
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#226
Closed
2018-08-01 Version 10.8.0 (Current) @targos beevelop/docker-android-nodejs#227
Closed
@MylesBorins

MylesBorins commented Aug 7, 2018

Copy link
Copy Markdown
Contributor

Should this be backported to v8.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MylesBorins MylesBorins added the backport-requested-v8.x label Aug 7, 2018
MylesBorins pushed a commit that referenced this pull request Aug 10, 2018
@targos @MylesBorins
deps: cherry-pick 2075910 from upstream V8
7299421
Original commit message:

    [turbofan] Remove optimization of default Promise capability functions.

    The JSCallReducer could in theory inline the default resolve and reject
    functions passed to the executor in the Promise constructor. But that
    inlining is almost never triggered because we don't have SFI based feedback
    in the CallIC. Also the use of the Promise constructor is discouraged,
    so we shouldn't really need to squeeze the last bit of performance out
    of this even in the future.

    Getting rid of this optimization will make significantly easier to
    implement the Swallowed Rejection Hook, as there's less churn on the
    TurboFan side then.

    Bug: v8:7919
    Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
    Reviewed-on: https://chromium-review.googlesource.com/1125926
    Commit-Queue: Benedikt Meurer <[email protected]>
    Reviewed-by: Jaroslav Sevcik <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#54210}

Refs: v8/v8@2075910

Backport-PR-URL: #21668
PR-URL: #21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 10, 2018
@targos @MylesBorins
deps: cherry-pick 907d7bc from upstream V8
ada715f
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <[email protected]>
    Reviewed-by: Benedikt Meurer <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Benedikt Meurer <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#54309}

Refs: v8/v8@907d7bc

Backport-PR-URL: #21668
PR-URL: #21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
@rvagg rvagg mentioned this pull request Aug 13, 2018
Release proposal: v10.9.0 #22295
Merged
This was referenced Aug 16, 2018
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#230
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#215
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#231
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#216
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#232
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#217
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#233
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#218
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-android-nodejs#234
Closed
2018-08-15 Version 10.9.0 (Current) @rvagg beevelop/docker-nodejs#219
Closed
firass111 pushed a commit to firass111/Project_node1 that referenced this pull request Apr 16, 2025
@targos @rvagg
deps: cherry-pick 2075910 from upstream V8
afacfd2
Original commit message:

    [turbofan] Remove optimization of default Promise capability functions.

    The JSCallReducer could in theory inline the default resolve and reject
    functions passed to the executor in the Promise constructor. But that
    inlining is almost never triggered because we don't have SFI based feedback
    in the CallIC. Also the use of the Promise constructor is discouraged,
    so we shouldn't really need to squeeze the last bit of performance out
    of this even in the future.

    Getting rid of this optimization will make significantly easier to
    implement the Swallowed Rejection Hook, as there's less churn on the
    TurboFan side then.

    Bug: v8:7919
    Change-Id: If0c54f1c6c7ce95686cd74232be6b8693ac688c9
    Reviewed-on: https://chromium-review.googlesource.com/1125926
    Commit-Queue: Benedikt Meurer <[email protected]>
    Reviewed-by: Jaroslav Sevcik <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#54210}

Refs: v8/v8@2075910

Backport-PR-URL: nodejs/node#21668
PR-URL: nodejs/node#21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
firass111 pushed a commit to firass111/Project_node1 that referenced this pull request Apr 16, 2025
@targos @rvagg
deps: cherry-pick 907d7bc from upstream V8
328c899
Original commit message:

    [promise] Implement Swallowed Rejection Hook.

    This extends the current Promise Rejection Hook with two new events

      kPromiseRejectAfterResolved
      kPromiseResolveAfterResolved

    which are used to detect (and signal) misuse of the Promise constructor.
    Specifically the common bug like

      new Promise((res, rej) => {
        res(1);
        throw new Error("something")
      });

    where the error is silently swallowed by the Promise constructor without
    the user ever noticing can be caught via this hook.

    Doc: https://goo.gl/2stLUY
    Bug: v8:7919
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: I890a7e766cdd1be88db94844fb744f72823dba33
    Reviewed-on: https://chromium-review.googlesource.com/1126099
    Reviewed-by: Maya Lekova <[email protected]>
    Reviewed-by: Benedikt Meurer <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Commit-Queue: Benedikt Meurer <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#54309}

Refs: v8/v8@907d7bc

Backport-PR-URL: nodejs/node#21668
PR-URL: nodejs/node#21838
Refs: nodejs/promises-debugging#8
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yang Guo <[email protected]>
Reviewed-By: Benedikt Meurer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@benjamingr benjamingr benjamingr approved these changes
+3 more reviewers
@bmeurer bmeurer bmeurer approved these changes
@hashseed hashseed hashseed approved these changes
@devsnek devsnek devsnek approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

10 participants

@targos @nodejs-github-bot @devsnek @BridgeAR @bmeurer @MayaLekova @MylesBorins @jasnell @benjamingr @hashseed
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.