Patch for Issue #3893. Labeled break or continue statements in JSNI methods were not properly obfuscated. This was caused because JsBreak and JsContinue do not traverse their labels when visited.
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@5863 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/js/ast/JsBreak.java b/dev/core/src/com/google/gwt/dev/js/ast/JsBreak.java
index 638029e..e175598 100644
--- a/dev/core/src/com/google/gwt/dev/js/ast/JsBreak.java
+++ b/dev/core/src/com/google/gwt/dev/js/ast/JsBreak.java
@@ -38,7 +38,11 @@
}
public void traverse(JsVisitor v, JsContext<JsStatement> ctx) {
- v.visit(this, ctx);
+ if (v.visit(this, ctx)) {
+ if (label != null) {
+ v.accept(label);
+ }
+ }
v.endVisit(this, ctx);
}
diff --git a/dev/core/src/com/google/gwt/dev/js/ast/JsContinue.java b/dev/core/src/com/google/gwt/dev/js/ast/JsContinue.java
index 8efb802..20c7556 100644
--- a/dev/core/src/com/google/gwt/dev/js/ast/JsContinue.java
+++ b/dev/core/src/com/google/gwt/dev/js/ast/JsContinue.java
@@ -39,6 +39,11 @@
public void traverse(JsVisitor v, JsContext<JsStatement> ctx) {
v.visit(this, ctx);
+ if (v.visit(this, ctx)) {
+ if (label != null) {
+ v.accept(label);
+ }
+ }
v.endVisit(this, ctx);
}