mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1339713 - Use IPCStream everywhere - part 5 - PContent, r=smaug
This commit is contained in:
parent
5074a53881
commit
2c988363eb
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user