-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement groupBy, withResolvers method #1352
Conversation
Signed-off-by: Seonghyun Kim <[email protected]>
Signed-off-by: Seonghyun Kim <[email protected]>
src/runtime/PromiseObject.cpp
Outdated
PromiseReaction::Capability PromiseObject::newPromiseCapability(ExecutionState& state, const Value& constructor, const Value& parentPromise) | ||
{ | ||
if (!constructor.isConstructor()) { | ||
ErrorObject::throwBuiltinError(state, ErrorCode::TypeError, ErrorObject::Messages::Not_Constructor); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about using the existing PromiseObject::newPromiseCapability(ExecutionState& state, Object* constructor, const Value& parentPromise)
function instead?
This function is invoked by only one function, and constructor
check can be done on the caller side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
Signed-off-by: Seonghyun Kim <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.