mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-13 15:34:01 +00:00
Bug 750023 - Add a null check in nsXMLHttpRequest::CreatePartialBlob. r=smaug
This commit is contained in:
parent
b7932b3e66
commit
799eae8b67
@ -107,3 +107,4 @@ load 713417.html
|
||||
load 713417-2.html
|
||||
load 715056.html
|
||||
load 741163-1.html
|
||||
HTTP(..) load xhr_abortinprogress.html
|
||||
|
23
content/base/crashtests/xhr_abortinprogress.html
Normal file
23
content/base/crashtests/xhr_abortinprogress.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<meta charset=UTF-8>
|
||||
<script>"use strict";
|
||||
(function(){
|
||||
var req = new XMLHttpRequest();
|
||||
req.open('GET', '?' + Date.now());
|
||||
req.responseType = 'moz-blob';
|
||||
var b = null;
|
||||
req.onprogress = function(e) {
|
||||
b = req.response;
|
||||
};
|
||||
req.onreadystatechange = function(e) {
|
||||
if (req.readyState == 3) {
|
||||
req.abort();
|
||||
}
|
||||
if (req.readyState == 4) {
|
||||
document.documentElement.removeAttribute('class');
|
||||
}
|
||||
};
|
||||
req.send();
|
||||
})();
|
||||
</script>
|
@ -1033,6 +1033,11 @@ nsXMLHttpRequest::CreatePartialBlob()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// mBuilder can be null if the request has been canceled
|
||||
if (!mBuilder) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCAutoString contentType;
|
||||
if (mLoadTotal == mLoadTransferred) {
|
||||
mChannel->GetContentType(contentType);
|
||||
|
Loading…
x
Reference in New Issue
Block a user