svn commit r16427 - trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit r16427 - trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino

svn-9
Author: keith
Date: Wed Apr 30 22:07:16 2008
New Revision: 16427

Log:

Fixing Mashup-740. Instead of sending in an object[] in to the Javascript function we now create a Native Array and send it in

Modified:
   trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java

Modified: trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java
==============================================================================
--- trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java (original)
+++ trunk/wsf/javascript/rhino/message_receiver/src/org/wso2/javascript/rhino/JavaScriptReceiver.java Wed Apr 30 22:07:16 2008
@@ -1054,7 +1054,12 @@
             OMElement omElement = (OMElement) iterator.next();
             objectList.add(createParam(omElement, type, engine));
         }
-        return objectList.toArray();
+        int length = objectList.size();
+        NativeArray nativeArray = new NativeArray(0);
+        for (int i = 0; i < length; i++) {
+            nativeArray.put(i, nativeArray, objectList.get(i));
+        }
+        return nativeArray;
     }
 
     /**

_______________________________________________
Wsf-javascript-dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/wsf-javascript-dev