| Index: Source/core/events/PromiseRejectionEvent.cpp
|
| diff --git a/Source/core/events/PromiseRejectionEvent.cpp b/Source/core/events/PromiseRejectionEvent.cpp
|
| index 7947362f7ecfced3394c1b701fd91a981f5c9f01..a1333b4117036e41a40883283aa10218f1a7d766 100644
|
| --- a/Source/core/events/PromiseRejectionEvent.cpp
|
| +++ b/Source/core/events/PromiseRejectionEvent.cpp
|
| @@ -48,6 +48,18 @@ 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)
|
| +{
|
| + // This might create cross world references. However, the regular code path
|
| + // will not create them, and if we get a cross world reference here, the
|
| + // worst thing is that the lifetime is too long (similar to what happens
|
| + // for DOM trees).
|
| + if (!m_promise.isEmpty())
|
| + m_promise.setReference(wrapper, isolate);
|
| + if (!m_reason.isEmpty())
|
| + m_reason.setReference(wrapper, isolate);
|
| +}
|
| +
|
| const AtomicString& PromiseRejectionEvent::interfaceName() const
|
| {
|
| return EventNames::PromiseRejectionEvent;
|
|
|