| Index: chrome/test/data/third_party/spaceport/js/util/chainAsync.js
|
| diff --git a/chrome/test/data/third_party/spaceport/js/util/chainAsync.js b/chrome/test/data/third_party/spaceport/js/util/chainAsync.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..50a180a37718c621524cc8cc8eb0cca6460034d7
|
| --- /dev/null
|
| +++ b/chrome/test/data/third_party/spaceport/js/util/chainAsync.js
|
| @@ -0,0 +1,18 @@
|
| +define([ ], function () {
|
| + return function chainAsync(functions) {
|
| + functions = functions.slice();
|
| +
|
| + function next() {
|
| + if (functions.length === 0) {
|
| + return;
|
| + }
|
| +
|
| + var fn = functions.shift();
|
| + fn(function () {
|
| + setTimeout(next, 0);
|
| + });
|
| + }
|
| +
|
| + setTimeout(next, 0);
|
| + };
|
| +});
|
|
|