Revision: 5863
Author: cromwellian
Date: Fri Jul 31 23:20:03 2009
Log: 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.


http://code.google.com/p/google-web-toolkit/source/detail?r=5863

Modified:
  /trunk/dev/core/src/com/google/gwt/dev/js/ast/JsBreak.java
  /trunk/dev/core/src/com/google/gwt/dev/js/ast/JsContinue.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/js/ast/JsBreak.java  Fri Sep 26  
08:20:00 2008
+++ /trunk/dev/core/src/com/google/gwt/dev/js/ast/JsBreak.java  Fri Jul 31  
23:20:03 2009
@@ -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);
    }

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/js/ast/JsContinue.java       Fri Sep 
 
26 08:20:00 2008
+++ /trunk/dev/core/src/com/google/gwt/dev/js/ast/JsContinue.java       Fri Jul 
 
31 23:20:03 2009
@@ -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);
    }



--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to