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

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

Issue 2794023002: Move ScriptState::forWorld/ScriptState::forMainWorld (Part 1) (Closed)
Patch Set: Code review changes Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.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 <memory> 7 #include <memory>
8 #include "bindings/core/v8/ScriptController.h" 8 #include "bindings/core/v8/ScriptController.h"
9 #include "bindings/core/v8/ScriptSourceCode.h" 9 #include "bindings/core/v8/ScriptSourceCode.h"
10 #include "bindings/core/v8/V8Binding.h" 10 #include "bindings/core/v8/V8Binding.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 130
131 } // namespace 131 } // namespace
132 132
133 SuspendableScriptExecutor* SuspendableScriptExecutor::create( 133 SuspendableScriptExecutor* SuspendableScriptExecutor::create(
134 LocalFrame* frame, 134 LocalFrame* frame,
135 RefPtr<DOMWrapperWorld> world, 135 RefPtr<DOMWrapperWorld> world,
136 const HeapVector<ScriptSourceCode>& sources, 136 const HeapVector<ScriptSourceCode>& sources,
137 bool userGesture, 137 bool userGesture,
138 WebScriptExecutionCallback* callback) { 138 WebScriptExecutionCallback* callback) {
139 ScriptState* scriptState = ScriptState::forWorld(frame, *world); 139 ScriptState* scriptState = toScriptState(frame, *world);
140 return new SuspendableScriptExecutor( 140 return new SuspendableScriptExecutor(
141 frame, scriptState, callback, 141 frame, scriptState, callback,
142 new WebScriptExecutor(sources, world->worldId(), userGesture)); 142 new WebScriptExecutor(sources, world->worldId(), userGesture));
143 } 143 }
144 144
145 void SuspendableScriptExecutor::createAndRun( 145 void SuspendableScriptExecutor::createAndRun(
146 LocalFrame* frame, 146 LocalFrame* frame,
147 v8::Isolate* isolate, 147 v8::Isolate* isolate,
148 v8::Local<v8::Context> context, 148 v8::Local<v8::Context> context,
149 v8::Local<v8::Function> function, 149 v8::Local<v8::Function> function,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 m_keepAlive.clear(); 242 m_keepAlive.clear();
243 stop(); 243 stop();
244 } 244 }
245 245
246 DEFINE_TRACE(SuspendableScriptExecutor) { 246 DEFINE_TRACE(SuspendableScriptExecutor) {
247 visitor->trace(m_executor); 247 visitor->trace(m_executor);
248 SuspendableTimer::trace(visitor); 248 SuspendableTimer::trace(visitor);
249 } 249 }
250 250
251 } // namespace blink 251 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698