Changeset 2682

Show
Ignore:
Timestamp:
12/07/07 00:08:02 (13 months ago)
Author:
cho45
Message:

lang/javascript/jsdeferred/trunk/test-rhino.js:

sync のとりわすれ。他 var わすれの修正

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/jsdeferred/trunk/test-rhino.js

    r2679 r2682  
    88load("jsdeferred.js"); 
    99 
     10var data; 
    1011data = readFile("./test-jsdeferred.js"); 
    1112data = data.match(/\/\/ ::Test::Start::((?:\s|[^\s])+)::Test::End::/)[1]; 
     
    113114        var Global = (function () { return this })(); 
    114115        var runQueue = [{func:Main,time:0}]; 
    115         runQueue.process = sync(function () { 
     116        runQueue.process = function () { 
    116117                var now = new Date().valueOf(); 
    117118                for (var i = 0; i < runQueue.length; i++) { 
    118119                        if (runQueue[i].time <= now) { 
    119120                //              print("invoke"+uneval(runQueue[i])); 
    120                                 fun = runQueue[i].func; 
     121                                var fun = runQueue[i].func; 
    121122                                runQueue.splice(i, 1); 
    122123                                fun(); 
     
    124125                        } 
    125126                } 
    126         }); 
     127        }; 
    127128        runQueue.add    = function (func, delay) { 
    128129                this.push({id:++runQueue._id,func:func, time: new Date().valueOf() + delay});