Commit b61156da authored by andersca@apple.com's avatar andersca@apple.com

Remove ScriptController::updateSecurityOrigin

https://bugs.webkit.org/show_bug.cgi?id=115895

Reviewed by Antti Koivisto.

ScriptController::updateSecurityOrigin is just dead code now that the V8 bindings are gone.

* bindings/js/ScriptController.cpp:
* bindings/js/ScriptController.h:
* dom/Document.cpp:
(WebCore::Document::setIsViewSource):
(WebCore::Document::setDomain):
* dom/Document.h:
(Document):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::enforceSandboxFlags):
* dom/SecurityContext.h:
(SecurityContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149865 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7e9e4116
2013-05-10 Anders Carlsson <andersca@apple.com>
Remove ScriptController::updateSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=115895
Reviewed by Antti Koivisto.
ScriptController::updateSecurityOrigin is just dead code now that the V8 bindings are gone.
* bindings/js/ScriptController.cpp:
* bindings/js/ScriptController.h:
* dom/Document.cpp:
(WebCore::Document::setIsViewSource):
(WebCore::Document::setDomain):
* dom/Document.h:
(Document):
* dom/SecurityContext.cpp:
(WebCore::SecurityContext::enforceSandboxFlags):
* dom/SecurityContext.h:
(SecurityContext):
2013-05-10 Anders Carlsson <andersca@apple.com>
Stop including SecurityOrigin.h where unnecessary
......
......@@ -291,11 +291,6 @@ void ScriptController::updateDocument()
}
}
void ScriptController::updateSecurityOrigin()
{
// Our bindings do not do anything in this case.
}
Bindings::RootObject* ScriptController::cacheableBindingRootObject()
{
if (!canExecuteScripts(NotAboutToExecuteScript))
......
......@@ -129,12 +129,6 @@ public:
void namedItemAdded(HTMLDocument*, const AtomicString&) { }
void namedItemRemoved(HTMLDocument*, const AtomicString&) { }
// Notifies the ScriptController that the securityOrigin of the current
// document was modified. For example, this method is called when
// document.domain is set. This method is *not* called when a new document
// is attached to a frame because updateDocument() is called instead.
void updateSecurityOrigin();
void clearScriptObjects();
void cleanupScriptObjectsForPlugin(void*);
......
......@@ -2000,7 +2000,6 @@ void Document::setIsViewSource(bool isViewSource)
return;
setSecurityOrigin(SecurityOrigin::createUnique());
didUpdateSecurityOrigin();
}
void Document::createStyleResolver()
......@@ -3812,8 +3811,6 @@ void Document::setDomain(const String& newDomain, ExceptionCode& ec)
// have also assigned to access this page.
if (equalIgnoringCase(domain(), newDomain)) {
securityOrigin()->setDomainFromDOM(newDomain);
if (m_frame)
m_frame->script()->updateSecurityOrigin();
return;
}
......@@ -3841,8 +3838,6 @@ void Document::setDomain(const String& newDomain, ExceptionCode& ec)
}
securityOrigin()->setDomainFromDOM(newDomain);
if (m_frame)
m_frame->script()->updateSecurityOrigin();
}
// http://www.whatwg.org/specs/web-apps/current-work/#dom-document-lastmodified
......@@ -4666,13 +4661,6 @@ void Document::initContentSecurityPolicy()
contentSecurityPolicy()->copyStateFrom(m_frame->tree()->parent()->document()->contentSecurityPolicy());
}
void Document::didUpdateSecurityOrigin()
{
if (!m_frame)
return;
m_frame->script()->updateSecurityOrigin();
}
bool Document::isContextThread() const
{
return isMainThread();
......
......@@ -1220,8 +1220,6 @@ public:
protected:
Document(Frame*, const KURL&, unsigned = DefaultDocumentClass);
virtual void didUpdateSecurityOrigin() OVERRIDE;
void clearXMLVersion() { m_xmlVersion = String(); }
private:
......
......@@ -73,15 +73,8 @@ void SecurityContext::enforceSandboxFlags(SandboxFlags mask)
m_sandboxFlags |= mask;
// The SandboxOrigin is stored redundantly in the security origin.
if (isSandboxed(SandboxOrigin) && securityOrigin() && !securityOrigin()->isUnique()) {
if (isSandboxed(SandboxOrigin) && securityOrigin() && !securityOrigin()->isUnique())
setSecurityOrigin(SecurityOrigin::createUnique());
didUpdateSecurityOrigin();
}
}
void SecurityContext::didUpdateSecurityOrigin()
{
// Subclasses can override this function if the need to do extra work when the security origin changes.
}
SandboxFlags SecurityContext::parseSandboxPolicy(const String& policy, String& invalidTokensErrorMessage)
......
......@@ -77,8 +77,6 @@ protected:
SecurityContext();
virtual ~SecurityContext();
virtual void didUpdateSecurityOrigin();
void setContentSecurityPolicy(PassOwnPtr<ContentSecurityPolicy>);
void didFailToInitializeSecurityOrigin() { m_haveInitializedSecurityOrigin = false; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment