| Index: src/promise.js
|
| diff --git a/src/promise.js b/src/promise.js
|
| index 97fc69cd266573b956399c129ad5c25dc95ed462..b509e76e4a9d16c9a7ba1db080b1708236d38777 100644
|
| --- a/src/promise.js
|
| +++ b/src/promise.js
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -(function(global, utils) {
|
| +(function(global, utils, extrasUtils) {
|
|
|
| "use strict";
|
|
|
| @@ -388,4 +388,13 @@ utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [
|
| "promise_then", PromiseThen,
|
| ]);
|
|
|
| +// This allows extras to create promises quickly without building extra
|
| +// resolve/reject closures, and allows them to later resolve and reject any
|
| +// promise without having to hold on to those closures forever.
|
| +utils.InstallFunctions(extrasUtils, 0, [
|
| + "createPromise", PromiseCreate,
|
| + "resolvePromise", PromiseResolve,
|
| + "rejectPromise", PromiseReject
|
| +]);
|
| +
|
| })
|
|
|