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

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

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/core/events/PromiseRejectionEvent.h
diff --git a/Source/core/events/PromiseRejectionEvent.h b/Source/core/events/PromiseRejectionEvent.h
index 40d347f445fc666d27c88102a09e1c3c918a55ab..471657d970a5de94eef3f89e6aabb52352d458b4 100644
--- a/Source/core/events/PromiseRejectionEvent.h
+++ b/Source/core/events/PromiseRejectionEvent.h
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScopedPersistent.h"
#include "bindings/core/v8/ScriptPromise.h"
+#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptValue.h"
#include "core/CoreExport.h"
#include "core/events/Event.h"
@@ -21,13 +22,13 @@ public:
{
return adoptRefWillBeNoop(new PromiseRejectionEvent);
}
- static PassRefPtrWillBeRawPtr<PromiseRejectionEvent> create(const AtomicString& type, const PromiseRejectionEventInit& initializer)
+ static PassRefPtrWillBeRawPtr<PromiseRejectionEvent> create(ScriptState* state, const AtomicString& type, const PromiseRejectionEventInit& initializer)
{
- return adoptRefWillBeNoop(new PromiseRejectionEvent(type, initializer));
+ return adoptRefWillBeNoop(new PromiseRejectionEvent(state, type, initializer));
}
- ScriptValue reason(ScriptState*) const;
- ScriptPromise promise(ScriptState*) const;
+ ScriptValue reason() const;
+ ScriptPromise promise() const;
virtual const AtomicString& interfaceName() const override;
@@ -35,13 +36,13 @@ public:
private:
PromiseRejectionEvent();
- PromiseRejectionEvent(const AtomicString& type, ScriptPromise, ScriptValue reason);
- PromiseRejectionEvent(const AtomicString&, const PromiseRejectionEventInit&);
+ PromiseRejectionEvent(ScriptState*, const AtomicString&, const PromiseRejectionEventInit&);
~PromiseRejectionEvent() override;
static void didCollectPromise(const v8::WeakCallbackInfo<PromiseRejectionEvent>&);
static void didCollectReason(const v8::WeakCallbackInfo<PromiseRejectionEvent>&);
+ RefPtr<ScriptState> m_scriptState;
ScopedPersistent<v8::Value> m_promise;
ScopedPersistent<v8::Value> m_reason;
};

Powered by Google App Engine
This is Rietveld 408576698