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

Unified Diff: pkg/compiler/lib/src/native/native.dart

Issue 2907383002: Don't tag fromEnvironment constructors as native (Closed)
Patch Set: Fix. Created 3 years, 7 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 | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698