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

Unified Diff: pkg/front_end/lib/src/fasta/loader.dart

Issue 2992073002: FE: let targets override whether imports to internal platform libraries (dart:_foo) are allowed. (Closed)
Patch Set: Created 3 years, 5 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/dart2js_target.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/loader.dart
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index 743dcf6eaf3e20bf9026f5a580d4ddb88275eebc..5a1953bcf67becb0e7f69772f455d1b2f958b8f1 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -102,9 +102,8 @@ abstract class Loader<L> {
return library;
});
if (accessor != null &&
- uri.scheme == "dart" &&
- uri.path.startsWith("_") &&
- accessor.uri.scheme != "dart") {
+ !target.backendTarget
+ .allowPlatformPrivateLibraryAccess(accessor.uri, uri)) {
accessor.addCompileTimeError(
messagePlatformPrivateLibraryAccess, charOffset, accessor.fileUri);
}
« no previous file with comments | « pkg/compiler/lib/src/kernel/dart2js_target.dart ('k') | pkg/kernel/lib/target/targets.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698