-
Notifications
You must be signed in to change notification settings - Fork 30k
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
smalloc: cleanup & refactoring #920
Conversation
Non-blocking comment: this seems to increase the number of round trips between JS and C++ for a given Alloc call; does moving the type checking logic to JS balance that out, perf-wise? |
(Otherwise this looks good to me pending @trevnorris' +1) |
ping @trevnorris |
@@ -152,19 +166,9 @@ size_t ExternalArraySize(enum ExternalArrayType type) { | |||
void CopyOnto(const FunctionCallbackInfo<Value>& args) { | |||
Environment* env = Environment::GetCurrent(args); | |||
|
|||
if (!args[0]->IsObject()) | |||
return env->ThrowTypeError("source must be an object"); | |||
if (!args[2]->IsObject()) |
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.
Mind switching these to ASSERT()
? Useful for when we're calling these directly from core.
couple minor comments. LGTM otherwise. |
69fb5f8
to
1b3d362
Compare
@trevnorris added asserts. PTAL |
@vkurchatkin LGTM. Great work. |
PR-URL: #920 Reviewed-By: Chris Dickinson <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
PR-URL: #920 Reviewed-By: Chris Dickinson <[email protected]> Reviewed-By: Trevor Norris <[email protected]>
R=@trevnorris