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