Bug 1297314 - Initialize IPC union parameters to void_t for the case when RecvKeywordToURI() returns early. r?evilpie draft
authorTing-Yu Chou <janus926@gmail.com>
Wed, 24 Aug 2016 11:23:56 +0800
changeset 404789 3fa8d87056cc558e8486b890af59fe89022c56ef
parent 404651 bd7645928990649c84609d3f531e803c2d41f269
child 529269 01ba92c9ce036409ebd1534beec5b255e40b1887
push id27299
push userbmo:janus926@gmail.com
push dateWed, 24 Aug 2016 03:53:18 +0000
reviewersevilpie
bugs1297314
milestone51.0a1
Bug 1297314 - Initialize IPC union parameters to void_t for the case when RecvKeywordToURI() returns early. r?evilpie MozReview-Commit-ID: DlrROVhekSF
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -4439,16 +4439,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;