Bug 1520040 - Port bug 1486521: Add MOZ_CAN_RUN_SCRIPT to two functions in nsMsgComposeService.cpp. rs=bustage-fix
authorJorg K <jorgk@jorgk.com>
Tue, 15 Jan 2019 01:11:32 +0100
changeset 34198 4c5966ac10c42244bb46dadbddf9135d5155edaf
parent 34197 54b1c3f11deed0f6d3e0053e954dd346504de8a6
child 34199 7144956c64ee446af66d70d9bc461c7d1cff46cc
push id389
push userclokep@gmail.com
push dateMon, 18 Mar 2019 19:01:53 +0000
reviewersbustage-fix
bugs1520040, 1486521
Bug 1520040 - Port bug 1486521: Add MOZ_CAN_RUN_SCRIPT to two functions in nsMsgComposeService.cpp. rs=bustage-fix
mailnews/compose/src/nsMsgComposeService.cpp
--- a/mailnews/compose/src/nsMsgComposeService.cpp
+++ b/mailnews/compose/src/nsMsgComposeService.cpp
@@ -235,17 +235,17 @@ nsMsgComposeService::DetermineComposeHTM
         }
       }
       break;
   }
 
   return NS_OK;
 }
 
-nsresult
+MOZ_CAN_RUN_SCRIPT nsresult
 nsMsgComposeService::GetOrigWindowSelection(MSG_ComposeType type, nsIMsgWindow *aMsgWindow, nsACString& aSelHTML)
 {
   nsresult rv;
 
   // Good hygiene
   aSelHTML.Truncate();
 
   // Get the pref to see if we even should do reply quoting selection
@@ -353,17 +353,17 @@ nsMsgComposeService::GetOrigWindowSelect
     spanInd = html.Find("<span class=\"moz-txt-citetags\">");
   }
 
   aSelHTML.Assign(html);
 
   return rv;
 }
 
-NS_IMETHODIMP
+MOZ_CAN_RUN_SCRIPT NS_IMETHODIMP
 nsMsgComposeService::OpenComposeWindow(const char *msgComposeWindowURL, nsIMsgDBHdr *origMsgHdr, const char *originalMsgURI,
   MSG_ComposeType type, MSG_ComposeFormat format, nsIMsgIdentity * aIdentity, nsIMsgWindow *aMsgWindow)
 {
   nsresult rv;
 
   // Check for any reply type that wants to ignore the quote.
   bool ignoreQuote = false;
   if (type >= nsIMsgCompType::ReplyIgnoreQuote) {