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

Unified Diff: sdk/lib/html/html_common/conversions_dart2js.dart

Issue 1355913002: isJavaScriptPromise needs to handle Promise not being defined (IE) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/html/html_common/conversions_dart2js.dart
diff --git a/sdk/lib/html/html_common/conversions_dart2js.dart b/sdk/lib/html/html_common/conversions_dart2js.dart
index d0b7d77e217a968c4d22fccfa6867c41efa33dc8..ac5b7554de34e5956e2ec596a4299dd9d1850916 100644
--- a/sdk/lib/html/html_common/conversions_dart2js.dart
+++ b/sdk/lib/html/html_common/conversions_dart2js.dart
@@ -81,7 +81,8 @@ bool isJavaScriptSimpleObject(value) {
}
bool isImmutableJavaScriptArray(value) =>
JS('bool', r'!!(#.immutable$list)', value);
-bool isJavaScriptPromise(value) => JS('bool', r'# instanceof Promise', value);
+bool isJavaScriptPromise(value) =>
+ JS('bool', r'typeof Promise != "undefined" && # instanceof Promise', value);
Future convertNativePromiseToDartFuture(promise) {
var completer = new Completer();
« 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