Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: src/isolate.cc

Issue 2782893003: [inspector] fixed crash in InternalPromiseHasUserDefinedRejectHandler (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/inspector/inspector.status » ('j') | test/inspector/inspector.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 6d59ad4499911aacf4f4cae59ce4e00909040f41..73c15a4e1e04c56e172210b786b844893853d48b 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1930,11 +1930,18 @@ bool InternalPromiseHasUserDefinedRejectHandler(Isolate* isolate,
Handle<FixedArray> deferred_promise_arr =
Handle<FixedArray>::cast(deferred_promise);
for (int i = 0; i < deferred_promise_arr->length(); i++) {
- Handle<JSReceiver> queue_item(JSReceiver::cast(queue_arr->get(i)));
Handle<JSReceiver> deferred_promise_item(
JSReceiver::cast(deferred_promise_arr->get(i)));
- if (PromiseHandlerCheck(isolate, queue_item, deferred_promise_item)) {
- return true;
+ if (queue_arr->get(i)->IsSymbol()) {
+ if (InternalPromiseHasUserDefinedRejectHandler(
+ isolate, Handle<JSPromise>::cast(deferred_promise_item))) {
+ return true;
+ }
+ } else {
+ Handle<JSReceiver> queue_item(JSReceiver::cast(queue_arr->get(i)));
+ if (PromiseHandlerCheck(isolate, queue_item, deferred_promise_item)) {
+ return true;
+ }
}
}
« no previous file with comments | « no previous file | test/inspector/inspector.status » ('j') | test/inspector/inspector.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698