Bug 1297314 - Initialize IPC union parameters to void_t for the case when RecvKeywordToURI() returns early. r=kanru, a=ritu
authorTing-Yu Chou <janus926@gmail.com>
Wed, 24 Aug 2016 11:23:56 +0800
changeset 333023 d73c5a331a0f70ab1cc38a3b85314ef2c85dd2b6
parent 333022 5f59c9c92b8b9ea206975b7b37db483e85513a27
child 333024 27b3a5123d75480bf02b77120425ef94c83ab022
push id9975
push userryanvm@gmail.com
push dateFri, 02 Sep 2016 01:47:46 +0000
treeherdermozilla-aurora@d76058fbf56f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskanru, ritu
bugs1297314
milestone50.0a2
Bug 1297314 - Initialize IPC union parameters to void_t for the case when RecvKeywordToURI() returns early. r=kanru, a=ritu MozReview-Commit-ID: DlrROVhekSF
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -4761,16 +4761,19 @@ ContentParent::RecvRemoveFakeVolume(cons
 }
 
 bool
 ContentParent::RecvKeywordToURI(const nsCString& aKeyword,
                                 nsString* aProviderName,
                                 OptionalInputStreamParams* aPostData,
                                 OptionalURIParams* aURI)
 {
+  *aPostData = void_t();
+  *aURI = void_t();
+
   nsCOMPtr<nsIURIFixup> fixup = do_GetService(NS_URIFIXUP_CONTRACTID);
   if (!fixup) {
     return true;
   }
 
   nsCOMPtr<nsIInputStream> postData;
   nsCOMPtr<nsIURIFixupInfo> info;