Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: src/js/promise.js

Issue 2593243002: [promises] Set correct method on Promise.reject TypeError (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/promise.js
diff --git a/src/js/promise.js b/src/js/promise.js
index 9bf378025f48504f8e25e65923e5344846138391..eb63c280a181649e52877550c4e03bc43098ab67 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -126,7 +126,7 @@ function NewPromiseCapability(C, debugEvent) {
// Promise.reject ( x )
function PromiseReject(r) {
if (!IS_RECEIVER(this)) {
- throw %make_type_error(kCalledOnNonObject, PromiseResolve);
+ throw %make_type_error(kCalledOnNonObject, PromiseReject);
}
if (this === GlobalPromise) {
// Optimized case, avoid extra closure.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698