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

Side by Side Diff: third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp

Issue 2587913002: Rename activeDOMObjectsAreSuspended to isContextSuspended (Closed)
Patch Set: temp Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "web/SuspendableScriptExecutor.h" 5 #include "web/SuspendableScriptExecutor.h"
6 6
7 #include "bindings/core/v8/ScriptController.h" 7 #include "bindings/core/v8/ScriptController.h"
8 #include "bindings/core/v8/ScriptSourceCode.h" 8 #include "bindings/core/v8/ScriptSourceCode.h"
9 #include "bindings/core/v8/V8PersistentValueVector.h" 9 #include "bindings/core/v8/V8PersistentValueVector.h"
10 #include "bindings/core/v8/WindowProxy.h" 10 #include "bindings/core/v8/WindowProxy.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 SuspendableScriptExecutor::~SuspendableScriptExecutor() {} 192 SuspendableScriptExecutor::~SuspendableScriptExecutor() {}
193 193
194 void SuspendableScriptExecutor::fired() { 194 void SuspendableScriptExecutor::fired() {
195 executeAndDestroySelf(); 195 executeAndDestroySelf();
196 } 196 }
197 197
198 void SuspendableScriptExecutor::run() { 198 void SuspendableScriptExecutor::run() {
199 ExecutionContext* context = getExecutionContext(); 199 ExecutionContext* context = getExecutionContext();
200 DCHECK(context); 200 DCHECK(context);
201 if (!context->activeDOMObjectsAreSuspended()) { 201 if (!context->isContextSuspended()) {
202 suspendIfNeeded(); 202 suspendIfNeeded();
203 executeAndDestroySelf(); 203 executeAndDestroySelf();
204 return; 204 return;
205 } 205 }
206 startOneShot(0, BLINK_FROM_HERE); 206 startOneShot(0, BLINK_FROM_HERE);
207 suspendIfNeeded(); 207 suspendIfNeeded();
208 } 208 }
209 209
210 void SuspendableScriptExecutor::executeAndDestroySelf() { 210 void SuspendableScriptExecutor::executeAndDestroySelf() {
211 CHECK(m_scriptState->contextIsValid()); 211 CHECK(m_scriptState->contextIsValid());
(...skipping 19 matching lines...) Expand all
231 m_keepAlive.clear(); 231 m_keepAlive.clear();
232 stop(); 232 stop();
233 } 233 }
234 234
235 DEFINE_TRACE(SuspendableScriptExecutor) { 235 DEFINE_TRACE(SuspendableScriptExecutor) {
236 visitor->trace(m_executor); 236 visitor->trace(m_executor);
237 SuspendableTimer::trace(visitor); 237 SuspendableTimer::trace(visitor);
238 } 238 }
239 239
240 } // namespace blink 240 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698