| 93 | } |
| 94 | |
| 95 | Object InitPromise(Env env) { |
| 96 | Object exports = Object::New(env); |
| 97 | |
| 98 | exports["isPromise"] = Function::New(env, IsPromise); |
| 99 | exports["resolvePromise"] = Function::New(env, ResolvePromise); |
| 100 | exports["rejectPromise"] = Function::New(env, RejectPromise); |
| 101 | exports["promiseReturnsCorrectEnv"] = |
| 102 | Function::New(env, PromiseReturnsCorrectEnv); |
| 103 | exports["thenMethodOnFulfilled"] = Function::New(env, ThenMethodOnFulfilled); |
| 104 | exports["thenMethodOnFulfilledOnRejectedResolve"] = |
| 105 | Function::New(env, ThenMethodOnFulfilledOnRejectedResolve); |
| 106 | exports["thenMethodOnFulfilledOnRejectedReject"] = |
| 107 | Function::New(env, ThenMethodOnFulfilledOnRejectedReject); |
| 108 | exports["catchMethod"] = Function::New(env, CatchMethod); |
| 109 | |
| 110 | return exports; |
| 111 | } |