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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/codegen.dart

Issue 1366673003: dart2js: fix for https://github.com/dart-lang/sdk/issues/24412 (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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: pkg/compiler/lib/src/js_backend/codegen/codegen.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index 44a52470b25c0b98d02415c07023dc87be85e59a..ad7d2141beabe16cd376dd75a2d7adf95bed7cc1 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -639,6 +639,14 @@ class CodeGenerator extends tree_ir.StatementVisitor
@override
void visitTry(tree_ir.Try node) {
+ void register(ClassElement classElement) {
+ if (classElement == null) return;
+ registry.registerInstantiatedClass(classElement);
+ }
+ // We might catch JavaScript exceptions.
+ register(glue.jsPlainJavaScriptObjectClass);
+ register(glue.jsUnknownJavaScriptObjectClass);
asgerf 2015/09/23 19:26:40 I get that we ought to register these because they
sra1 2015/09/24 00:24:45 I am conflicted about this fix. Real programs need
+
js.Block tryBlock = buildBodyBlock(node.tryBody);
tree_ir.Variable exceptionVariable = node.catchParameters.first;
js.VariableDeclaration exceptionParameter =
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/codegen/glue.dart » ('j') | pkg/compiler/lib/src/js_backend/codegen/glue.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698