Bug 1339713 - Use IPCStream everywhere - part 5 - PContent, r=smaug

This commit is contained in:
Andrea Marchesini 2017-03-09 14:10:49 +01:00
Родитель 5074a53881
Коммит 2c988363eb
4 изменённых файлов: 11 добавлений и 14 удалений

Просмотреть файл

@ -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<ipc::FileDescriptor> fds;
nsCOMPtr<nsIInputStream> temp = DeserializeInputStream(postData, fds);
nsCOMPtr<nsIInputStream> temp = ipc::DeserializeIPCStream(postData);
temp.forget(aPostData);
MOZ_ASSERT(fds.IsEmpty());
}
nsCOMPtr<nsIURI> temp = DeserializeURI(uri);

Просмотреть файл

@ -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<mozilla::ipc::FileDescriptor> fds;
SerializeInputStream(postData, *aPostData, fds);
MOZ_ASSERT(fds.IsEmpty());
AutoIPCStream autoStream;
autoStream.Serialize(postData, this);
*aPostData = autoStream.TakeOptionalValue();
nsCOMPtr<nsIURI> uri;
info->GetPreferredURI(getter_AddRefs(uri));

Просмотреть файл

@ -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,

Просмотреть файл

@ -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);