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

Unified Diff: Source/core/events/PromiseRejectionEvent.cpp

Issue 1215813003: Correctly track lifetime of promise rejection events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/events/PromiseRejectionEvent.h ('k') | Source/core/events/PromiseRejectionEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/PromiseRejectionEvent.cpp
diff --git a/Source/core/events/PromiseRejectionEvent.cpp b/Source/core/events/PromiseRejectionEvent.cpp
index a688ca8c088e0902764ae9b39fef9165953f1f70..b0461d8a7671174e6c49aef864f4ba43e4d8f5c7 100644
--- a/Source/core/events/PromiseRejectionEvent.cpp
+++ b/Source/core/events/PromiseRejectionEvent.cpp
@@ -48,6 +48,14 @@ ScriptValue PromiseRejectionEvent::reason(ScriptState* state) const
return ScriptValue(m_scriptState.get(), m_reason.newLocal(m_scriptState->isolate()));
}
+void PromiseRejectionEvent::setWrapperReference(v8::Isolate* isolate, const v8::Persistent<v8::Object>& wrapper)
+{
+ if (!m_promise.isEmpty())
+ m_promise.setReference(wrapper, isolate);
haraken 2015/06/29 07:26:53 This reference can be a cross-world reference. Wou
+ if (!m_reason.isEmpty())
+ m_reason.setReference(wrapper, isolate);
+}
+
const AtomicString& PromiseRejectionEvent::interfaceName() const
{
return EventNames::PromiseRejectionEvent;
« no previous file with comments | « Source/core/events/PromiseRejectionEvent.h ('k') | Source/core/events/PromiseRejectionEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698