Skip to content

Conversation

@bnoordhuis
Copy link
Collaborator

For a JS value that cannot be serialized as-is by V8's serializer, clone and filter its properties, then try again. With this change, serialization should be possible for practically all JS values.

For a JS value that cannot be serialized as-is by V8's serializer,
clone and filter its properties, then try again. With this change,
serialization should be possible for practically all JS values.
expected = {"x" => 42}
expected = {
"m" => {1 => 2, 3 => 4},
"s" => {},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@eregon fyi - seems like a bug

@SamSaffron SamSaffron merged commit 728da79 into rubyjs:main Jan 19, 2025
22 of 25 checks passed
@bnoordhuis bnoordhuis deleted the filter branch January 19, 2025 22:00
bnoordhuis added a commit to bnoordhuis/mini_racer that referenced this pull request Mar 13, 2025
* Add property filter fallback mode to serializer

For a JS value that cannot be serialized as-is by V8's serializer,
clone and filter its properties, then try again. With this change,
serialization should be possible for practically all JS values.

* fixup! truffleruby
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.

2 participants