Skip to content
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: Avoid stack overflow when stringifying objects #7721

Merged

Conversation

joeyparrish
Copy link
Member

@joeyparrish joeyparrish commented Dec 5, 2024

Add special case for arrays, for compatibility with frameworks or polyfills that add properties to Array or Array instances.

Add special case for functions, which always contain circular references and are unexpected in this context. These seem to appear because of the frameworks/polyfills mentioned above.

Move everything to ObjectUtils, since this is extremely generic.

Closes #7435

Add special case for arrays, for compatibility with frameworks or polyfills that add properties to Array or Array instances.

Add special case for functions, which always contain circular references and are unexpected in this context.  These seem to appear because of the frameworks/polyfills mentioned above.
@shaka-bot
Copy link
Collaborator

shaka-bot commented Dec 5, 2024

Incremental code coverage: 98.63%

@joeyparrish joeyparrish changed the title wip: Improve stringified objects fix: Avoid stack overflow when stringifying objects Dec 6, 2024
@joeyparrish joeyparrish marked this pull request as ready for review December 6, 2024 18:48
@joeyparrish
Copy link
Member Author

Reporter on video-dev Slack confirms that this fixes the issue for him!

Copy link
Member

@tykus160 tykus160 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

lib/util/object_utils.js Outdated Show resolved Hide resolved
@joeyparrish
Copy link
Member Author

I just made those edits in the GitHub web UI, so I'll be cautious and let the lint & test runs complete before merging.

@joeyparrish joeyparrish merged commit 90e47eb into shaka-project:main Dec 6, 2024
16 of 17 checks passed
@joeyparrish joeyparrish deleted the improve-stringified-objects branch December 6, 2024 22:39
joeyparrish added a commit that referenced this pull request Dec 11, 2024
Add special case for arrays, for compatibility with frameworks or
polyfills that add properties to Array or Array instances.

Add special case for functions, which always contain circular references
and are unexpected in this context. These seem to appear because of the
frameworks/polyfills mentioned above.

Move everything to ObjectUtils, since this is extremely generic.

Closes #7435
joeyparrish added a commit that referenced this pull request Dec 12, 2024
Add special case for arrays, for compatibility with frameworks or
polyfills that add properties to Array or Array instances.

Add special case for functions, which always contain circular references
and are unexpected in this context. These seem to appear because of the
frameworks/polyfills mentioned above.

Move everything to ObjectUtils, since this is extremely generic.

Closes #7435
joeyparrish added a commit that referenced this pull request Dec 12, 2024
Add special case for arrays, for compatibility with frameworks or
polyfills that add properties to Array or Array instances.

Add special case for functions, which always contain circular references
and are unexpected in this context. These seem to appear because of the
frameworks/polyfills mentioned above.

Move everything to ObjectUtils, since this is extremely generic.

Closes #7435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RangeError: Maximum call stack size exceeded on Tizen WebView when playing DRM content
3 participants