diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp index 995daa537d26..30e6b9b81df0 100644 --- a/docshell/base/nsDefaultURIFixup.cpp +++ b/docshell/base/nsDefaultURIFixup.cpp @@ -20,7 +20,7 @@ #include "nsDefaultURIFixup.h" #include "mozilla/Preferences.h" #include "mozilla/dom/ContentChild.h" -#include "mozilla/ipc/InputStreamUtils.h" +#include "mozilla/ipc/IPCStreamUtils.h" #include "mozilla/ipc/URIUtils.h" #include "mozilla/Tokenizer.h" #include "nsIObserverService.h" @@ -432,7 +432,7 @@ nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword, return NS_ERROR_NOT_AVAILABLE; } - ipc::OptionalInputStreamParams postData; + ipc::OptionalIPCStream postData; ipc::OptionalURIParams uri; nsAutoString providerName; if (!contentChild->SendKeywordToURI(keyword, &providerName, &postData, @@ -444,11 +444,8 @@ nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword, info->mKeywordProviderName = providerName; if (aPostData) { - nsTArray fds; - nsCOMPtr temp = DeserializeInputStream(postData, fds); + nsCOMPtr temp = ipc::DeserializeIPCStream(postData); temp.forget(aPostData); - - MOZ_ASSERT(fds.IsEmpty()); } nsCOMPtr temp = DeserializeURI(uri); diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index b0c8f8c674d8..a0ade9525b12 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -71,7 +71,7 @@ #include "mozilla/ipc/FileDescriptorUtils.h" #include "mozilla/ipc/PSendStreamParent.h" #include "mozilla/ipc/TestShellParent.h" -#include "mozilla/ipc/InputStreamUtils.h" +#include "mozilla/ipc/IPCStreamUtils.h" #include "mozilla/jsipc/CrossProcessObjectWrappers.h" #include "mozilla/layers/PAPZParent.h" #include "mozilla/layers/CompositorThread.h" @@ -3903,7 +3903,7 @@ ContentParent::SendPBrowserConstructor(PBrowserParent* aActor, mozilla::ipc::IPCResult ContentParent::RecvKeywordToURI(const nsCString& aKeyword, nsString* aProviderName, - OptionalInputStreamParams* aPostData, + OptionalIPCStream* aPostData, OptionalURIParams* aURI) { *aPostData = void_t(); @@ -3923,9 +3923,9 @@ ContentParent::RecvKeywordToURI(const nsCString& aKeyword, } info->GetKeywordProviderName(*aProviderName); - nsTArray fds; - SerializeInputStream(postData, *aPostData, fds); - MOZ_ASSERT(fds.IsEmpty()); + AutoIPCStream autoStream; + autoStream.Serialize(postData, this); + *aPostData = autoStream.TakeOptionalValue(); nsCOMPtr uri; info->GetPreferredURI(getter_AddRefs(uri)); diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 3e45cc32c4f1..28775f91b0cb 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -996,7 +996,7 @@ private: virtual mozilla::ipc::IPCResult RecvKeywordToURI(const nsCString& aKeyword, nsString* aProviderName, - OptionalInputStreamParams* aPostData, + OptionalIPCStream* aPostData, OptionalURIParams* aURI) override; virtual mozilla::ipc::IPCResult RecvNotifyKeywordSearchLoading(const nsString &aProvider, diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 9d0bcd524612..9b715c16b41e 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -44,7 +44,7 @@ include protocol PVideoDecoderManager; include protocol PFlyWebPublishedServer; include DOMTypes; include JavaScriptTypes; -include InputStreamParams; +include IPCStream; include PTabContext; include URIParams; include PluginTypes; @@ -817,7 +817,7 @@ parent: async AudioChannelChangeDefVolChannel(int32_t aChannel, bool aHidden); sync KeywordToURI(nsCString keyword) - returns (nsString providerName, OptionalInputStreamParams postData, OptionalURIParams uri); + returns (nsString providerName, OptionalIPCStream postData, OptionalURIParams uri); sync NotifyKeywordSearchLoading(nsString providerName, nsString keyword);