Skip to content

Commit

Permalink
deps: V8: cherry-pick e5f01ba
Browse files Browse the repository at this point in the history
Original commit message:

    [cleanup] Remove unused stack_trace_ member from PromiseRejectMessage

    [email protected]

    Bug: v8:8742
    Change-Id: I307097021893617ed5178f1e967f9360a55cd929
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1520710
    Auto-Submit: Simon Zünd <[email protected]>
    Commit-Queue: Yang Guo <[email protected]>
    Reviewed-by: Yang Guo <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#60221}

Refs: v8/v8@e5f01ba

PR-URL: #26685
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
  • Loading branch information
addaleax authored and refack committed Mar 28, 2019
1 parent e6af220 commit 1f03fb4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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 #####

Expand Down
8 changes: 2 additions & 6 deletions deps/v8/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -6717,11 +6717,8 @@ enum PromiseRejectEvent {
class PromiseRejectMessage {
public:
PromiseRejectMessage(Local<Promise> promise, PromiseRejectEvent event,
Local<Value> value, Local<StackTrace> stack_trace)
: promise_(promise),
event_(event),
value_(value),
stack_trace_(stack_trace) {}
Local<Value> value)
: promise_(promise), event_(event), value_(value) {}

V8_INLINE Local<Promise> GetPromise() const { return promise_; }
V8_INLINE PromiseRejectEvent GetEvent() const { return event_; }
Expand All @@ -6731,7 +6728,6 @@ class PromiseRejectMessage {
Local<Promise> promise_;
PromiseRejectEvent event_;
Local<Value> value_;
Local<StackTrace> stack_trace_;
};

typedef void (*PromiseRejectCallback)(PromiseRejectMessage message);
Expand Down
7 changes: 1 addition & 6 deletions deps/v8/src/isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4400,13 +4400,8 @@ void Isolate::ReportPromiseReject(Handle<JSPromise> promise,
Handle<Object> value,
v8::PromiseRejectEvent event) {
if (promise_reject_callback_ == nullptr) return;
Handle<FixedArray> stack_trace;
if (event != v8::kPromiseHandlerAddedAfterReject && value->IsJSObject()) {
stack_trace = GetDetailedStackTrace(Handle<JSObject>::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) {
Expand Down

0 comments on commit 1f03fb4

Please sign in to comment.