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

Side by Side Diff: Source/bindings/core/v8/ScriptPromiseResolver.h

Issue 954683002: InlinedVisitor: Migrate bindings to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef ScriptPromiseResolver_h 5 #ifndef ScriptPromiseResolver_h
6 #define ScriptPromiseResolver_h 6 #define ScriptPromiseResolver_h
7 7
8 #include "bindings/core/v8/ScopedPersistent.h" 8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // ActiveDOMObject implementation. 80 // ActiveDOMObject implementation.
81 virtual void suspend() override; 81 virtual void suspend() override;
82 virtual void resume() override; 82 virtual void resume() override;
83 virtual void stop() override; 83 virtual void stop() override;
84 84
85 // Once this function is called this resolver stays alive while the 85 // Once this function is called this resolver stays alive while the
86 // promise is pending and the associated ExecutionContext isn't stopped. 86 // promise is pending and the associated ExecutionContext isn't stopped.
87 void keepAliveWhilePending(); 87 void keepAliveWhilePending();
88 88
89 virtual void trace(Visitor*) override; 89 DECLARE_VIRTUAL_TRACE();
90 90
91 protected: 91 protected:
92 // You need to call suspendIfNeeded after the construction because 92 // You need to call suspendIfNeeded after the construction because
93 // this is an ActiveDOMObject. 93 // this is an ActiveDOMObject.
94 explicit ScriptPromiseResolver(ScriptState*); 94 explicit ScriptPromiseResolver(ScriptState*);
95 95
96 private: 96 private:
97 typedef ScriptPromise::InternalResolver Resolver; 97 typedef ScriptPromise::InternalResolver Resolver;
98 enum ResolutionState { 98 enum ResolutionState {
99 Pending, 99 Pending,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ScopedPersistent<v8::Value> m_value; 155 ScopedPersistent<v8::Value> m_value;
156 #if ENABLE(ASSERT) 156 #if ENABLE(ASSERT)
157 // True if promise() is called. 157 // True if promise() is called.
158 bool m_isPromiseCalled; 158 bool m_isPromiseCalled;
159 #endif 159 #endif
160 }; 160 };
161 161
162 } // namespace blink 162 } // namespace blink
163 163
164 #endif // ScriptPromiseResolver_h 164 #endif // ScriptPromiseResolver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698