Bug 1306241 - Use NeedsSubjectPrincipal in dom/html/* - part 2, r=ehsan
This commit is contained in:
@@ -465,15 +465,16 @@ HTMLObjectElement::GetContentDocument(nsIDOMDocument **aContentDocument)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aContentDocument);
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(GetContentDocument());
|
||||
nsCOMPtr<nsIDOMDocument> domDoc =
|
||||
do_QueryInterface(GetContentDocument(Some(nsContentUtils::SubjectPrincipal())));
|
||||
domDoc.forget(aContentDocument);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsPIDOMWindowOuter*
|
||||
HTMLObjectElement::GetContentWindow()
|
||||
HTMLObjectElement::GetContentWindow(const mozilla::Maybe<nsIPrincipal*>& aSubjectPrincipal)
|
||||
{
|
||||
nsIDocument* doc = GetContentDocument();
|
||||
nsIDocument* doc = GetContentDocument(aSubjectPrincipal);
|
||||
if (doc) {
|
||||
return doc->GetWindow();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user