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:
Родитель
bfe3704050
Коммит
ab4763a7e3
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче