From cac1709a657b9f22ee9686a34a5d4a7ba25db891 Mon Sep 17 00:00:00 2001 From: Matt Loring Date: Mon, 6 Jun 2016 12:02:28 -0700 Subject: [PATCH] deps: revert removal of V8::PromiseEvent The removal of the promise debug event is an API/ABI breaking change. Ref: https://codereview.chromium.org/1833563002 Ref: https://github.com/ofrobots/node/pull/23 PR-URL: https://github.com/nodejs/node/pull/7016 Reviewed-By: Ali Ijaz Sheikh Reviewed-By: Ben Noordhuis --- deps/v8/include/v8-debug.h | 6 +- deps/v8/src/debug/debug.cc | 27 ++++ deps/v8/src/debug/debug.h | 3 + deps/v8/src/debug/debug.js | 37 +++++- deps/v8/src/js/promise.js | 6 + deps/v8/src/runtime/runtime-debug.cc | 9 ++ deps/v8/src/runtime/runtime.h | 1 + .../test/mjsunit/es6/debug-promises/events.js | 122 ++++++++++++++++++ .../resolve-after-aborted-try-finally.js | 32 +++++ .../debug-promises/resolve-after-try-catch.js | 29 +++++ .../debug-promises/rethrow-in-try-finally.js | 30 +++++ 11 files changed, 299 insertions(+), 3 deletions(-) create mode 100644 deps/v8/test/mjsunit/es6/debug-promises/events.js create mode 100644 deps/v8/test/mjsunit/es6/debug-promises/resolve-after-aborted-try-finally.js create mode 100644 deps/v8/test/mjsunit/es6/debug-promises/resolve-after-try-catch.js create mode 100644 deps/v8/test/mjsunit/es6/debug-promises/rethrow-in-try-finally.js diff --git a/deps/v8/include/v8-debug.h b/deps/v8/include/v8-debug.h index e41df29ad053c7..50314501e3b3b9 100644 --- a/deps/v8/include/v8-debug.h +++ b/deps/v8/include/v8-debug.h @@ -18,11 +18,13 @@ enum DebugEvent { Exception = 2, NewFunction = 3, BeforeCompile = 4, - AfterCompile = 5, + AfterCompile = 5, CompileError = 6, - AsyncTaskEvent = 7, + PromiseEvent = 7, + AsyncTaskEvent = 8, }; + class V8_EXPORT Debug { public: /** diff --git a/deps/v8/src/debug/debug.cc b/deps/v8/src/debug/debug.cc index 6e9401257967cd..7c76742bb973cb 100644 --- a/deps/v8/src/debug/debug.cc +++ b/deps/v8/src/debug/debug.cc @@ -1708,6 +1708,13 @@ MaybeHandle Debug::MakeCompileEvent(Handle