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

Unified Diff: lib/src/codegen/js_printer.dart

Issue 1425313003: Re-enable source maps (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | test/codegen/expect/map_keys.js.map » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_printer.dart
diff --git a/lib/src/codegen/js_printer.dart b/lib/src/codegen/js_printer.dart
index e83548776dd33ac94b85b0dfb91f735230b2fdd1..81ea7252e3c4613097040c61755add39dbb34a07 100644
--- a/lib/src/codegen/js_printer.dart
+++ b/lib/src/codegen/js_printer.dart
@@ -72,12 +72,11 @@ class SourceMapPrintingContext extends JS.JavaScriptPrintingContext {
void enterNode(JS.Node jsNode) {
AstNode node = jsNode.sourceInformation;
- if (node is CompilationUnit) {
- unit = node;
+ if (node == null || node.offset == -1) return;
+ if (node.parent is CompilationUnit) {
Jennifer Messerly 2015/11/09 18:38:46 We'll keep making the URI over and over, right? Si
vsm 2015/11/09 19:15:42 If there is a natural visit on the CompilationUnit
vsm 2015/11/09 19:15:42 BTW, I tested this with Angular - seems like we ha
+ unit = node.parent;
uri = _makeRelativeUri(unit.element.source.uri);
- return;
}
- if (unit == null || node == null || node.offset == -1) return;
var loc = _location(node.offset);
var name = _getIdentifier(node);
« no previous file with comments | « no previous file | test/codegen/expect/map_keys.js.map » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698