-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
perf_hooks: fix stack overflow error #60084
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60084 +/- ##
==========================================
+ Coverage 88.43% 88.45% +0.01%
==========================================
Files 703 703
Lines 207795 207819 +24
Branches 40022 40029 +7
==========================================
+ Hits 183767 183824 +57
+ Misses 16021 15976 -45
- Partials 8007 8019 +12
🚀 New features to boost your workflow:
|
*/ | ||
primordials.SafeArrayPrototypePushApply = (arr, items) => { | ||
let start = 0; | ||
let end = start + 0x1000; |
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.
Is there any reason not to make this just end = 4096
?
let end = start + 0x1000; | ||
while (end < items.length) { | ||
ArrayPrototypePushApply(arr, ArrayPrototypeSlice(items, start, start = end)); | ||
end += 0x1000; |
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.
It seems like the code may be more readable if 4096 was used instead of hex.
Alternative to #54772, as suggested by #54772 (comment)