Chromium Code Reviews| 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..ca857284d4f49d69f2d4b6ac6661fb1f6c30cdcf 100644 |
| --- a/pkg/compiler/lib/src/native/native.dart |
| +++ b/pkg/compiler/lib/src/native/native.dart |
| @@ -4,7 +4,6 @@ |
| library native; |
| -import '../compiler.dart' show Compiler; |
| import '../elements/entities.dart'; |
| export 'behavior.dart'; |
| @@ -27,7 +26,8 @@ const Iterable<String> _allowedDartSchemePaths = const <String>[ |
| 'web_sql' |
| ]; |
| -bool maybeEnableNative(Compiler compiler, LibraryEntity library) { |
| +bool maybeEnableNative(LibraryEntity library, |
|
Siggi Cherem (dart-lang)
2017/05/30 22:17:56
Could we change this to just take the Uri instead?
Johnni Winther
2017/05/31 08:40:01
Done.
|
| + {bool allowNativeExtensions: false}) { |
| bool allowedTestLibrary() { |
| Uri uri = library.canonicalUri; |
| String scriptName = uri.path; |
| @@ -41,7 +41,5 @@ bool maybeEnableNative(Compiler compiler, LibraryEntity library) { |
| return _allowedDartSchemePaths.contains(uri.path); |
| } |
| - return allowedTestLibrary() || |
| - allowedDartLibary() || |
| - compiler.options.allowNativeExtensions; |
| + return allowedTestLibrary() || allowedDartLibary() || allowNativeExtensions; |
| } |