Bug 1495184 - Port 1493563: Adapt to API changes in nsIWebProgressListener.onSecurityChange(), JS part. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Sat, 29 Sep 2018 10:50:34 +0200
changeset 33270 759a21c4e0f95f324a865735ca7d1a84039cba53
parent 33269 17f0a541d7acf332ba8c503025277932d3b9936b
child 33271 f1d5e317265924cd927819b3eb5b2a27b57b0cd1
push id387
push userclokep@gmail.com
push dateMon, 10 Dec 2018 21:30:47 +0000
reviewersbustage-fix
bugs1495184, 1493563
Bug 1495184 - Port 1493563: Adapt to API changes in nsIWebProgressListener.onSecurityChange(), JS part. rs=bustage-fix
calendar/providers/gdata/content/browserRequest.js
chat/content/browserRequest.js
editor/ui/composer/content/ComposerCommands.js
mail/base/content/browserRequest.js
mail/base/content/specialTabs.js
mail/components/compose/content/MsgComposeCommands.js
mailnews/addrbook/prefs/content/pref-directory-add.js
mailnews/base/content/shutdownWindow.js
mailnews/compose/content/sendProgress.js
--- a/calendar/providers/gdata/content/browserRequest.js
+++ b/calendar/providers/gdata/content/browserRequest.js
@@ -29,17 +29,17 @@ var reporterListener = {
 
     onLocationChange: function(aWebProgress, aRequest, aLocation) {
         document.getElementById("headerMessage").textContent = aLocation.spec;
     },
 
     onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
     },
 
-    onSecurityChange: function(aWebProgress, aRequest, aState) {
+    onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {
         const wpl_security_bits = wpl.STATE_IS_SECURE |
                                     wpl.STATE_IS_BROKEN |
                                     wpl.STATE_IS_INSECURE |
                                     wpl.STATE_SECURE_HIGH |
                                     wpl.STATE_SECURE_MED |
                                     wpl.STATE_SECURE_LOW;
         let browser = document.getElementById("requestFrame");
         let level;
--- a/chat/content/browserRequest.js
+++ b/chat/content/browserRequest.js
@@ -66,17 +66,19 @@ var reporterListener = {
   onStatusChange: function(/*in nsIWebProgress*/ aWebProgress,
                       /*in nsIRequest*/ aRequest,
                       /*in nsresult*/ aStatus,
                       /*in wstring*/ aMessage) {
   },
 
   onSecurityChange: function(/*in nsIWebProgress*/ aWebProgress,
                         /*in nsIRequest*/ aRequest,
-                        /*in unsigned long*/ aState) {
+                        /*in unsigned long*/ aOldState,
+                        /*in unsigned long*/ aState,
+                        /*in AString*/ aContentBlockingLogJSON) {
     const wpl_security_bits = wpl.STATE_IS_SECURE |
                               wpl.STATE_IS_BROKEN |
                               wpl.STATE_IS_INSECURE |
                               wpl.STATE_SECURE_HIGH |
                               wpl.STATE_SECURE_MED |
                               wpl.STATE_SECURE_LOW;
     let browser = document.getElementById("requestFrame");
     let level;
--- a/editor/ui/composer/content/ComposerCommands.js
+++ b/editor/ui/composer/content/ComposerCommands.js
@@ -1279,17 +1279,17 @@ var gEditorOutputProgressListener =
         else if (gPersistObj.currentState == gPersistObj.PERSIST_STATE_SAVING)
           dump(" Persister is saving data.\n\n");
         else if (gPersistObj.currentState == gPersistObj.PERSIST_STATE_FINISHED)
           dump(" PERSISTER HAS FINISHED SAVING DATA\n\n\n");
       }
     }
   },
 
-  onSecurityChange : function(aWebProgress, aRequest, state)
+  onSecurityChange : function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON)
   {
     if (gShowDebugOutputSecurityChange)
     {
       try {
         var channel = aRequest.QueryInterface(nsIChannel);
         dump("***** onSecurityChange request: " + channel.URI.spec + "\n");
       } catch (e) {}
     }
--- a/mail/base/content/browserRequest.js
+++ b/mail/base/content/browserRequest.js
@@ -37,17 +37,19 @@ var reporterListener = {
   onStatusChange: function(/*in nsIWebProgress*/ aWebProgress,
                       /*in nsIRequest*/ aRequest,
                       /*in nsresult*/ aStatus,
                       /*in wstring*/ aMessage) {
   },
 
   onSecurityChange: function(/*in nsIWebProgress*/ aWebProgress,
                         /*in nsIRequest*/ aRequest,
-                        /*in unsigned long*/ aState) {
+                        /*in unsigned long*/ aOldState,
+                        /*in unsigned long*/ aState,
+                        /*in AString*/ aContentBlockingLogJSON) {
     const wpl_security_bits = wpl.STATE_IS_SECURE |
                               wpl.STATE_IS_BROKEN |
                               wpl.STATE_IS_INSECURE |
                               wpl.STATE_SECURE_HIGH |
                               wpl.STATE_SECURE_MED |
                               wpl.STATE_SECURE_LOW;
     var browser = document.getElementById("requestFrame");
     var level;
--- a/mail/base/content/specialTabs.js
+++ b/mail/base/content/specialTabs.js
@@ -140,19 +140,19 @@ tabProgressListener.prototype =
   },
   onStatusChange: function tPL_onStatusChange(aWebProgress, aRequest, aStatus,
                                               aMessage) {
     if (this.mProgressListener)
       this.mProgressListener.onStatusChange(aWebProgress, aRequest, aStatus,
         aMessage);
   },
   onSecurityChange: function tPL_onSecurityChange(aWebProgress, aRequest,
-                                                  aState) {
+                                                  aOldState, aState, aContentBlockingLogJSON) {
     if (this.mProgressListener)
-      this.mProgressListener.onSecurityChange(aWebProgress, aRequest, aState);
+      this.mProgressListener.onSecurityChange(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON);
   },
   onRefreshAttempted: function tPL_OnRefreshAttempted(aWebProgress, aURI,
                                                       aDelay, aSameURI) {
     if (this.mProgressListener)
       this.mProgressListener.onRefreshAttempted(aWebProgress, aURI, aDelay,
         aSameURI);
   },
   QueryInterface: ChromeUtils.generateQI([Ci.nsIWebProgressListener,
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -590,17 +590,17 @@ var progressListener = {
     // therefore we need to protect ourself by using try/catch
     try {
       let statusText = document.getElementById("statusText");
       if (statusText)
         statusText.setAttribute("label", aMessage);
     } catch (ex) {}
   },
 
-  onSecurityChange(aWebProgress, aRequest, state) {
+  onSecurityChange(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {
     // we can ignore this notification
   },
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 var defaultController = {
--- a/mailnews/addrbook/prefs/content/pref-directory-add.js
+++ b/mailnews/addrbook/prefs/content/pref-directory-add.js
@@ -110,17 +110,17 @@ var progressListener = {
                                                                 [aCurSelfProgress]);
   },
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags)
   {
   },
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
   {
   },
-  onSecurityChange: function(aWebProgress, aRequest, state)
+  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON)
   {
   },
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 function DownloadNow()
 {
--- a/mailnews/base/content/shutdownWindow.js
+++ b/mailnews/base/content/shutdownWindow.js
@@ -77,16 +77,16 @@ nsMsgShutdownTaskListener.prototype =
   },
 
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
   {
     if (aMessage)
       updateProgressLabel(aMessage);
   },
 
-  onSecurityChange: function(aWebProgress, aRequest, state)
+  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON)
   {
     // we can ignore this notification
   }
 }
 
 var MsgShutdownTaskListener = new nsMsgShutdownTaskListener();
 
--- a/mailnews/compose/content/sendProgress.js
+++ b/mailnews/compose/content/sendProgress.js
@@ -80,17 +80,17 @@ var progressListener = {
     },
 
     onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
     {
       if (aMessage != "")
         dialog.status.setAttribute("value", aMessage);
     },
 
-    onSecurityChange: function(aWebProgress, aRequest, state)
+    onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON)
     {
       // we can ignore this notification
     },
 
     QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                             "nsISupportsWeakReference"]),
 };