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

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

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (callback) 158 if (callback)
159 callback->completed(Vector<v8::Local<v8::Value>>()); 159 callback->completed(Vector<v8::Local<v8::Value>>());
160 return; 160 return;
161 } 161 }
162 SuspendableScriptExecutor* executor = new SuspendableScriptExecutor( 162 SuspendableScriptExecutor* executor = new SuspendableScriptExecutor(
163 frame, scriptState, callback, 163 frame, scriptState, callback,
164 new V8FunctionExecutor(isolate, function, receiver, argc, argv)); 164 new V8FunctionExecutor(isolate, function, receiver, argc, argv));
165 executor->run(); 165 executor->run();
166 } 166 }
167 167
168 void SuspendableScriptExecutor::contextDestroyed() { 168 void SuspendableScriptExecutor::contextDestroyed(
169 SuspendableTimer::contextDestroyed(); 169 ExecutionContext* destroyedContext) {
170 SuspendableTimer::contextDestroyed(destroyedContext);
170 if (m_callback) 171 if (m_callback)
171 m_callback->completed(Vector<v8::Local<v8::Value>>()); 172 m_callback->completed(Vector<v8::Local<v8::Value>>());
172 dispose(); 173 dispose();
173 } 174 }
174 175
175 SuspendableScriptExecutor::SuspendableScriptExecutor( 176 SuspendableScriptExecutor::SuspendableScriptExecutor(
176 LocalFrame* frame, 177 LocalFrame* frame,
177 ScriptState* scriptState, 178 ScriptState* scriptState,
178 WebScriptExecutionCallback* callback, 179 WebScriptExecutionCallback* callback,
179 Executor* executor) 180 Executor* executor)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 m_keepAlive.clear(); 226 m_keepAlive.clear();
226 stop(); 227 stop();
227 } 228 }
228 229
229 DEFINE_TRACE(SuspendableScriptExecutor) { 230 DEFINE_TRACE(SuspendableScriptExecutor) {
230 visitor->trace(m_executor); 231 visitor->trace(m_executor);
231 SuspendableTimer::trace(visitor); 232 SuspendableTimer::trace(visitor);
232 } 233 }
233 234
234 } // namespace blink 235 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698