Commit 5fcfe05a authored by caitpotter88's avatar caitpotter88 Committed by Commit bot

[promise] revert error message change for Promise.resolve()

Previously, it was `ToString(PromiseCast)`, which comes out as
"function resolve() { [native code] }". I had changed it to "Promise.resolve()",
but the other style is more consistently used.

LOG=N
R=cbruni@chromium.org, adamk@chromium.org, littledan@chromium.org

Review URL: https://codereview.chromium.org/1560163002

Cr-Commit-Position: refs/heads/master@{#33129}
parent e4af5cdb
......@@ -325,7 +325,7 @@ function PromiseCatch(onReject) {
function PromiseCast(x) {
if (!IS_RECEIVER(this)) {
throw MakeTypeError(kCalledOnNonObject, "Promise.resolve");
throw MakeTypeError(kCalledOnNonObject, PromiseCast);
}
if (IsPromise(x) && x.constructor === this) return x;
......
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