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

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

Issue 2871703002: Revert of Simplify FrameLoader::Clear(), remove FrameLoader::check_timer_ (Closed)
Patch Set: 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();
210 } 209 }
211 210
212 bool ScriptController::ExecuteScriptIfJavaScriptURL(const KURL& url, 211 bool ScriptController::ExecuteScriptIfJavaScriptURL(const KURL& url,
213 Element* element) { 212 Element* element) {
214 if (!url.ProtocolIsJavaScript()) 213 if (!url.ProtocolIsJavaScript())
215 return false; 214 return false;
216 215
217 const int kJavascriptSchemeLength = sizeof("javascript:") - 1; 216 const int kJavascriptSchemeLength = sizeof("javascript:") - 1;
218 String script_source = DecodeURLEscapeSequences(url.GetString()) 217 String script_source = DecodeURLEscapeSequences(url.GetString())
219 .Substring(kJavascriptSchemeLength); 218 .Substring(kJavascriptSchemeLength);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 for (size_t i = 0; i < result_array->Length(); ++i) { 353 for (size_t i = 0; i < result_array->Length(); ++i) {
355 v8::Local<v8::Value> value; 354 v8::Local<v8::Value> value;
356 if (!result_array->Get(context, i).ToLocal(&value)) 355 if (!result_array->Get(context, i).ToLocal(&value))
357 return; 356 return;
358 results->push_back(value); 357 results->push_back(value);
359 } 358 }
360 } 359 }
361 } 360 }
362 361
363 } // namespace blink 362 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698