-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
timer_wrap: remove HandleScopes, check return size
Calls from JS to C++ have an implicit HandleScope. So there is no need to instantiate a new HandleScope in these basic cases. Check if the returned int64_t is an SMI and cast the return value to uint32_t instead of a double. Prevents needing to box the return value, and saves a small amount of execution time. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
- Loading branch information
1 parent
2122a77
commit de312cf
Showing
1 changed file
with
9 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters