Skip to content

Commit

Permalink
[cleanup] Remove unused stack_trace_ member from PromiseRejectMessage
Browse files Browse the repository at this point in the history
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 <szuend@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60221}
  • Loading branch information
szuend authored and Commit Bot committed Mar 13, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent b186976 commit e5f01ba
Showing 2 changed files with 3 additions and 12 deletions.
8 changes: 2 additions & 6 deletions include/v8.h
Original file line number Diff line number Diff line change
@@ -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_; }
@@ -6731,7 +6728,6 @@ class PromiseRejectMessage {
Local<Promise> promise_;
PromiseRejectEvent event_;
Local<Value> value_;
Local<StackTrace> stack_trace_;
};

typedef void (*PromiseRejectCallback)(PromiseRejectMessage message);
7 changes: 1 addition & 6 deletions src/isolate.cc
Original file line number Diff line number Diff line change
@@ -4418,13 +4418,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) {

0 comments on commit e5f01ba

Please sign in to comment.