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

Side by Side Diff: dart/tools/dom/templates/html/dart2js/impl_URL.darttemplate

Issue 14762008: Use "self" not "window" for Worker API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dart/tests/html/worker_api_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
8 8
9 static String createObjectUrl(blob_OR_source_OR_stream) => 9 static String createObjectUrl(blob_OR_source_OR_stream) =>
10 JS('String', 10 JS('String',
11 '(window.URL || window.webkitURL).createObjectURL(#)', 11 '(self.URL || self.webkitURL).createObjectURL(#)',
blois 2013/05/13 17:47:52 I believe it should probably be: "(#.URL || #.web
ahe 2013/05/13 18:32:22 That doesn't seem to work. It generates this code
12 blob_OR_source_OR_stream); 12 blob_OR_source_OR_stream);
13 13
14 static void revokeObjectUrl(String objectUrl) => 14 static void revokeObjectUrl(String objectUrl) =>
15 JS('void', 15 JS('void',
16 '(window.URL || window.webkitURL).revokeObjectURL(#)', objectUrl); 16 '(self.URL || self.webkitURL).revokeObjectURL(#)', objectUrl);
17 $!MEMBERS 17 $!MEMBERS
18 } 18 }
OLDNEW
« no previous file with comments | « dart/tests/html/worker_api_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698