FrameLoader::mixedContentChecker() should return a reference.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Sep 2013 08:15:27 +0000 (08:15 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 8 Sep 2013 08:15:27 +0000 (08:15 +0000)
<https://webkit.org/b/120992>

Reviewed by Antti Koivisto.

This function was already just returning the address of a member variable.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155288 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/FrameLoader.h
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp

index b8743ae..9ad5d2c 100644 (file)
@@ -1,3 +1,12 @@
+2013-09-08  Andreas Kling  <akling@apple.com>
+
+        FrameLoader::mixedContentChecker() should return a reference.
+        <https://webkit.org/b/120992>
+
+        Reviewed by Antti Koivisto.
+
+        This function was already just returning the address of a member variable.
+
 2013-09-07  Antti Koivisto  <antti@apple.com>
 
         Separate forward and backward paths in ComposedShadowTreeWalker
index 42f6176..d0c0345 100644 (file)
@@ -507,7 +507,7 @@ void DocumentLoader::willSendRequest(ResourceRequest& newRequest, const Resource
 
     Frame* top = m_frame->tree().top();
     if (top != m_frame) {
-        if (!frameLoader()->mixedContentChecker()->canDisplayInsecureContent(top->document()->securityOrigin(), newRequest.url())) {
+        if (!frameLoader()->mixedContentChecker().canDisplayInsecureContent(top->document()->securityOrigin(), newRequest.url())) {
             cancelMainResourceLoad(frameLoader()->cancelledError(newRequest));
             return;
         }
index 63bea1b..a441319 100644 (file)
@@ -97,7 +97,7 @@ public:
     ResourceLoadNotifier* notifier() const { return &m_notifer; }
     SubframeLoader& subframeLoader() const { return *m_subframeLoader; }
     IconController* icon() const { return m_icon.get(); }
-    MixedContentChecker* mixedContentChecker() const { return &m_mixedContentChecker; }
+    MixedContentChecker& mixedContentChecker() const { return m_mixedContentChecker; }
 
     void prepareForHistoryNavigation();
     void setupForReplace();
index 6c15550..4559d27 100644 (file)
@@ -134,7 +134,7 @@ bool SubframeLoader::pluginIsLoadable(HTMLPlugInImageElement* pluginElement, con
             return false;
         }
 
-        if (!m_frame->loader().mixedContentChecker()->canRunInsecureContent(document()->securityOrigin(), url))
+        if (!m_frame->loader().mixedContentChecker().canRunInsecureContent(document()->securityOrigin(), url))
             return false;
     }
 
@@ -263,7 +263,7 @@ PassRefPtr<Widget> SubframeLoader::loadMediaPlayerProxyPlugin(Node* node, const
     else if (mediaElement->isVideo())
         size = RenderVideo::defaultSize();
 
-    if (!m_frame->loader().mixedContentChecker()->canRunInsecureContent(m_frame->document()->securityOrigin(), completedURL))
+    if (!m_frame->loader().mixedContentChecker().canRunInsecureContent(m_frame->document()->securityOrigin(), completedURL))
         return 0;
 
     RefPtr<Widget> widget = m_frame->loader().client().createMediaPlayerProxyPlugin(size, mediaElement, completedURL,
index 18348fa..8ca1508 100644 (file)
@@ -272,7 +272,7 @@ bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
         // These resource can inject script into the current document (Script,
         // XSL) or exfiltrate the content of the current document (CSS).
         if (Frame* f = frame())
-            if (!f->loader().mixedContentChecker()->canRunInsecureContent(m_document->securityOrigin(), url))
+            if (!f->loader().mixedContentChecker().canRunInsecureContent(m_document->securityOrigin(), url))
                 return false;
         break;
 #if ENABLE(VIDEO_TRACK)
@@ -287,7 +287,7 @@ bool CachedResourceLoader::checkInsecureContent(CachedResource::Type type, const
         // These resources can corrupt only the frame's pixels.
         if (Frame* f = frame()) {
             Frame* top = f->tree().top();
-            if (!top->loader().mixedContentChecker()->canDisplayInsecureContent(top->document()->securityOrigin(), url))
+            if (!top->loader().mixedContentChecker().canDisplayInsecureContent(top->document()->securityOrigin(), url))
                 return false;
         }
         break;