| Index: pkg/compiler/lib/src/native/native.dart
|
| diff --git a/pkg/compiler/lib/src/native/native.dart b/pkg/compiler/lib/src/native/native.dart
|
| index cba55120ca83194b867f7d9710f3cb3b4695cb21..1d68d7a0bf9edd97a1899b89e8e125d809f0874b 100644
|
| --- a/pkg/compiler/lib/src/native/native.dart
|
| +++ b/pkg/compiler/lib/src/native/native.dart
|
| @@ -4,9 +4,6 @@
|
|
|
| library native;
|
|
|
| -import '../compiler.dart' show Compiler;
|
| -import '../elements/entities.dart';
|
| -
|
| export 'behavior.dart';
|
| export 'enqueue.dart';
|
| export 'js.dart';
|
| @@ -27,21 +24,17 @@ const Iterable<String> _allowedDartSchemePaths = const <String>[
|
| 'web_sql'
|
| ];
|
|
|
| -bool maybeEnableNative(Compiler compiler, LibraryEntity library) {
|
| +bool maybeEnableNative(Uri uri, {bool allowNativeExtensions: false}) {
|
| bool allowedTestLibrary() {
|
| - Uri uri = library.canonicalUri;
|
| String scriptName = uri.path;
|
| return scriptName.contains('sdk/tests/compiler/dart2js_native') ||
|
| scriptName.contains('sdk/tests/compiler/dart2js_extra');
|
| }
|
|
|
| bool allowedDartLibary() {
|
| - Uri uri = library.canonicalUri;
|
| if (uri.scheme != 'dart') return false;
|
| return _allowedDartSchemePaths.contains(uri.path);
|
| }
|
|
|
| - return allowedTestLibrary() ||
|
| - allowedDartLibary() ||
|
| - compiler.options.allowNativeExtensions;
|
| + return allowedTestLibrary() || allowedDartLibary() || allowNativeExtensions;
|
| }
|
|
|