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 33344 4c5966ac10c4
parent 33343 54b1c3f11dee
child 33345 7144956c64ee
push id2368
push userclokep@gmail.com
push dateMon, 28 Jan 2019 21:12:50 +0000
treeherdercomm-beta@56d23c07d815 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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) {