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

Unified Diff: site/try/src/compiler_isolate.dart

Issue 408783002: Enable Try Dart to run on IE11. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: removed dynamic, marked one test as Fail on IE11 Created 6 years, 4 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
Index: site/try/src/compiler_isolate.dart
===================================================================
--- site/try/src/compiler_isolate.dart (revision 39366)
+++ site/try/src/compiler_isolate.dart (working copy)
@@ -23,6 +23,8 @@
Uri sdkLocation;
List options = [];
+var communicateViaBlobs;
+
var cachedCompiler;
void notifyDartHtml(SendPort port) {
@@ -57,6 +59,8 @@
var data = (source.length > 1) ? source[1] : null;
if (messageType == 'options') {
options = data as List;
+ } if (messageType == 'communicateViaBlobs') {
+ communicateViaBlobs = data as bool;
}
return;
}
@@ -128,13 +132,17 @@
'Compiled ${source.length}/${charactersRead} characters Dart'
' -> ${js.length} characters.',
compiler.Diagnostic.VERBOSE_INFO);
- try {
- // At least Safari and Firefox do not support creating an
- // object URL from a web worker. MDN claims that it will be
- // supported in Firefox 21.
- url = Url.createObjectUrl(new Blob([js], 'application/javascript'));
- } catch (_) {
- // Ignored.
+ if (communicateViaBlobs) {
+ try {
+ // At least Safari and Firefox do not support creating an
+ // object URL from a web worker. MDN claims that it will be
+ // supported in Firefox 21.
+ url = Url.createObjectUrl(new Blob([js], 'application/javascript'));
+ } catch (_) {
+ // Ignored.
+ }
+ } else {
+ url = null;
}
if (url != null) {
replyTo.send(['url', url]);

Powered by Google App Engine
This is Rietveld 408576698