webshell/src/nsDocLoader.cpp -
310133 - 1. added LoadURLOnTimer() and CancelLoadURLTimer() implementations to the nsDocLoaderImpl class. 2. Changed nsDocumentBindInfo class to support the nsIRefreshUrl interface. 3. Changed the nsDocumentBindInfo contructor to set the m_ExtraInfo variable to the aExtraInfo pointer passed in. This must have been an oversight on the part of the original implementor. 4. Added a simple data placeholder class to hold the data that will be used to load the url on the timer. webshell/src/nsWebShell.cpp - 1. 310133 - When the webshell is destructed or about to load a new url, the loader now calls CancelLoadURLTimer() which cancels and releases the timers. git-svn-id: svn://10.0.0.236/trunk@7954 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -305,6 +305,8 @@ nsWebShell::~nsWebShell()
|
||||
// Stop any pending document loads and destroy the loader...
|
||||
if (nsnull != mDocLoader) {
|
||||
mDocLoader->Stop();
|
||||
// Cancel any timers that were set for this loader.
|
||||
mDocLoader->CancelLoadURLTimer();
|
||||
mDocLoader->RemoveObserver((nsIDocumentLoaderObserver*)this);
|
||||
NS_RELEASE(mDocLoader);
|
||||
}
|
||||
@@ -544,6 +546,9 @@ nsWebShell::Destroy()
|
||||
// Stop any URLs that are currently being loaded...
|
||||
mDocLoader->Stop();
|
||||
|
||||
// Cancel any timers that were set for this loader.
|
||||
mDocLoader->CancelLoadURLTimer();
|
||||
|
||||
SetContainer(nsnull);
|
||||
SetObserver(nsnull);
|
||||
|
||||
@@ -933,6 +938,10 @@ nsWebShell::LoadURL(const nsString& aURLSpec,
|
||||
// Stop any documents that are currently being loaded...
|
||||
mDocLoader->Stop();
|
||||
|
||||
// Cancel any timers that were set for this loader.
|
||||
mDocLoader->CancelLoadURLTimer();
|
||||
|
||||
|
||||
rv = mDocLoader->LoadURL(urlSpec, // URL string
|
||||
nsnull, // Command
|
||||
this, // Container
|
||||
@@ -986,6 +995,9 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
|
||||
// Stop any documents that are currently being loaded...
|
||||
mDocLoader->Stop();
|
||||
|
||||
// Cancel any timers that were set for this loader.
|
||||
mDocLoader->CancelLoadURLTimer();
|
||||
|
||||
rv = mDocLoader->LoadURL(urlSpec, // URL string
|
||||
nsnull, // Command
|
||||
this, // Container
|
||||
|
||||
Reference in New Issue
Block a user