Revision: 1893
          http://svn.sourceforge.net/vexi/?rev=1893&view=rev
Author:   mkpg2
Date:     2007-06-28 14:05:47 -0700 (Thu, 28 Jun 2007)

Log Message:
-----------
Fix. Need to set Thread.cascadedTo when returning (to NULL or the trapname if 
autocascading).

Modified Paths:
--------------
    core/trunk/org.ibex.js/src/org/ibex/js/Interpreter.jpp

Modified: core/trunk/org.ibex.js/src/org/ibex/js/Interpreter.jpp
===================================================================
--- core/trunk/org.ibex.js/src/org/ibex/js/Interpreter.jpp      2007-06-28 
18:17:44 UTC (rev 1892)
+++ core/trunk/org.ibex.js/src/org/ibex/js/Interpreter.jpp      2007-06-28 
21:05:47 UTC (rev 1893)
@@ -226,7 +226,7 @@
                                // handles automatic cascading(FOOTNOTE:1)
                                if (!tm.cascadeHappened && 
!JSU.toBoolean(retval)) {
                                     JS.Trap t = tm.t.nextWrite();
-                                    if(t == null && tm.t.target() instanceof 
JS.Clone) {
+                                    while(t == null && tm.t.target() 
instanceof JS.Clone) {
                                         t = 
((JS.Clone)tm.t.target()).getTrap(tm.t.key());
                                         if(t != null && !t.isWriteTrap()) t = 
t.nextWrite();
                                     }
@@ -238,8 +238,12 @@
                                     } else {
                                         didTrapPut = true;
                                         if(!tm.pauseOnCascade) 
tm.t.target().put(tm.t.key(), tm.val);
+                                        else Thread.cascadedTo = 
tm.trapargs.trapname;
                                     }
-                                } else retval = CASCADE_PREVENTED;
+                                }else{
+                                       Thread.cascadedTo = null;
+                                       retval = CASCADE_PREVENTED;
+                                }
                             }
                         }
                         CallMarker cm = (CallMarker) o;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to