Bug 1512081 - Backed out 4 changesets from bug 1495184. a=backout
authorJorg K <jorgk@jorgk.com>
Tue, 04 Dec 2018 23:26:35 +0100
changeset 33848 c454b0a4b6f3a058822ba8133c079ed0313d31b8
parent 33847 c8d0feb240c6716537d6c0a6369bbc9f1246f671
child 33849 dc28b75394da57d8a5601382e3e6a4bda010007f
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersbackout
bugs1512081, 1495184
Bug 1512081 - Backed out 4 changesets from bug 1495184. a=backout Backed out changeset 93d3584af75b (bug 1495184) Backed out changeset ae62e27f1265 (bug 1495184) Backed out changeset 17f0a541d7ac (bug 1495184) Backed out changeset 759a21c4e0f9 (bug 1495184)
calendar/providers/gdata/content/browserRequest.js
chat/content/browserRequest.js
chat/content/convbrowser.xml
editor/ui/composer/content/ComposerCommands.js
mail/base/content/browserRequest.js
mail/base/content/specialTabs.js
mail/base/content/tabmail.xml
mail/components/compose/content/MsgComposeCommands.js
mailnews/addrbook/prefs/content/pref-directory-add.js
mailnews/base/content/shutdownWindow.js
mailnews/base/src/nsMsgContentPolicy.cpp
mailnews/base/src/nsMsgPrintEngine.cpp
mailnews/base/src/nsMsgProgress.cpp
mailnews/base/src/nsMsgStatusFeedback.cpp
mailnews/compose/content/sendProgress.js
mailnews/compose/src/nsMsgCompose.cpp
mailnews/compose/src/nsURLFetcher.cpp
mailnews/compose/test/unit/head_compose.js
mailnews/compose/test/unit/test_temporaryFilesRemoved.js
mailnews/imap/test/unit/test_offlineDraftDataloss.js
mailnews/imap/test/unit/test_saveImapDraft.js
--- a/calendar/providers/gdata/content/browserRequest.js
+++ b/calendar/providers/gdata/content/browserRequest.js
@@ -29,31 +29,27 @@ var reporterListener = {
 
     onLocationChange: function(aWebProgress, aRequest, aLocation) {
         document.getElementById("headerMessage").textContent = aLocation.spec;
     },
 
     onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {
     },
 
-    onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {
-        // Before mozilla64 this function had three parameters, aState being the third one.
-        // From mozilla64 the function has five parameters.
-        // Once support for versions below 64 is dropped, this workaround can be removed.
-        let state = typeof aState === "undefined" ? aOldState : aState;
+    onSecurityChange: function(aWebProgress, aRequest, aState) {
         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;
 
-        switch (state & wpl_security_bits) {
+        switch (aState & wpl_security_bits) {
             case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_HIGH:
                 level = "high";
                 break;
             case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_MED:
             case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_LOW:
                 level = "low";
                 break;
             case wpl.STATE_IS_BROKEN:
--- a/chat/content/browserRequest.js
+++ b/chat/content/browserRequest.js
@@ -66,19 +66,17 @@ 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*/ aOldState,
-                        /*in unsigned long*/ aState,
-                        /*in AString*/ aContentBlockingLogJSON) {
+                        /*in unsigned long*/ aState) {
     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/convbrowser.xml
+++ b/chat/content/convbrowser.xml
@@ -994,19 +994,17 @@
         <parameter name="aRequest"/>
         <parameter name="aStatus"/>
         <parameter name="aMessage"/>
       </method>
 
       <method name="onSecurityChange">
         <parameter name="aProgress"/>
         <parameter name="aRequest"/>
-        <parameter name="aOldState"/>
         <parameter name="aState"/>
-        <parameter name="aContentBlockingLogJSON"/>
       </method>
 
 
       <!-- autoscroll stuff -->
       <field name="_AUTOSCROLL_SPEED">3</field>
       <field name="_AUTOSCROLL_SNAP">10</field>
       <field name="_scrollingView">null</field>
       <field name="_autoScrollTimer">null</field>
--- 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, aOldState, aState, aContentBlockingLogJSON)
+  onSecurityChange : function(aWebProgress, aRequest, state)
   {
     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,19 +37,17 @@ var reporterListener = {
   onStatusChange(/* in nsIWebProgress*/ aWebProgress,
                  /* in nsIRequest*/ aRequest,
                  /* in nsresult*/ aStatus,
                  /* in wstring*/ aMessage) {
   },
 
   onSecurityChange(/* in nsIWebProgress*/ aWebProgress,
                    /* in nsIRequest*/ aRequest,
-                   /* in unsigned long*/ aOldState,
-                   /* in unsigned long*/ aState,
-                   /* in AString*/ aContentBlockingLogJSON) {
+                   /* in unsigned long*/ aState) {
     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
@@ -134,19 +134,19 @@ tabProgressListener.prototype = {
         specialTabs.useDefaultIcon(this.mTab);
     }
   },
   onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
     if (this.mProgressListener)
       this.mProgressListener.onStatusChange(aWebProgress, aRequest, aStatus,
         aMessage);
   },
-  onSecurityChange(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {
+  onSecurityChange(aWebProgress, aRequest, aState) {
     if (this.mProgressListener)
-      this.mProgressListener.onSecurityChange(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON);
+      this.mProgressListener.onSecurityChange(aWebProgress, aRequest, aState);
 
     const wpl = Ci.nsIWebProgressListener;
     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;
--- a/mail/base/content/tabmail.xml
+++ b/mail/base/content/tabmail.xml
@@ -1758,19 +1758,17 @@
                                     .sameTypeRootTreeItem
                                     .chromeEventHandler;
           this._callTabListeners("onStatusChange", [browser, ...arguments]);
         ]]></body>
       </method>
       <method name="onSecurityChange">
         <parameter name="aWebProgress"/>
         <parameter name="aRequest"/>
-        <parameter name="aOldState"/>
         <parameter name="aState"/>
-        <parameter name="aContentBlockingLogJSON"/>
         <body><![CDATA[
           let browser = aWebProgress.QueryInterface(Ci.nsIDocShellTreeItem)
                                     .sameTypeRootTreeItem
                                     .chromeEventHandler;
           this._callTabListeners("onSecurityChange", [browser, ...arguments]);
         ]]></body>
       </method>
       <method name="onRefreshAttempted">
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -587,17 +587,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, aOldState, aState, aContentBlockingLogJSON) {
+  onSecurityChange(aWebProgress, aRequest, state) {
     // 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, aOldState, aState, aContentBlockingLogJSON)
+  onSecurityChange: function(aWebProgress, aRequest, state)
   {
   },
   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, aOldState, aState, aContentBlockingLogJSON)
+  onSecurityChange: function(aWebProgress, aRequest, state)
   {
     // we can ignore this notification
   }
 }
 
 var MsgShutdownTaskListener = new nsMsgShutdownTaskListener();
 
--- a/mailnews/base/src/nsMsgContentPolicy.cpp
+++ b/mailnews/base/src/nsMsgContentPolicy.cpp
@@ -1044,20 +1044,17 @@ nsMsgContentPolicy::OnStatusChange(nsIWe
                                    nsIRequest *aRequest, nsresult aStatus,
                                    const char16_t *aMessage)
 {
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgContentPolicy::OnSecurityChange(nsIWebProgress *aWebProgress,
-                                     nsIRequest *aRequest,
-                                     uint32_t aOldState,
-                                     uint32_t aState,
-                                     const nsAString& aContentBlockingLogJSON)
+                                     nsIRequest *aRequest, uint32_t aState)
 {
   return NS_OK;
 }
 
 /**
  * Implementation of nsIMsgContentPolicy
  *
  */
--- a/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -201,19 +201,17 @@ nsMsgPrintEngine::OnStatusChange(nsIWebP
 {
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsMsgPrintEngine::OnSecurityChange(nsIWebProgress *aWebProgress,
                                    nsIRequest *aRequest,
-                                   uint32_t aOldState,
-                                   uint32_t aState,
-                                   const nsAString& aContentBlockingLogJSON)
+                                   uint32_t state)
 {
     MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
     return NS_OK;
 }
 
 NS_IMETHODIMP
 nsMsgPrintEngine::SetWindow(mozIDOMWindowProxy *aWin)
 {
--- a/mailnews/base/src/nsMsgProgress.cpp
+++ b/mailnews/base/src/nsMsgProgress.cpp
@@ -172,19 +172,17 @@ NS_IMETHODIMP nsMsgProgress::OnStatusCha
   if (aMessage && *aMessage)
     m_pendingStatus = aMessage;
   for (int32_t i = m_listenerList.Count() - 1; i >= 0; i --)
     m_listenerList[i]->OnStatusChange(aWebProgress, aRequest, aStatus, aMessage);
   return NS_OK;
 }
 
 /* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
-NS_IMETHODIMP nsMsgProgress::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
-                                              uint32_t aOldState, uint32_t aState,
-                                              const nsAString& aContentBlockingLogJSON)
+NS_IMETHODIMP nsMsgProgress::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state)
 {
   return NS_OK;
 }
 
 nsresult nsMsgProgress::ReleaseListeners()
 {
   m_listenerList.Clear();
   return NS_OK;
--- a/mailnews/base/src/nsMsgStatusFeedback.cpp
+++ b/mailnews/base/src/nsMsgStatusFeedback.cpp
@@ -161,20 +161,18 @@ nsMsgStatusFeedback::OnStatusChange(nsIW
                                     const char16_t* aMessage)
 {
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsMsgStatusFeedback::OnSecurityChange(nsIWebProgress *aWebProgress,
-                                      nsIRequest *aRequest,
-                                      uint32_t aOldState,
-                                      uint32_t aState,
-                                      const nsAString& aContentBlockingLogJSON)
+                                    nsIRequest *aRequest,
+                                    uint32_t state)
 {
     return NS_OK;
 }
 
 
 NS_IMETHODIMP
 nsMsgStatusFeedback::ShowStatusString(const nsAString& aStatus)
 {
--- a/mailnews/compose/content/sendProgress.js
+++ b/mailnews/compose/content/sendProgress.js
@@ -75,17 +75,17 @@ var progressListener = {
     },
 
     onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage)
     {
       if (aMessage != "")
         dialog.status.setAttribute("value", aMessage);
     },
 
-    onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON)
+    onSecurityChange: function(aWebProgress, aRequest, state)
     {
       // we can ignore this notification
     },
 
     QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                             "nsISupportsWeakReference"]),
 };
 
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -4085,37 +4085,40 @@ NS_IMETHODIMP nsMsgComposeSendListener::
       msgCompose->GetMessageSend(getter_AddRefs(msgSend));
       if (msgSend)
         msgSend->Abort();
     }
   }
   return NS_OK;
 }
 
+/* void onProgressChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long aCurSelfProgress, in long aMaxSelfProgress, in long aCurTotalProgress, in long aMaxTotalProgress); */
 NS_IMETHODIMP nsMsgComposeSendListener::OnProgressChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, int32_t aCurSelfProgress, int32_t aMaxSelfProgress, int32_t aCurTotalProgress, int32_t aMaxTotalProgress)
 {
   /* Ignore this call */
   return NS_OK;
 }
 
+/* void onLocationChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsIURI location, in unsigned long aFlags); */
 NS_IMETHODIMP nsMsgComposeSendListener::OnLocationChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsIURI *location, uint32_t aFlags)
 {
   /* Ignore this call */
   return NS_OK;
 }
 
+/* void onStatusChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in nsresult aStatus, in wstring aMessage); */
 NS_IMETHODIMP nsMsgComposeSendListener::OnStatusChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, nsresult aStatus, const char16_t *aMessage)
 {
   /* Ignore this call */
   return NS_OK;
 }
 
-NS_IMETHODIMP nsMsgComposeSendListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest,
-                                                         uint32_t aOldState, uint32_t aState,
-                                                         const nsAString& aContentBlockingLogJSON) {
+/* void onSecurityChange (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in unsigned long state); */
+NS_IMETHODIMP nsMsgComposeSendListener::OnSecurityChange(nsIWebProgress *aWebProgress, nsIRequest *aRequest, uint32_t state)
+{
   /* Ignore this call */
   return NS_OK;
 }
 
 nsresult
 nsMsgCompose::ConvertHTMLToText(nsIFile *aSigFile, nsString &aSigData)
 {
   nsAutoString origBuf;
--- a/mailnews/compose/src/nsURLFetcher.cpp
+++ b/mailnews/compose/src/nsURLFetcher.cpp
@@ -394,19 +394,17 @@ nsURLFetcher::OnStatusChange(nsIWebProgr
 {
   MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsURLFetcher::OnSecurityChange(nsIWebProgress *aWebProgress,
                                nsIRequest *aRequest,
-                               uint32_t aOldState,
-                               uint32_t aState,
-                               const nsAString& aContentBlockingLogJSON)
+                               uint32_t state)
 {
   MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
   return NS_OK;
 }
 
 
 /**
  * Stream consumer used for handling special content type like multipart/x-mixed-replace
--- a/mailnews/compose/test/unit/head_compose.js
+++ b/mailnews/compose/test/unit/head_compose.js
@@ -101,17 +101,17 @@ var progressListener = {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
       this.resolve(mailTestUtils.firstMsgHdr(gDraftFolder));
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress,
     aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {},
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
-  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {},
+  onSecurityChange: function(aWebProgress, aRequest, state) {},
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 function createMessage(aAttachment) {
   let fields = Cc["@mozilla.org/messengercompose/composefields;1"]
                  .createInstance(Ci.nsIMsgCompFields);
--- a/mailnews/compose/test/unit/test_temporaryFilesRemoved.js
+++ b/mailnews/compose/test/unit/test_temporaryFilesRemoved.js
@@ -15,17 +15,17 @@ var progressListener = {
   onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus) {
     if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
       do_timeout(0, check_result);
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {},
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
-  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {},
+  onSecurityChange: function(aWebProgress, aRequest, state) {},
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 function get_temporary_files_for(name) {
   let file = Services.dirsvc.get("TmpD", Ci.nsIFile);
   file.append(name);
--- a/mailnews/imap/test/unit/test_offlineDraftDataloss.js
+++ b/mailnews/imap/test/unit/test_offlineDraftDataloss.js
@@ -163,17 +163,17 @@ var progressListener = {
     }
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress,
                              aMaxSelfProgress, aCurTotalProgress,
                              aMaxTotalProgress) {},
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
-  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {},
+  onSecurityChange: function(aWebProgress, aRequest, state) {},
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 /*
  * helper functions
  */
--- a/mailnews/imap/test/unit/test_saveImapDraft.js
+++ b/mailnews/imap/test/unit/test_saveImapDraft.js
@@ -130,17 +130,17 @@ var progressListener = {
       dl('onStateChange');
       async_driver();
     }
   },
 
   onProgressChange: function(aWebProgress, aRequest, aCurSelfProgress, aMaxSelfProgress, aCurTotalProgress, aMaxTotalProgress) {},
   onLocationChange: function(aWebProgress, aRequest, aLocation, aFlags) {},
   onStatusChange: function(aWebProgress, aRequest, aStatus, aMessage) {},
-  onSecurityChange: function(aWebProgress, aRequest, aOldState, aState, aContentBlockingLogJSON) {},
+  onSecurityChange: function(aWebProgress, aRequest, state) {},
 
   QueryInterface: ChromeUtils.generateQI(["nsIWebProgressListener",
                                           "nsISupportsWeakReference"]),
 };
 
 /*
  * helper functions
  */