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

Side by Side Diff: third_party/WebKit/Source/core/events/PromiseRejectionEvent.cpp

Issue 2270293002: Replace ASSERT*() with DCHECK*() in core/events/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: isUnreachableNode -> checkReachableNode Created 4 years, 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #include "core/events/PromiseRejectionEvent.h" 6 #include "core/events/PromiseRejectionEvent.h"
7 7
8 #include "bindings/core/v8/DOMWrapperWorld.h" 8 #include "bindings/core/v8/DOMWrapperWorld.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 PromiseRejectionEvent::PromiseRejectionEvent() 12 PromiseRejectionEvent::PromiseRejectionEvent()
13 { 13 {
14 } 14 }
15 15
16 PromiseRejectionEvent::PromiseRejectionEvent(ScriptState* state, const AtomicStr ing& type, const PromiseRejectionEventInit& initializer) 16 PromiseRejectionEvent::PromiseRejectionEvent(ScriptState* state, const AtomicStr ing& type, const PromiseRejectionEventInit& initializer)
17 : Event(type, initializer) 17 : Event(type, initializer)
18 , m_scriptState(state) 18 , m_scriptState(state)
19 { 19 {
20 ThreadState::current()->registerPreFinalizer(this); 20 ThreadState::current()->registerPreFinalizer(this);
21 ASSERT(initializer.hasPromise()); 21 DCHECK(initializer.hasPromise());
22 m_promise.set(initializer.promise().isolate(), initializer.promise().v8Value ()); 22 m_promise.set(initializer.promise().isolate(), initializer.promise().v8Value ());
23 m_promise.setPhantom(); 23 m_promise.setPhantom();
24 if (initializer.hasReason()) { 24 if (initializer.hasReason()) {
25 m_reason.set(initializer.reason().isolate(), initializer.reason().v8Valu e()); 25 m_reason.set(initializer.reason().isolate(), initializer.reason().v8Valu e());
26 m_reason.setPhantom(); 26 m_reason.setPhantom();
27 } 27 }
28 } 28 }
29 29
30 PromiseRejectionEvent::~PromiseRejectionEvent() 30 PromiseRejectionEvent::~PromiseRejectionEvent()
31 { 31 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Event::trace(visitor); 83 Event::trace(visitor);
84 } 84 }
85 85
86 DEFINE_TRACE_WRAPPERS(PromiseRejectionEvent) 86 DEFINE_TRACE_WRAPPERS(PromiseRejectionEvent)
87 { 87 {
88 visitor->traceWrappers(&m_promise); 88 visitor->traceWrappers(&m_promise);
89 visitor->traceWrappers(&m_reason); 89 visitor->traceWrappers(&m_reason);
90 } 90 }
91 91
92 } // namespace blink 92 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PopStateEvent.h ('k') | third_party/WebKit/Source/core/events/RegisteredEventListener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698