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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp

Issue 2811793005: Rename LocalFrame::Script() to GetScriptController() (Closed)
Patch Set: 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. 2 * Copyright (C) 2007-2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return; 158 return;
159 } 159 }
160 Vector<v8::Local<v8::Value>> info; 160 Vector<v8::Local<v8::Value>> info;
161 CreateLocalHandlesForArgs(&info); 161 CreateLocalHandlesForArgs(&info);
162 V8ScriptRunner::CallFunction( 162 V8ScriptRunner::CallFunction(
163 function, frame->GetDocument(), script_state_->GetContext()->Global(), 163 function, frame->GetDocument(), script_state_->GetContext()->Global(),
164 info.size(), info.Data(), script_state_->GetIsolate()); 164 info.size(), info.Data(), script_state_->GetIsolate());
165 } else { 165 } else {
166 DVLOG(1) << "ScheduledAction::execute " << this 166 DVLOG(1) << "ScheduledAction::execute " << this
167 << ": executing from source"; 167 << ": executing from source";
168 frame->Script().ExecuteScriptAndReturnValue(script_state_->GetContext(), 168 frame->GetScriptController().ExecuteScriptAndReturnValue(
169 ScriptSourceCode(code_)); 169 script_state_->GetContext(), ScriptSourceCode(code_));
170 } 170 }
171 171
172 // The frame might be invalid at this point because JavaScript could have 172 // The frame might be invalid at this point because JavaScript could have
173 // released it. 173 // released it.
174 } 174 }
175 175
176 void ScheduledAction::Execute(WorkerGlobalScope* worker) { 176 void ScheduledAction::Execute(WorkerGlobalScope* worker) {
177 ASSERT(worker->GetThread()->IsCurrentThread()); 177 ASSERT(worker->GetThread()->IsCurrentThread());
178 178
179 if (!script_state_->ContextIsValid()) { 179 if (!script_state_->ContextIsValid()) {
(...skipping 23 matching lines...) Expand all
203 } 203 }
204 204
205 void ScheduledAction::CreateLocalHandlesForArgs( 205 void ScheduledAction::CreateLocalHandlesForArgs(
206 Vector<v8::Local<v8::Value>>* handles) { 206 Vector<v8::Local<v8::Value>>* handles) {
207 handles->ReserveCapacity(info_.Size()); 207 handles->ReserveCapacity(info_.Size());
208 for (size_t i = 0; i < info_.Size(); ++i) 208 for (size_t i = 0; i < info_.Size(); ++i)
209 handles->push_back(info_.Get(i)); 209 handles->push_back(info_.Get(i));
210 } 210 }
211 211
212 } // namespace blink 212 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ScriptEventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698