From 1f03fb4d492ea6ba1e6f7f50f68257d7c49817b8 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 15 Mar 2019 23:00:27 +0100 Subject: [PATCH] deps: V8: cherry-pick e5f01ba MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Original commit message: [cleanup] Remove unused stack_trace_ member from PromiseRejectMessage R=yangguo@chromium.org Bug: v8:8742 Change-Id: I307097021893617ed5178f1e967f9360a55cd929 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1520710 Auto-Submit: Simon Zünd Commit-Queue: Yang Guo Reviewed-by: Yang Guo Cr-Commit-Position: refs/heads/master@{#60221} Refs: https://github.com/v8/v8/commit/e5f01ba13fd199c76fcfb755346b97c6b97fc6d9 PR-URL: https://github.com/nodejs/node/pull/26685 Reviewed-By: Anna Henningsen Reviewed-By: Michaël Zasso Reviewed-By: Refael Ackermann --- common.gypi | 2 +- deps/v8/include/v8.h | 8 ++------ deps/v8/src/isolate.cc | 7 +------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/common.gypi b/common.gypi index bf9556e77bd364..925d85f4fc1009 100644 --- a/common.gypi +++ b/common.gypi @@ -37,7 +37,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.7', + 'v8_embedder_string': '-node.8', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h index ac96091ef6b284..0a19d1aef36699 100644 --- a/deps/v8/include/v8.h +++ b/deps/v8/include/v8.h @@ -6717,11 +6717,8 @@ enum PromiseRejectEvent { class PromiseRejectMessage { public: PromiseRejectMessage(Local promise, PromiseRejectEvent event, - Local value, Local stack_trace) - : promise_(promise), - event_(event), - value_(value), - stack_trace_(stack_trace) {} + Local value) + : promise_(promise), event_(event), value_(value) {} V8_INLINE Local GetPromise() const { return promise_; } V8_INLINE PromiseRejectEvent GetEvent() const { return event_; } @@ -6731,7 +6728,6 @@ class PromiseRejectMessage { Local promise_; PromiseRejectEvent event_; Local value_; - Local stack_trace_; }; typedef void (*PromiseRejectCallback)(PromiseRejectMessage message); diff --git a/deps/v8/src/isolate.cc b/deps/v8/src/isolate.cc index 73aee01a6d2dee..8187284ba83db9 100644 --- a/deps/v8/src/isolate.cc +++ b/deps/v8/src/isolate.cc @@ -4400,13 +4400,8 @@ void Isolate::ReportPromiseReject(Handle promise, Handle value, v8::PromiseRejectEvent event) { if (promise_reject_callback_ == nullptr) return; - Handle stack_trace; - if (event != v8::kPromiseHandlerAddedAfterReject && value->IsJSObject()) { - stack_trace = GetDetailedStackTrace(Handle::cast(value)); - } promise_reject_callback_(v8::PromiseRejectMessage( - v8::Utils::PromiseToLocal(promise), event, v8::Utils::ToLocal(value), - v8::Utils::StackTraceToLocal(stack_trace))); + v8::Utils::PromiseToLocal(promise), event, v8::Utils::ToLocal(value))); } void Isolate::SetUseCounterCallback(v8::Isolate::UseCounterCallback callback) {