Bug 1306241 - Use NeedsSubjectPrincipal in dom/html/* - part 2, r=ehsan

This commit is contained in:
Andrea Marchesini
2016-10-03 10:34:29 +02:00
parent c25c38926b
commit 47cb021e43
7 changed files with 25 additions and 11 deletions

View File

@@ -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();
}