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

Unified Diff: Source/bindings/core/v8/RejectedPromises.cpp

Issue 1181353005: Return null when no promise/reason is given in PromiseRejectionEvent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 5 years, 6 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
Index: Source/bindings/core/v8/RejectedPromises.cpp
diff --git a/Source/bindings/core/v8/RejectedPromises.cpp b/Source/bindings/core/v8/RejectedPromises.cpp
index 6e0ea3d4e5d1adfb2e8ebd0fd09344c1a24ca0fd..da8c256eb49363300cfdb8cae1a1a1e825ff8882 100644
--- a/Source/bindings/core/v8/RejectedPromises.cpp
+++ b/Source/bindings/core/v8/RejectedPromises.cpp
@@ -67,7 +67,7 @@ public:
init.setPromise(ScriptPromise(m_scriptState, value));
init.setReason(m_exception);
init.setCancelable(true);
- RefPtrWillBeRawPtr<PromiseRejectionEvent> event = PromiseRejectionEvent::create(EventTypeNames::unhandledrejection, init);
+ RefPtrWillBeRawPtr<PromiseRejectionEvent> event = PromiseRejectionEvent::create(m_scriptState, EventTypeNames::unhandledrejection, init);
// Log to console if event was not preventDefault()'ed.
m_shouldLogToConsole = target->dispatchEvent(event);
}
@@ -114,7 +114,7 @@ public:
PromiseRejectionEventInit init;
init.setPromise(ScriptPromise(m_scriptState, value));
init.setReason(m_exception);
- RefPtrWillBeRawPtr<PromiseRejectionEvent> event = PromiseRejectionEvent::create(EventTypeNames::rejectionhandled, init);
+ RefPtrWillBeRawPtr<PromiseRejectionEvent> event = PromiseRejectionEvent::create(m_scriptState, EventTypeNames::rejectionhandled, init);
m_shouldLogToConsole &= target->dispatchEvent(event);
}

Powered by Google App Engine
This is Rietveld 408576698