2003/11/17 01:53:25
[org.ibex.core.git] / src / org / xwt / Res.java
index e9a9465..0652e09 100644 (file)
@@ -185,10 +185,8 @@ public abstract class Res extends JS {
                         int ret = super.read(b, off, len);
                         if (ret != 1) bytesDownloaded += ret;
                         Scheduler.add(new Scheduler.Task() { public void perform() {
-                            JSArray args = new JSArray();
-                            args.addElement(new Integer(bytesDownloaded));
-                            args.addElement(new Integer(is instanceof KnownLength ? ((KnownLength)is).getLength() : 0));
-                            callback.call(args);
+                            callback.call(N(bytesDownloaded),
+                                          N(is instanceof KnownLength ? ((KnownLength)is).getLength() : 0), null, null, 2);
                         } });
                         return ret;
                     }