Deferred load: add status error code

R=sra@google.com

Review-Url: https://codereview.chromium.org/2990613002 .
This commit is contained in:
Sigmund Cherem 2017-07-25 10:09:56 -07:00
parent 7bdfd098f6
commit 77908a43a1

View file

@ -3743,8 +3743,9 @@ Future<Null> _loadHunk(String hunkName) {
'#.addEventListener("load", #, false)',
xhr,
convertDartClosureToJS((event) {
if (JS('int', '#.status', xhr) != 200) {
failure('');
int status = JS('int', '#.status', xhr);
if (status != 200) {
failure('Request status: $status');
}
String code = JS('String', '#.responseText', xhr);
try {