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

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
« no previous file with comments | « Source/bindings/core/v8/custom/custom.gypi ('k') | Source/core/events/PromiseRejectionEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/PromiseRejectionEvent.h
diff --git a/Source/core/events/PromiseRejectionEvent.h b/Source/core/events/PromiseRejectionEvent.h
index 40d347f445fc666d27c88102a09e1c3c918a55ab..c71f5dbe04b5598b4aa51faad2fd551469712fb3 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,9 +22,9 @@ 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;
@@ -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;
};
« no previous file with comments | « Source/bindings/core/v8/custom/custom.gypi ('k') | Source/core/events/PromiseRejectionEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698