зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1495363
- Abort the previous request, if a form is submitted twice, r=nike
This commit is contained in:
Родитель
2f54dc921b
Коммит
906cc6d446
|
@ -393,13 +393,12 @@ nsDocLoader::OnStartRequest(nsIRequest* request, nsISupports* aCtxt) {
|
|||
//
|
||||
if (mIsLoadingDocument) {
|
||||
if (loadFlags & nsIChannel::LOAD_DOCUMENT_URI) {
|
||||
//
|
||||
// Make sure that the document channel is null at this point...
|
||||
// (unless its been redirected)
|
||||
//
|
||||
NS_ASSERTION(
|
||||
(loadFlags & nsIChannel::LOAD_REPLACE) || !(mDocumentRequest.get()),
|
||||
"Overwriting an existing document channel!");
|
||||
// If we have a document request channel, and this is not a redirect, we
|
||||
// must abort it and replace it with the new one.
|
||||
if (!(loadFlags & nsIChannel::LOAD_REPLACE) && mDocumentRequest) {
|
||||
mDocumentRequest->Cancel(NS_ERROR_ABORT);
|
||||
mDocumentRequest = nullptr;
|
||||
}
|
||||
|
||||
// This request is associated with the entire document...
|
||||
mDocumentRequest = request;
|
||||
|
|
Загрузка…
Ссылка в новой задаче