Bug 1616353 - Part 6.2: Remove setOriginAttributesBeforeLoading API, r=smaug

This API is no longer possible to implement, as it will always try to set the
OriginAttributes on a content BrowsingContext after it has been attached, and JS
can never observe a detached BrowsingContext.

Users of this API are instead changed to perform assertions that
originAttributes have already been set correctly.

Differential Revision: https://phabricator.services.mozilla.com/D67046
This commit is contained in:
Nika Layzell
2020-04-06 14:29:50 +00:00
parent 458cd6db6a
commit c9e96c7477
9 changed files with 4 additions and 74 deletions

View File

@@ -12546,21 +12546,6 @@ nsresult nsDocShell::SetOriginAttributes(const OriginAttributes& aAttrs) {
return mBrowsingContext->SetOriginAttributes(aAttrs);
}
NS_IMETHODIMP
nsDocShell::SetOriginAttributesBeforeLoading(
JS::Handle<JS::Value> aOriginAttributes, JSContext* aCx) {
if (!aOriginAttributes.isObject()) {
return NS_ERROR_INVALID_ARG;
}
OriginAttributes attrs;
if (!attrs.Init(aCx, aOriginAttributes)) {
return NS_ERROR_INVALID_ARG;
}
return SetOriginAttributes(attrs);
}
NS_IMETHODIMP
nsDocShell::ResumeRedirectedLoad(uint64_t aIdentifier, int32_t aHistoryIndex) {
RefPtr<nsDocShell> self = this;