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

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

Issue 2757503002: Fix for bug when binding non-symbolized members on native classes (Closed)
Patch Set: use js_ast to more efficiently turn the JSON into a string. Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/compiler.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/compiler.dart b/pkg/dev_compiler/lib/src/compiler/compiler.dart
index e2808bf56caede3b97945a3965ac8de531bb90f8..93dfa9ea90908b7c7f9a6f04b9f95e2eefce8089 100644
--- a/pkg/dev_compiler/lib/src/compiler/compiler.dart
+++ b/pkg/dev_compiler/lib/src/compiler/compiler.dart
@@ -32,6 +32,7 @@ import 'package:source_maps/source_maps.dart';
import '../analyzer/context.dart' show AnalyzerOptions, createSourceFactory;
import '../js_ast/js_ast.dart' as JS;
+import '../js_ast/js_ast.dart' show js;
import 'code_generator.dart' show CodeGenerator;
import 'error_helpers.dart' show errorSeverity, formatError, sortErrors;
import 'extension_types.dart' show ExtensionTypeSet;
@@ -509,8 +510,10 @@ class JSModuleFile {
}
var text = printer.getText();
- var rawSourceMap = options.inlineSourceMap ? builtMap : null;
- text = text.replaceFirst(sourceMapHoleID, JSON.encode(rawSourceMap));
+ var rawSourceMap = options.inlineSourceMap
+ ? js.escapedString(JSON.encode(builtMap)).value
+ : 'null';
+ text = text.replaceFirst(sourceMapHoleID, rawSourceMap);
return new JSModuleCode(text, builtMap);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698