зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1556489 - P7. Make LoadInfoArgsToLoadInfo works with LoadInfo class. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D40964
This commit is contained in:
Родитель
0c52caf2b2
Коммит
a209298de2
|
@ -596,10 +596,25 @@ nsresult LoadInfoArgsToLoadInfo(
|
||||||
nsILoadInfo** outLoadInfo) {
|
nsILoadInfo** outLoadInfo) {
|
||||||
return LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, nullptr, outLoadInfo);
|
return LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, nullptr, outLoadInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult LoadInfoArgsToLoadInfo(
|
nsresult LoadInfoArgsToLoadInfo(
|
||||||
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs, nsINode* aLoadingContext,
|
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs, nsINode* aLoadingContext,
|
||||||
nsILoadInfo** outLoadInfo) {
|
nsILoadInfo** outLoadInfo) {
|
||||||
|
RefPtr<LoadInfo> loadInfo;
|
||||||
|
nsresult rv = LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, aLoadingContext,
|
||||||
|
getter_AddRefs(loadInfo));
|
||||||
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
|
loadInfo.forget(outLoadInfo);
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsresult LoadInfoArgsToLoadInfo(
|
||||||
|
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs, LoadInfo** outLoadInfo) {
|
||||||
|
return LoadInfoArgsToLoadInfo(aOptionalLoadInfoArgs, nullptr, outLoadInfo);
|
||||||
|
}
|
||||||
|
nsresult LoadInfoArgsToLoadInfo(
|
||||||
|
const Maybe<LoadInfoArgs>& aOptionalLoadInfoArgs, nsINode* aLoadingContext,
|
||||||
|
LoadInfo** outLoadInfo) {
|
||||||
if (aOptionalLoadInfoArgs.isNothing()) {
|
if (aOptionalLoadInfoArgs.isNothing()) {
|
||||||
*outLoadInfo = nullptr;
|
*outLoadInfo = nullptr;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
|
@ -51,6 +51,7 @@ namespace mozilla {
|
||||||
namespace net {
|
namespace net {
|
||||||
class ChildLoadInfoForwarderArgs;
|
class ChildLoadInfoForwarderArgs;
|
||||||
class LoadInfoArgs;
|
class LoadInfoArgs;
|
||||||
|
class LoadInfo;
|
||||||
class ParentLoadInfoForwarderArgs;
|
class ParentLoadInfoForwarderArgs;
|
||||||
class RedirectHistoryEntryInfo;
|
class RedirectHistoryEntryInfo;
|
||||||
} // namespace net
|
} // namespace net
|
||||||
|
@ -136,6 +137,12 @@ nsresult LoadInfoArgsToLoadInfo(
|
||||||
nsresult LoadInfoArgsToLoadInfo(
|
nsresult LoadInfoArgsToLoadInfo(
|
||||||
const Maybe<mozilla::net::LoadInfoArgs>& aOptionalLoadInfoArgs,
|
const Maybe<mozilla::net::LoadInfoArgs>& aOptionalLoadInfoArgs,
|
||||||
nsINode* aLoadingContext, nsILoadInfo** outLoadInfo);
|
nsINode* aLoadingContext, nsILoadInfo** outLoadInfo);
|
||||||
|
nsresult LoadInfoArgsToLoadInfo(
|
||||||
|
const Maybe<net::LoadInfoArgs>& aOptionalLoadInfoArgs,
|
||||||
|
mozilla::net::LoadInfo** outLoadInfo);
|
||||||
|
nsresult LoadInfoArgsToLoadInfo(
|
||||||
|
const Maybe<net::LoadInfoArgs>& aOptionalLoadInfoArgs,
|
||||||
|
nsINode* aLoadingContext, mozilla::net::LoadInfo** outLoadInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fills ParentLoadInfoForwarderArgs with properties we want to carry to child
|
* Fills ParentLoadInfoForwarderArgs with properties we want to carry to child
|
||||||
|
|
|
@ -34,13 +34,14 @@ class XMLHttpRequestMainThread;
|
||||||
|
|
||||||
namespace net {
|
namespace net {
|
||||||
class LoadInfoArgs;
|
class LoadInfoArgs;
|
||||||
|
class LoadInfo;
|
||||||
} // namespace net
|
} // namespace net
|
||||||
|
|
||||||
namespace ipc {
|
namespace ipc {
|
||||||
// we have to forward declare that function so we can use it as a friend.
|
// we have to forward declare that function so we can use it as a friend.
|
||||||
nsresult LoadInfoArgsToLoadInfo(
|
nsresult LoadInfoArgsToLoadInfo(const Maybe<net::LoadInfoArgs>& aLoadInfoArgs,
|
||||||
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
nsINode* aLoadingContext,
|
||||||
nsINode* aLoadingContext, nsILoadInfo** outLoadInfo);
|
net::LoadInfo** outLoadInfo);
|
||||||
} // namespace ipc
|
} // namespace ipc
|
||||||
|
|
||||||
namespace net {
|
namespace net {
|
||||||
|
@ -164,7 +165,7 @@ class LoadInfo final : public nsILoadInfo {
|
||||||
|
|
||||||
friend nsresult mozilla::ipc::LoadInfoArgsToLoadInfo(
|
friend nsresult mozilla::ipc::LoadInfoArgsToLoadInfo(
|
||||||
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
const Maybe<mozilla::net::LoadInfoArgs>& aLoadInfoArgs,
|
||||||
nsINode* aLoadingContext, nsILoadInfo** outLoadInfo);
|
nsINode* aLoadingContext, net::LoadInfo** outLoadInfo);
|
||||||
|
|
||||||
~LoadInfo() = default;
|
~LoadInfo() = default;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче