Commit 094e95cd authored by gsathya's avatar gsathya Committed by Commit bot

[promises] don't store undefined resulting from ResolvePromise

Review-Url: https://codereview.chromium.org/2419713002
Cr-Commit-Position: refs/heads/master@{#40241}
parent 4fda85aa
...@@ -489,13 +489,13 @@ function PromiseResolve(x) { ...@@ -489,13 +489,13 @@ function PromiseResolve(x) {
// Avoid creating resolving functions. // Avoid creating resolving functions.
if (this === GlobalPromise) { if (this === GlobalPromise) {
var promise = PromiseCreate(); var promise = PromiseCreate();
var resolveResult = ResolvePromise(promise, x); ResolvePromise(promise, x);
return promise; return promise;
} }
// debugEvent is not so meaningful here as it will be resolved // debugEvent is not so meaningful here as it will be resolved
var promiseCapability = NewPromiseCapability(this, true); var promiseCapability = NewPromiseCapability(this, true);
var resolveResult = %_Call(promiseCapability.resolve, UNDEFINED, x); %_Call(promiseCapability.resolve, UNDEFINED, x);
return promiseCapability.promise; return promiseCapability.promise;
} }
......
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