зеркало из https://github.com/mozilla/gecko-dev.git
bug 1271436 - use nsIDocShellTreeItem::GetDocument() more r=smaug
This commit is contained in:
Родитель
72bac46477
Коммит
1e81548029
|
@ -9973,7 +9973,7 @@ nsDocShell::InternalLoad(nsIURI* aURI,
|
|||
// possible frameloader initialization before loading a new page.
|
||||
nsCOMPtr<nsIDocShellTreeItem> parent = GetParentDocshell();
|
||||
if (parent) {
|
||||
nsCOMPtr<nsIDocument> doc = do_GetInterface(parent);
|
||||
nsCOMPtr<nsIDocument> doc = parent->GetDocument();
|
||||
if (doc) {
|
||||
doc->TryCancelFrameLoaderInitialization(this);
|
||||
}
|
||||
|
|
|
@ -2495,7 +2495,7 @@ WarnIfSandboxIneffective(nsIDocShell* aDocShell,
|
|||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocument> parentDocument = do_GetInterface(parentDocShell);
|
||||
nsCOMPtr<nsIDocument> parentDocument = parentDocShell->GetDocument();
|
||||
nsCOMPtr<nsIURI> iframeUri;
|
||||
parentChannel->GetURI(getter_AddRefs(iframeUri));
|
||||
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
|
||||
|
|
|
@ -3237,7 +3237,8 @@ nsFrameLoader::StartPersistence(uint64_t aOuterWindowID,
|
|||
return mRemoteBrowser->StartPersistence(aOuterWindowID, aRecv);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocument> rootDoc = do_GetInterface(mDocShell);
|
||||
nsCOMPtr<nsIDocument> rootDoc =
|
||||
mDocShell ? mDocShell->GetDocument() : nullptr;
|
||||
nsCOMPtr<nsIDocument> foundDoc;
|
||||
if (aOuterWindowID) {
|
||||
foundDoc = nsContentUtils::GetSubdocumentWithOuterWindowId(rootDoc, aOuterWindowID);
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
NS_ASSERTION(sameTypeRoot, "No document shell root tree item from document shell tree item!");
|
||||
|
||||
// now get the document from sameTypeRoot
|
||||
nsCOMPtr<nsIDocument> rootDoc = do_GetInterface(sameTypeRoot);
|
||||
nsCOMPtr<nsIDocument> rootDoc = sameTypeRoot->GetDocument();
|
||||
NS_ASSERTION(rootDoc, "No root document from document shell root tree item.");
|
||||
|
||||
// Get eventSink and the current security state from the docShell
|
||||
|
@ -764,7 +764,7 @@ nsMixedContentBlocker::ShouldLoad(bool aHadInsecureImageRedirect,
|
|||
}
|
||||
|
||||
// Get the root document from the sameTypeRoot
|
||||
nsCOMPtr<nsIDocument> rootDoc = do_GetInterface(sameTypeRoot);
|
||||
nsCOMPtr<nsIDocument> rootDoc = sameTypeRoot->GetDocument();
|
||||
NS_ASSERTION(rootDoc, "No root document from document shell root tree item.");
|
||||
|
||||
// Get eventSink and the current security state from the docShell
|
||||
|
|
|
@ -231,8 +231,8 @@ nsChannelClassifier::NotifyTrackingProtectionDisabled(nsIChannel *aChannel)
|
|||
if (!docShell) {
|
||||
return NS_OK;
|
||||
}
|
||||
nsCOMPtr<nsIDocument> doc = do_GetInterface(docShell, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, NS_OK);
|
||||
nsCOMPtr<nsIDocument> doc = docShell->GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_OK);
|
||||
|
||||
// Notify nsIWebProgressListeners of this security event.
|
||||
// Can be used to change the UI state.
|
||||
|
@ -543,8 +543,8 @@ nsChannelClassifier::SetBlockedTrackingContent(nsIChannel *channel)
|
|||
if (!docShell) {
|
||||
return NS_OK;
|
||||
}
|
||||
nsCOMPtr<nsIDocument> doc = do_GetInterface(docShell, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, NS_OK);
|
||||
nsCOMPtr<nsIDocument> doc = docShell->GetDocument();
|
||||
NS_ENSURE_TRUE(doc, NS_OK);
|
||||
|
||||
// This event might come after the user has navigated to another page.
|
||||
// To prevent showing the TrackingProtection UI on the wrong page, we need to
|
||||
|
|
Загрузка…
Ссылка в новой задаче