| Index: lib/compiler/implementation/native_handler.dart
|
| diff --git a/lib/compiler/implementation/native_handler.dart b/lib/compiler/implementation/native_handler.dart
|
| index 8592b03be9d7b0cb08543242e23b7caa2ba2229d..4e101d693c756c5e7a8446c288ea68c16fd75675 100644
|
| --- a/lib/compiler/implementation/native_handler.dart
|
| +++ b/lib/compiler/implementation/native_handler.dart
|
| @@ -39,7 +39,7 @@ void processNativeClassesInLibrary(Enqueuer world,
|
| LibraryElement library) {
|
| bool hasNativeClass = false;
|
| final compiler = emitter.compiler;
|
| - for (Link<Element> link = library.topLevelElements;
|
| + for (Link<Element> link = library.localMembers;
|
| !link.isEmpty(); link = link.tail) {
|
| Element element = link.head;
|
| if (element.kind == ElementKind.CLASS) {
|
| @@ -76,14 +76,15 @@ void maybeEnableNative(Compiler compiler,
|
| LibraryElement library,
|
| Uri uri) {
|
| String libraryName = uri.toString();
|
| - if (library.script.name.contains('dart/tests/compiler/dart2js_native')
|
| + if (library.entryCompilationUnit.script.name.contains(
|
| + 'dart/tests/compiler/dart2js_native')
|
| || libraryName == 'dart:dom_deprecated'
|
| || libraryName == 'dart:isolate'
|
| || libraryName == 'dart:html') {
|
| library.canUseNative = true;
|
| - library.define(compiler.findHelper(const SourceString('JS')), compiler);
|
| + library.addToScope(compiler.findHelper(const SourceString('JS')), compiler);
|
| if (compiler.jsIndexingBehaviorInterface !== null) {
|
| - library.define(compiler.jsIndexingBehaviorInterface, compiler);
|
| + library.addToScope(compiler.jsIndexingBehaviorInterface, compiler);
|
| }
|
| }
|
| }
|
|
|