(executor, resolve, reject)
| 4972 | }; |
| 4973 | |
| 4974 | function cancellationExecute(executor, resolve, reject) { |
| 4975 | var promise = this; |
| 4976 | try { |
| 4977 | executor(resolve, reject, function(onCancel) { |
| 4978 | if (typeof onCancel !== "function") { |
| 4979 | throw new TypeError("onCancel must be a function, got: " + |
| 4980 | util.toString(onCancel)); |
| 4981 | } |
| 4982 | promise._attachCancellationCallback(onCancel); |
| 4983 | }); |
| 4984 | } catch (e) { |
| 4985 | return e; |
| 4986 | } |
| 4987 | } |
| 4988 | |
| 4989 | function cancellationAttachCancellationCallback(onCancel) { |
| 4990 | if (!this._isCancellable()) return this; |
nothing calls this directly
no outgoing calls
no test coverage detected