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

Unified Diff: tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate

Issue 12224055: Converting XHR from onLoad to onReadyStateChange (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
index 078d873b230c53637867d92323a520d0ae3bedda..70667a17474db8d0eac4499fa70a026ed26ad48d 100644
--- a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
+++ b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
@@ -95,8 +95,9 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
}
xhr.onLoad.listen((e) {
- if (xhr.status >= 200 && xhr.status < 300 ||
- xhr.status == 304 ) {
+ // Note: file:// URIs have status of 0.
+ if ((xhr.status >= 200 && xhr.status < 300) ||
+ xhr.status == 0 || xhr.status == 304) {
Emily Fortuna 2013/02/07 20:55:50 note -- please add in the comments of this method
completer.complete(xhr);
} else {
completer.completeError(e);
Siggi Cherem (dart-lang) 2013/02/07 21:03:30 not for this CL, but we should also consider wheth
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698