Bug 1308287 part 1. Change [NeedsSubjectPrincipal] to only do the Maybe thing for interfaces that can be exposed to workers. r=baku
The idea is to not make consumers think about whether the principal exists or not when the caller knows for sure that it does. The substantive changes are in dom/bindings, nsHTMLDocument::SetDesignMode, and around the CanUseStorage bits. Everything else is pretty mechanical.
This commit is contained in:
@@ -466,13 +466,13 @@ HTMLObjectElement::GetContentDocument(nsIDOMDocument **aContentDocument)
|
||||
NS_ENSURE_ARG_POINTER(aContentDocument);
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> domDoc =
|
||||
do_QueryInterface(GetContentDocument(Some(nsContentUtils::SubjectPrincipal())));
|
||||
do_QueryInterface(GetContentDocument(*nsContentUtils::SubjectPrincipal()));
|
||||
domDoc.forget(aContentDocument);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsPIDOMWindowOuter*
|
||||
HTMLObjectElement::GetContentWindow(const mozilla::Maybe<nsIPrincipal*>& aSubjectPrincipal)
|
||||
HTMLObjectElement::GetContentWindow(nsIPrincipal& aSubjectPrincipal)
|
||||
{
|
||||
nsIDocument* doc = GetContentDocument(aSubjectPrincipal);
|
||||
if (doc) {
|
||||
|
||||
Reference in New Issue
Block a user