Fix bug 2760. The webcrawler only registers itself as a document loader observer if the right command line arguments are given to viewer.

This commit is contained in:
nisheeth%netscape.com 1999-06-25 00:57:16 +00:00
Родитель bfe3704050
Коммит ab4763a7e3
2 изменённых файлов: 8 добавлений и 4 удалений

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

@ -1272,9 +1272,12 @@ nsBrowserWindow::SetWebCrawler(nsWebCrawler* aCrawler)
}
if (aCrawler) {
mWebCrawler = aCrawler;
/* Nisheeth: the crawler registers as a document loader observer with
* the webshell when nsWebCrawler::Start() is called.
if (mWebShell) {
mWebShell->SetDocLoaderObserver(aCrawler);
}
*/
NS_ADDREF(aCrawler);
}
}

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

@ -435,9 +435,10 @@ void
nsWebCrawler::Start()
{
// Enable observing each URL load...
// nsIWebShell* shell = nsnull;
// mBrowser->GetWebShell(shell);
// shell->SetObserver(this);
nsIWebShell* shell = nsnull;
mBrowser->GetWebShell(shell);
shell->SetDocLoaderObserver(this);
NS_RELEASE(shell);
LoadNextURL();
}
@ -767,7 +768,7 @@ nsWebCrawler::LoadNextURL()
if (mPostExit) {
mViewer->Exit();
}
}
}
nsIPresShell*
nsWebCrawler::GetPresShell()