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

Unified Diff: lib/compiler/implementation/native_handler.dart

Issue 10694082: Add the JS helper function to all libraries where we allow the native syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | lib/dom/templates/html/frog/html_frog.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/native_handler.dart
diff --git a/lib/compiler/implementation/native_handler.dart b/lib/compiler/implementation/native_handler.dart
index 8e2b688b59653dc096f6997cc9ba0f4809750890..8592b03be9d7b0cb08543242e23b7caa2ba2229d 100644
--- a/lib/compiler/implementation/native_handler.dart
+++ b/lib/compiler/implementation/native_handler.dart
@@ -81,15 +81,11 @@ void maybeEnableNative(Compiler compiler,
|| libraryName == 'dart:isolate'
|| libraryName == 'dart:html') {
library.canUseNative = true;
+ library.define(compiler.findHelper(const SourceString('JS')), compiler);
Lasse Reichstein Nielsen 2012/07/04 13:49:44 Maybe we should extend the map in library_map.dart
if (compiler.jsIndexingBehaviorInterface !== null) {
library.define(compiler.jsIndexingBehaviorInterface, compiler);
}
}
-
- // Additionaly, if this is a test, we allow access to foreign functions.
- if (library.script.name.contains('dart/tests/compiler/dart2js_native')) {
- library.define(compiler.findHelper(const SourceString('JS')), compiler);
- }
}
void checkAllowedLibrary(ElementListener listener, Token token) {
« no previous file with comments | « no previous file | lib/dom/templates/html/frog/html_frog.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698