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

Unified Diff: lib/compiler/implementation/patch_parser.dart

Issue 10828411: Re-apply 'Unify dart:isolate.' with fixes for autogenerated dart2js and dartium html files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased and fixed an error. Created 8 years, 4 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
Index: lib/compiler/implementation/patch_parser.dart
diff --git a/lib/compiler/implementation/patch_parser.dart b/lib/compiler/implementation/patch_parser.dart
index e2a2744e5a724cc2e41d6e923c065fc511b30e54..3714faa0118c8430e5543e3cc59e5c8d457688c5 100644
--- a/lib/compiler/implementation/patch_parser.dart
+++ b/lib/compiler/implementation/patch_parser.dart
@@ -37,7 +37,18 @@ class PatchParserTask extends leg.CompilerTask {
// TODO(lrn): These imports end up in the original library and are in
// scope for the original methods too. This should be fixed.
for (tree.ScriptTag tag in imports.toLink()) {
- compiler.scanner.importLibraryFromTag(tag, compilationUnit);
+ if (tag.isSource()) {
+ library.tags = library.tags.prepend(tag);
+
+ StringNode argument = tag.argument;
+ Uri resolved = patchUri.resolve(argument.dartString.slowToString());
+ Script script = compiler.readScript(resolved, tag);
+ CompilationUnitElement unit =
+ new CompilationUnitElement(script, library);
+ compiler.withCurrentElement(unit, () => compiler.scanner.scan(unit));
+ } else {
+ compiler.scanner.importLibraryFromTag(tag, compilationUnit);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698