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

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

Issue 998043002: Fixes in codegen and test script (Closed) Base URL: git@github.com:dart-lang/dev_compiler.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 | « .gitignore ('k') | lib/src/js/js_ast.dart » ('j') | test/test.sh » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/js_codegen.dart
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart
index 1c70c19e778f183bf0a2e1a6ead9be4107a7bd07..6f135f0d21cad9d566835518470bb9e35b167124 100644
--- a/lib/src/codegen/js_codegen.dart
+++ b/lib/src/codegen/js_codegen.dart
@@ -1537,7 +1537,9 @@ class JSCodegenVisitor extends GeneralizingAstVisitor with ConversionVisitor {
if (node.catchKeyword != null) {
var name = node.exceptionParameter;
if (name != null && name.name != _catchParameter) {
- body.add(js.statement('let # = #;', [_visit(name), _catchParameter]));
+ var decl = new JS.VariableDeclaration(name.name);
+ decl.sourceInformation = name;
+ body.add(js.statement('let # = #;', [decl, _catchParameter]));
_catchParameter = name.name;
}
if (node.stackTraceParameter != null) {
« no previous file with comments | « .gitignore ('k') | lib/src/js/js_ast.dart » ('j') | test/test.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698