Bug 1004202 - Stop calling PrepareToStartLoad in nsDocumentViewer::LoadStart; r=smaug

Before bug 968805, none of the callers would reach this branch. The callers in
nsContentDLF.cpp call LoadStart immediately after constructing the
nsDocumentViewer, so they hit the !mDocument case, and the comparison was
always false for the caller in nsHTMLDocument::Open, as it passed an
nsIHTMLDocument pointer, so the nsISupports pointers being compared were
always different. (XPCOM rules require SameCOMIdentity in this case, to avoid
exactly this issue.)

I tested that the removed code was never reached after a backout of bug 968805.
This commit is contained in:
Ms2ger 2014-05-03 09:34:00 +02:00
Родитель 18857c4acb
Коммит d25ec45e5b
1 изменённых файлов: 0 добавлений и 4 удалений

Просмотреть файл

@ -560,10 +560,6 @@ nsDocumentViewer::LoadStart(nsIDocument* aDocument)
if (!mDocument) {
mDocument = aDocument;
} else if (mDocument == aDocument) {
// Reset the document viewer's state back to what it was
// when the document load started.
PrepareToStartLoad();
}
}