Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: sdk/lib/_internal/js_runtime/lib/js_helper.dart

Issue 2990613002: Deferred load: add status error code (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/js_helper.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 66291bd6b8a3ce6c7acf84f01ef80ddb9a72f73f..bf21636123cc218295666994b8b50fb01ddad721 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698