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

Unified Diff: lib/src/mirror_loader.dart

Issue 1004033004: Fix initialize transformer crash on some programs (Closed) Base URL: git@github.com:dart-lang/static-init.git@master
Patch Set: Created 5 years, 9 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 | « lib/build/initializer_plugin.dart ('k') | lib/transformer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/mirror_loader.dart
diff --git a/lib/src/mirror_loader.dart b/lib/src/mirror_loader.dart
index bda270404ffddc75782cdfca2ddf8a5f7ca3c52f..ba49566ccfbd69e97453466a2c0396be8ad0cf15 100644
--- a/lib/src/mirror_loader.dart
+++ b/lib/src/mirror_loader.dart
@@ -45,8 +45,8 @@ class InitializationCrawler {
// they were seen.
// TODO(jakemac): This is an approximation of what we actually want.
// https://github.com/dart-lang/initialize/issues/25
- var relativeLibraryUris = new List.from(libraries.keys.where(
- (uri) => uri.scheme != 'package' && uri.scheme != 'dart'));
+ var relativeLibraryUris = new List.from(libraries.keys
+ .where((uri) => uri.scheme != 'package' && uri.scheme != 'dart'));
for (var import in relativeLibraryUris.reversed) {
// Always load the package: version of a library if available for
@@ -74,7 +74,6 @@ class InitializationCrawler {
return queue;
}
-
/// Whether [uri] is an http URI that contains a 'packages' segment, and
/// therefore could be converted into a 'package:' URI.
bool _isHttpStylePackageUrl(Uri uri) {
@@ -87,8 +86,8 @@ class InitializationCrawler {
}
Uri _packageUriFor(Uri httpUri) {
- var packagePath = httpUri.path.substring(
- httpUri.path.lastIndexOf('packages/') + 'packages/'.length);
+ var packagePath = httpUri.path
+ .substring(httpUri.path.lastIndexOf('packages/') + 'packages/'.length);
return Uri.parse('package:$packagePath');
}
« no previous file with comments | « lib/build/initializer_plugin.dart ('k') | lib/transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698