Bug 1046645 - Mark moz-page-thumb:// as local resources to prevent mixed content warnings f=Mardak r=gavin a=lmandel
authorTim Taubert <ttaubert@mozilla.com>
Thu, 28 Aug 2014 11:26:35 +0200
changeset 216688 e0b583b1210e
parent 216683 fcf16a67fed4
child 216689 337d96ca1194
push id3877
push userttaubert@mozilla.com
push date2014-09-09 10:01 +0000
treeherdermozilla-beta@e0b583b1210e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, lmandel
bugs1046645
milestone33.0
Bug 1046645 - Mark moz-page-thumb:// as local resources to prevent mixed content warnings f=Mardak r=gavin a=lmandel Mixed content warnings on valid https pages may sometimes occur when a thumbnail on about:newtab is refreshed while we're already transitioning to the new web page. The "insecure" request is counted as a subresource request towards the newly started load. If the new target is a https page this may result in a mixed content warning because nsSecureBrowserUI is dumb and can't tell the requests of the current and previous page loads apart.
toolkit/components/thumbnails/PageThumbsProtocol.js
--- a/toolkit/components/thumbnails/PageThumbsProtocol.js
+++ b/toolkit/components/thumbnails/PageThumbsProtocol.js
@@ -47,16 +47,17 @@ Protocol.prototype = {
    */
   get defaultPort() -1,
 
   /**
    * The flags specific to this protocol implementation.
    */
   get protocolFlags() {
     return Ci.nsIProtocolHandler.URI_DANGEROUS_TO_LOAD |
+           Ci.nsIProtocolHandler.URI_IS_LOCAL_RESOURCE |
            Ci.nsIProtocolHandler.URI_NORELATIVE |
            Ci.nsIProtocolHandler.URI_NOAUTH;
   },
 
   /**
    * Creates a new URI object that is suitable for loading by this protocol.
    * @param aSpec The URI string in UTF8 encoding.
    * @param aOriginCharset The charset of the document from which the URI originated.