-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
Fix Array.prototype.toString() stackoverflow #1976
Conversation
Jint/Native/Array/ArrayPrototype.cs
Outdated
{ | ||
return value.IsNullOrUndefined() | ||
return value.IsNullOrUndefined() || thisObject == value |
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.
for clarity, I think this should be ReferenceEquals(thisObject, value)
, the operator overloads can be a bit quirky
…ank/jint into fix-array-join-stackoverflow
I modified the code because |
This will make join calls very costly as now every time another array is being created, or did I misunderstand? |
Yes, maybe a better aproach would be to pass down the |
I haven't dug deep into this problem, but I would assume that other types would also be problematic, not just concrete |
By looking at V8 code, it seems that at least following are vulnerable to cyclic behavior (V8 has safeguards):
|
There's |
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.
Looking good, thank you for taking the time iterating!
Closes #1975