Move the call to stop before firing the BeginLoadURL notification... This will keep the BeginLoad/EndLoad notifications paired correctly...
This commit is contained in:
@@ -1083,6 +1083,10 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
|
|||||||
}
|
}
|
||||||
ShowHistory();
|
ShowHistory();
|
||||||
|
|
||||||
|
// Stop loading the current document (if any...). This call may result in
|
||||||
|
// firing an EndLoadURL notification for the old document...
|
||||||
|
Stop();
|
||||||
|
|
||||||
// Tell web-shell-container we are loading a new url
|
// Tell web-shell-container we are loading a new url
|
||||||
if (nsnull != mContainer) {
|
if (nsnull != mContainer) {
|
||||||
rv = mContainer->BeginLoadURL(this, urlSpec);
|
rv = mContainer->BeginLoadURL(this, urlSpec);
|
||||||
@@ -1091,8 +1095,6 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Stop();
|
|
||||||
|
|
||||||
rv = mDocLoader->LoadDocument(urlSpec, // URL string
|
rv = mDocLoader->LoadDocument(urlSpec, // URL string
|
||||||
nsnull, // Command
|
nsnull, // Command
|
||||||
this, // Container
|
this, // Container
|
||||||
@@ -1185,6 +1187,10 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
|
|||||||
mHistoryIndex = aHistoryIndex;
|
mHistoryIndex = aHistoryIndex;
|
||||||
ShowHistory();
|
ShowHistory();
|
||||||
|
|
||||||
|
// Stop loading the current document (if any...). This call may result in
|
||||||
|
// firing an EndLoadURL notification for the old document...
|
||||||
|
Stop();
|
||||||
|
|
||||||
// Tell web-shell-container we are loading a new url
|
// Tell web-shell-container we are loading a new url
|
||||||
if (nsnull != mContainer) {
|
if (nsnull != mContainer) {
|
||||||
rv = mContainer->BeginLoadURL(this, urlSpec);
|
rv = mContainer->BeginLoadURL(this, urlSpec);
|
||||||
@@ -1193,9 +1199,6 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop any documents that are currently being loaded...
|
|
||||||
mDocLoader->Stop();
|
|
||||||
|
|
||||||
rv = mDocLoader->LoadDocument(urlSpec, // URL string
|
rv = mDocLoader->LoadDocument(urlSpec, // URL string
|
||||||
nsnull, // Command
|
nsnull, // Command
|
||||||
this, // Container
|
this, // Container
|
||||||
|
|||||||
@@ -1083,6 +1083,10 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
|
|||||||
}
|
}
|
||||||
ShowHistory();
|
ShowHistory();
|
||||||
|
|
||||||
|
// Stop loading the current document (if any...). This call may result in
|
||||||
|
// firing an EndLoadURL notification for the old document...
|
||||||
|
Stop();
|
||||||
|
|
||||||
// Tell web-shell-container we are loading a new url
|
// Tell web-shell-container we are loading a new url
|
||||||
if (nsnull != mContainer) {
|
if (nsnull != mContainer) {
|
||||||
rv = mContainer->BeginLoadURL(this, urlSpec);
|
rv = mContainer->BeginLoadURL(this, urlSpec);
|
||||||
@@ -1091,8 +1095,6 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Stop();
|
|
||||||
|
|
||||||
rv = mDocLoader->LoadDocument(urlSpec, // URL string
|
rv = mDocLoader->LoadDocument(urlSpec, // URL string
|
||||||
nsnull, // Command
|
nsnull, // Command
|
||||||
this, // Container
|
this, // Container
|
||||||
@@ -1185,6 +1187,10 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
|
|||||||
mHistoryIndex = aHistoryIndex;
|
mHistoryIndex = aHistoryIndex;
|
||||||
ShowHistory();
|
ShowHistory();
|
||||||
|
|
||||||
|
// Stop loading the current document (if any...). This call may result in
|
||||||
|
// firing an EndLoadURL notification for the old document...
|
||||||
|
Stop();
|
||||||
|
|
||||||
// Tell web-shell-container we are loading a new url
|
// Tell web-shell-container we are loading a new url
|
||||||
if (nsnull != mContainer) {
|
if (nsnull != mContainer) {
|
||||||
rv = mContainer->BeginLoadURL(this, urlSpec);
|
rv = mContainer->BeginLoadURL(this, urlSpec);
|
||||||
@@ -1193,9 +1199,6 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop any documents that are currently being loaded...
|
|
||||||
mDocLoader->Stop();
|
|
||||||
|
|
||||||
rv = mDocLoader->LoadDocument(urlSpec, // URL string
|
rv = mDocLoader->LoadDocument(urlSpec, // URL string
|
||||||
nsnull, // Command
|
nsnull, // Command
|
||||||
this, // Container
|
this, // Container
|
||||||
|
|||||||
Reference in New Issue
Block a user