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

Unified Diff: Source/bindings/v8/ScriptController.cpp

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/bindings/v8/V8Binding.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptController.cpp
diff --git a/Source/bindings/v8/ScriptController.cpp b/Source/bindings/v8/ScriptController.cpp
index abd6e65fbf08b00a90085122b8264db543058fb1..1a472b7a673270e10ccead4dc0ab83fb51b627ff 100644
--- a/Source/bindings/v8/ScriptController.cpp
+++ b/Source/bindings/v8/ScriptController.cpp
@@ -271,9 +271,10 @@ V8WindowShell* ScriptController::windowShell(DOMWrapperWorld* world)
if (!shell->isContextInitialized() && shell->initializeIfNeeded()) {
if (world->isMainWorld()) {
// FIXME: Remove this if clause. See comment with existingWindowShellWorkaroundWorld().
- m_frame->loader()->dispatchDidClearWindowObjectInWorld(existingWindowShellWorkaroundWorld());
- } else
- m_frame->loader()->dispatchDidClearWindowObjectInWorld(world);
+ m_frame->loader().dispatchDidClearWindowObjectInWorld(existingWindowShellWorkaroundWorld());
+ } else {
+ m_frame->loader().dispatchDidClearWindowObjectInWorld(world);
+ }
}
return shell;
}
@@ -545,7 +546,7 @@ int ScriptController::contextDebugId(v8::Handle<v8::Context> context)
void ScriptController::updateDocument()
{
// For an uninitialized main window shell, do not incur the cost of context initialization during FrameLoader::init().
- if ((!m_windowShell->isContextInitialized() || !m_windowShell->isGlobalInitialized()) && m_frame->loader()->stateMachine()->creatingInitialEmptyDocument())
+ if ((!m_windowShell->isContextInitialized() || !m_windowShell->isGlobalInitialized()) && m_frame->loader().stateMachine()->creatingInitialEmptyDocument())
return;
if (!initializeMainWorld())
@@ -577,9 +578,9 @@ bool ScriptController::canExecuteScripts(ReasonForCallingCanExecuteScripts reaso
}
Settings* settings = m_frame->settings();
- const bool allowed = m_frame->loader()->client()->allowScript(settings && settings->isScriptEnabled());
+ const bool allowed = m_frame->loader().client()->allowScript(settings && settings->isScriptEnabled());
if (!allowed && reason == AboutToExecuteScript)
- m_frame->loader()->client()->didNotAllowScript();
+ m_frame->loader().client()->didNotAllowScript();
return allowed;
}
@@ -656,8 +657,8 @@ ScriptValue ScriptController::evaluateScriptInMainWorld(const ScriptSourceCode&
return ScriptValue();
RefPtr<Frame> protect(m_frame);
- if (m_frame->loader()->stateMachine()->isDisplayingInitialEmptyDocument())
- m_frame->loader()->didAccessInitialDocument();
+ if (m_frame->loader().stateMachine()->isDisplayingInitialEmptyDocument())
+ m_frame->loader().didAccessInitialDocument();
OwnPtr<ScriptSourceCode> maybeProcessedSourceCode = InspectorInstrumentation::preprocess(m_frame, sourceCode);
const ScriptSourceCode& sourceCodeToCompile = maybeProcessedSourceCode ? *maybeProcessedSourceCode : sourceCode;
« no previous file with comments | « no previous file | Source/bindings/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698