зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646582 - Pull the inner window id from the WindowGlobalParent, rather than passing it across PBrowser for updateForLocationChange. r=nika,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D80131
This commit is contained in:
Родитель
f851c6be5b
Коммит
2ee0adfb0e
|
@ -32,7 +32,6 @@ const SWAPPED_BROWSER_STATE = [
|
|||
"_characterSet",
|
||||
"_contentPrincipal",
|
||||
"_isSyntheticDocument",
|
||||
"_innerWindowID",
|
||||
];
|
||||
|
||||
/**
|
||||
|
@ -103,7 +102,6 @@ function tunnelToInnerBrowser(outer, inner) {
|
|||
inner._documentContentType = outer._documentContentType;
|
||||
inner._characterSet = outer._characterSet;
|
||||
inner._isSyntheticDocument = outer._isSyntheticDocument;
|
||||
inner._innerWindowID = outer._innerWindowID;
|
||||
inner._remoteWebNavigation._currentURI =
|
||||
outer._remoteWebNavigation._currentURI;
|
||||
// mozbrowser elements do not support the `contentPrincipal` property.
|
||||
|
|
|
@ -130,7 +130,6 @@ interface nsIBrowser : nsISupports
|
|||
* @param aCSP the content security policy of the new document
|
||||
* @param aReferrerInfo the referrer info of the new document
|
||||
* @param aIsSynthetic whether or not the document is synthetic
|
||||
* @param aInnerWindowID the inner window ID of the document
|
||||
* @param aHasRequestContextID whether or not the the request context has a
|
||||
* value (true) or null should be used (false)
|
||||
* @param aRequestContextID the request context ID
|
||||
|
@ -147,7 +146,6 @@ interface nsIBrowser : nsISupports
|
|||
in nsIContentSecurityPolicy aCSP,
|
||||
in nsIReferrerInfo aReferrerInfo,
|
||||
in boolean aIsSynthetic,
|
||||
in uint64_t aInnerWindowID,
|
||||
in boolean aHasRequestContextID,
|
||||
in uint64_t aRequestContextID,
|
||||
in AString aContentType);
|
||||
|
|
|
@ -3747,20 +3747,6 @@ nsresult BrowserChild::PrepareProgressListenerData(
|
|||
rv = aWebProgress->GetLoadType(&loadType);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
aWebProgressData->loadType() = loadType;
|
||||
|
||||
// The DOM Window ID getters here may throw if the inner or outer windows
|
||||
// aren't created yet or are destroyed at the time we're making this call
|
||||
// but that isn't fatal so ignore the exceptions here.
|
||||
nsCOMPtr<mozIDOMWindowProxy> window;
|
||||
rv = aWebProgress->GetDOMWindow(getter_AddRefs(window));
|
||||
if (NS_SUCCEEDED(rv) && window) {
|
||||
if (nsCOMPtr<nsPIDOMWindowOuter> outer =
|
||||
nsPIDOMWindowOuter::From(window)) {
|
||||
if (nsPIDOMWindowInner* inner = outer->GetCurrentInnerWindow()) {
|
||||
aWebProgressData->innerDOMWindowID() = inner->WindowID();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIChannel> channel = do_QueryInterface(aRequest);
|
||||
|
|
|
@ -2675,7 +2675,6 @@ mozilla::ipc::IPCResult BrowserParent::RecvOnLocationChange(
|
|||
aLocationChangeData->contentPartitionedPrincipal(),
|
||||
aLocationChangeData->csp(), aLocationChangeData->referrerInfo(),
|
||||
aLocationChangeData->isSyntheticDocument(),
|
||||
aWebProgressData->innerDOMWindowID(),
|
||||
aLocationChangeData->requestContextID().isSome(),
|
||||
aLocationChangeData->requestContextID().valueOr(0),
|
||||
aLocationChangeData->contentType());
|
||||
|
|
|
@ -106,7 +106,6 @@ struct WebProgressData
|
|||
bool isTopLevel;
|
||||
bool isLoadingDocument;
|
||||
uint32_t loadType;
|
||||
uint64_t innerDOMWindowID;
|
||||
};
|
||||
|
||||
struct RequestData
|
||||
|
|
|
@ -230,8 +230,6 @@
|
|||
|
||||
this._fastFind = null;
|
||||
|
||||
this._innerWindowID = null;
|
||||
|
||||
this._lastSearchString = null;
|
||||
|
||||
this._remoteWebNavigation = null;
|
||||
|
@ -583,17 +581,7 @@
|
|||
}
|
||||
|
||||
get innerWindowID() {
|
||||
if (this.isRemoteBrowser) {
|
||||
return this._innerWindowID;
|
||||
}
|
||||
try {
|
||||
return this.contentWindow.windowUtils.currentInnerWindowID;
|
||||
} catch (e) {
|
||||
if (e.result != Cr.NS_ERROR_NOT_AVAILABLE) {
|
||||
throw e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return this.browsingContext?.currentWindowGlobal?.innerWindowId || null;
|
||||
}
|
||||
|
||||
get browsingContext() {
|
||||
|
@ -1198,7 +1186,6 @@
|
|||
aCSP,
|
||||
aReferrerInfo,
|
||||
aIsSynthetic,
|
||||
aInnerWindowID,
|
||||
aHaveRequestContextID,
|
||||
aRequestContextID,
|
||||
aContentType
|
||||
|
@ -1221,7 +1208,6 @@
|
|||
this._csp = aCSP;
|
||||
this._referrerInfo = aReferrerInfo;
|
||||
this._isSyntheticDocument = aIsSynthetic;
|
||||
this._innerWindowID = aInnerWindowID;
|
||||
this._contentRequestContextID = aHaveRequestContextID
|
||||
? aRequestContextID
|
||||
: null;
|
||||
|
@ -1611,7 +1597,6 @@
|
|||
"_contentPrincipal",
|
||||
"_contentPartitionedPrincipal",
|
||||
"_isSyntheticDocument",
|
||||
"_innerWindowID",
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче