Index: src/js/promise.js |
diff --git a/src/js/promise.js b/src/js/promise.js |
index 29d84ff3a1a42b2614fd674002c77290186500e0..fd02b17d180c86adfadcc886bf162f2199e06d2a 100644 |
--- a/src/js/promise.js |
+++ b/src/js/promise.js |
@@ -68,27 +68,6 @@ function PromiseReject(r) { |
// Combinators. |
-// ES#sec-promise.resolve |
-// Promise.resolve ( x ) |
-function PromiseResolve(x) { |
- if (!IS_RECEIVER(this)) { |
- throw %make_type_error(kCalledOnNonObject, PromiseResolve); |
- } |
- if (%is_promise(x) && x.constructor === this) return x; |
- |
- // Avoid creating resolving functions. |
- if (this === GlobalPromise) { |
- var promise = %promise_internal_constructor(UNDEFINED); |
- %promise_resolve(promise, x); |
- return promise; |
- } |
- |
- // debugEvent is not so meaningful here as it will be resolved |
- var promiseCapability = %new_promise_capability(this, true); |
- %_Call(promiseCapability.resolve, UNDEFINED, x); |
- return promiseCapability.promise; |
-} |
- |
// ES#sec-promise.all |
// Promise.all ( iterable ) |
function PromiseAll(iterable) { |
@@ -198,7 +177,6 @@ utils.InstallFunctions(GlobalPromise, DONT_ENUM, [ |
"reject", PromiseReject, |
"all", PromiseAll, |
"race", PromiseRace, |
- "resolve", PromiseResolve |
]); |
%InstallToContext([ |