Title: [149865] trunk/Source/WebCore
Revision
149865
Author
[email protected]
Date
2013-05-10 04:18:10 -0700 (Fri, 10 May 2013)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (149864 => 149865)


--- trunk/Source/WebCore/ChangeLog	2013-05-10 11:12:41 UTC (rev 149864)
+++ trunk/Source/WebCore/ChangeLog	2013-05-10 11:18:10 UTC (rev 149865)
@@ -1,5 +1,26 @@
 2013-05-10  Anders Carlsson  <[email protected]>
 
+        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  <[email protected]>
+
         Stop including SecurityOrigin.h where unnecessary
         https://bugs.webkit.org/show_bug.cgi?id=115897
 

Modified: trunk/Source/WebCore/bindings/js/ScriptController.cpp (149864 => 149865)


--- trunk/Source/WebCore/bindings/js/ScriptController.cpp	2013-05-10 11:12:41 UTC (rev 149864)
+++ trunk/Source/WebCore/bindings/js/ScriptController.cpp	2013-05-10 11:18:10 UTC (rev 149865)
@@ -291,11 +291,6 @@
     }
 }
 
-void ScriptController::updateSecurityOrigin()
-{
-    // Our bindings do not do anything in this case.
-}
-
 Bindings::RootObject* ScriptController::cacheableBindingRootObject()
 {
     if (!canExecuteScripts(NotAboutToExecuteScript))

Modified: trunk/Source/WebCore/bindings/js/ScriptController.h (149864 => 149865)


--- trunk/Source/WebCore/bindings/js/ScriptController.h	2013-05-10 11:12:41 UTC (rev 149864)
+++ trunk/Source/WebCore/bindings/js/ScriptController.h	2013-05-10 11:18:10 UTC (rev 149865)
@@ -129,12 +129,6 @@
     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*);
 

Modified: trunk/Source/WebCore/dom/Document.cpp (149864 => 149865)


--- trunk/Source/WebCore/dom/Document.cpp	2013-05-10 11:12:41 UTC (rev 149864)
+++ trunk/Source/WebCore/dom/Document.cpp	2013-05-10 11:18:10 UTC (rev 149865)
@@ -2000,7 +2000,6 @@
         return;
 
     setSecurityOrigin(SecurityOrigin::createUnique());
-    didUpdateSecurityOrigin();
 }
 
 void Document::createStyleResolver()
@@ -3812,8 +3811,6 @@
     // 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 @@
     }
 
     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 @@
     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();

Modified: trunk/Source/WebCore/dom/Document.h (149864 => 149865)


--- trunk/Source/WebCore/dom/Document.h	2013-05-10 11:12:41 UTC (rev 149864)
+++ trunk/Source/WebCore/dom/Document.h	2013-05-10 11:18:10 UTC (rev 149865)
@@ -1220,8 +1220,6 @@
 protected:
     Document(Frame*, const KURL&, unsigned = DefaultDocumentClass);
 
-    virtual void didUpdateSecurityOrigin() OVERRIDE;
-
     void clearXMLVersion() { m_xmlVersion = String(); }
 
 private:

Modified: trunk/Source/WebCore/dom/SecurityContext.cpp (149864 => 149865)


--- trunk/Source/WebCore/dom/SecurityContext.cpp	2013-05-10 11:12:41 UTC (rev 149864)
+++ trunk/Source/WebCore/dom/SecurityContext.cpp	2013-05-10 11:18:10 UTC (rev 149865)
@@ -73,17 +73,10 @@
     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)
 {
     // http://www.w3.org/TR/html5/the-iframe-element.html#attr-iframe-sandbox

Modified: trunk/Source/WebCore/dom/SecurityContext.h (149864 => 149865)


--- trunk/Source/WebCore/dom/SecurityContext.h	2013-05-10 11:12:41 UTC (rev 149864)
+++ trunk/Source/WebCore/dom/SecurityContext.h	2013-05-10 11:18:10 UTC (rev 149865)
@@ -77,8 +77,6 @@
     SecurityContext();
     virtual ~SecurityContext();
 
-    virtual void didUpdateSecurityOrigin();
-
     void setContentSecurityPolicy(PassOwnPtr<ContentSecurityPolicy>);
 
     void didFailToInitializeSecurityOrigin() { m_haveInitializedSecurityOrigin = false; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to