Commit c8ce0cf9 authored by gsathya's avatar gsathya Committed by Commit bot

[promises] Set correct method on Promise.reject TypeError

R=adamk@chromium.org

Review-Url: https://codereview.chromium.org/2593243002
Cr-Commit-Position: refs/heads/master@{#41905}
parent 6f08e9af
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment