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

Unified Diff: Source/core/dom/Document.cpp

Issue 33523002: Have Frame::script() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master 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 | « Source/bindings/v8/custom/V8WindowCustom.cpp ('k') | Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 67c789a8029a5dad4d9bf9e65b19f2241ba3adb2..7a0ad30e31a1fcab616e6f363f8c0c17accfb31e 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2334,7 +2334,7 @@ void Document::implicitClose()
detachParser();
Frame* f = frame();
- if (f && f->script()->canExecuteScripts(NotAboutToExecuteScript)) {
+ if (f && f->script().canExecuteScripts(NotAboutToExecuteScript)) {
ImageLoader::dispatchPendingBeforeLoadEvents();
ImageLoader::dispatchPendingLoadEvents();
ImageLoader::dispatchPendingErrorEvents();
@@ -2713,7 +2713,7 @@ void Document::disableEval(const String& errorMessage)
if (!frame())
return;
- frame()->script()->disableEval(errorMessage);
+ frame()->script().disableEval(errorMessage);
}
bool Document::canNavigate(Frame* targetFrame)
@@ -3711,7 +3711,7 @@ void Document::addListenerTypeIfNeeded(const AtomicString& eventType)
} else if (eventType == EventTypeNames::webkitTransitionEnd || eventType == EventTypeNames::transitionend) {
addListenerType(TRANSITIONEND_LISTENER);
} else if (eventType == EventTypeNames::beforeload) {
- if (m_frame && m_frame->script()->shouldBypassMainWorldContentSecurityPolicy()) {
+ if (m_frame && m_frame->script().shouldBypassMainWorldContentSecurityPolicy()) {
UseCounter::count(*this, UseCounter::BeforeLoadEventInIsolatedWorld);
} else {
UseCounter::count(*this, UseCounter::BeforeLoadEvent);
@@ -3819,7 +3819,7 @@ void Document::setDomain(const String& newDomain, ExceptionState& es)
if (equalIgnoringCase(domain(), newDomain)) {
securityOrigin()->setDomainFromDOM(newDomain);
if (m_frame)
- m_frame->script()->updateSecurityOrigin();
+ m_frame->script().updateSecurityOrigin();
return;
}
@@ -3849,7 +3849,7 @@ void Document::setDomain(const String& newDomain, ExceptionState& es)
securityOrigin()->setDomainFromDOM(newDomain);
if (m_frame)
- m_frame->script()->updateSecurityOrigin();
+ m_frame->script().updateSecurityOrigin();
}
// http://www.whatwg.org/specs/web-apps/current-work/#dom-document-lastmodified
@@ -4552,7 +4552,7 @@ bool Document::allowInlineEventHandlers(Node* node, EventListener* listener, con
// we also need to ask the owner document of the node.
if (!m_frame)
return false;
- if (!m_frame->script()->canExecuteScripts(NotAboutToExecuteScript))
+ if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript))
return false;
if (node && node->document() != this && !node->document().allowInlineEventHandlers(node, listener, contextURL, contextLine))
return false;
@@ -4569,7 +4569,7 @@ bool Document::allowExecutingScripts(Node* node)
return false;
if (!node->document().frame() && !node->document().import())
return false;
- if (!contextDocument().get()->frame()->script()->canExecuteScripts(AboutToExecuteScript))
+ if (!contextDocument().get()->frame()->script().canExecuteScripts(AboutToExecuteScript))
return false;
return true;
}
@@ -4578,7 +4578,7 @@ void Document::didUpdateSecurityOrigin()
{
if (!m_frame)
return;
- m_frame->script()->updateSecurityOrigin();
+ m_frame->script().updateSecurityOrigin();
}
bool Document::isContextThread() const
« no previous file with comments | « Source/bindings/v8/custom/V8WindowCustom.cpp ('k') | Source/core/dom/ScriptLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698