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

Side by Side Diff: Source/core/events/PromiseRejectionEvent.h

Issue 1179113007: Implement onunhandledrejection / onrejectionhandled events (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/events/EventTypeNames.in ('k') | Source/core/events/PromiseRejectionEvent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef PromiseRejectionEvent_h
6 #define PromiseRejectionEvent_h
7
8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptValue.h"
10 #include "core/CoreExport.h"
11 #include "core/events/Event.h"
12 #include "core/events/PromiseRejectionEventInit.h"
13
14 namespace blink {
15
16 class CORE_EXPORT PromiseRejectionEvent : public Event {
17 DEFINE_WRAPPERTYPEINFO();
18 public:
19 static PassRefPtrWillBeRawPtr<PromiseRejectionEvent> create()
20 {
21 return adoptRefWillBeNoop(new PromiseRejectionEvent);
22 }
23 static PassRefPtrWillBeRawPtr<PromiseRejectionEvent> create(const AtomicStri ng& type, const PromiseRejectionEventInit& initializer)
24 {
25 return adoptRefWillBeNoop(new PromiseRejectionEvent(type, initializer));
26 }
27
28 ScriptValue reason() const { return m_reason; }
29 ScriptPromise promise() const { return m_promise; }
30
31 virtual const AtomicString& interfaceName() const override;
32
33 DECLARE_VIRTUAL_TRACE();
34
35 private:
36 PromiseRejectionEvent();
37 PromiseRejectionEvent(const AtomicString& type, ScriptPromise, ScriptValue r eason);
38 PromiseRejectionEvent(const AtomicString&, const PromiseRejectionEventInit&) ;
39 ~PromiseRejectionEvent() override;
40
41 ScriptPromise m_promise;
42 ScriptValue m_reason;
43 };
44
45 } // namespace blink
46
47 #endif // PromiseRejectionEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/EventTypeNames.in ('k') | Source/core/events/PromiseRejectionEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698