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

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

Issue 2878553002: Reland "Simplify FrameLoader::Clear(), remove FrameLoader::check_timer" (Closed)
Patch Set: Don't call CheckCompleted in HTMLFrameOwnerElement Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 4 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are 7 * modification, are permitted provided that the following conditions are
8 * met: 8 * met:
9 * 9 *
10 * * Redistributions of source code must retain the above copyright 10 * * Redistributions of source code must retain the above copyright
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 void ScriptController::ClearWindowProxy() { 200 void ScriptController::ClearWindowProxy() {
201 // V8 binding expects ScriptController::clearWindowProxy only be called when a 201 // V8 binding expects ScriptController::clearWindowProxy only be called when a
202 // frame is loading a new page. This creates a new context for the new page. 202 // frame is loading a new page. This creates a new context for the new page.
203 window_proxy_manager_->ClearForNavigation(); 203 window_proxy_manager_->ClearForNavigation();
204 MainThreadDebugger::Instance()->DidClearContextsForFrame(GetFrame()); 204 MainThreadDebugger::Instance()->DidClearContextsForFrame(GetFrame());
205 } 205 }
206 206
207 void ScriptController::UpdateDocument() { 207 void ScriptController::UpdateDocument() {
208 window_proxy_manager_->MainWorldProxyMaybeUninitialized()->UpdateDocument(); 208 window_proxy_manager_->MainWorldProxyMaybeUninitialized()->UpdateDocument();
209 EnableEval();
209 } 210 }
210 211
211 bool ScriptController::ExecuteScriptIfJavaScriptURL(const KURL& url, 212 bool ScriptController::ExecuteScriptIfJavaScriptURL(const KURL& url,
212 Element* element) { 213 Element* element) {
213 if (!url.ProtocolIsJavaScript()) 214 if (!url.ProtocolIsJavaScript())
214 return false; 215 return false;
215 216
216 const int kJavascriptSchemeLength = sizeof("javascript:") - 1; 217 const int kJavascriptSchemeLength = sizeof("javascript:") - 1;
217 String script_source = DecodeURLEscapeSequences(url.GetString()) 218 String script_source = DecodeURLEscapeSequences(url.GetString())
218 .Substring(kJavascriptSchemeLength); 219 .Substring(kJavascriptSchemeLength);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 for (size_t i = 0; i < result_array->Length(); ++i) { 354 for (size_t i = 0; i < result_array->Length(); ++i) {
354 v8::Local<v8::Value> value; 355 v8::Local<v8::Value> value;
355 if (!result_array->Get(context, i).ToLocal(&value)) 356 if (!result_array->Get(context, i).ToLocal(&value))
356 return; 357 return;
357 results->push_back(value); 358 results->push_back(value);
358 } 359 }
359 } 360 }
360 } 361 }
361 362
362 } // namespace blink 363 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptController.h ('k') | third_party/WebKit/Source/core/loader/FrameLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698