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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user