-
Notifications
You must be signed in to change notification settings - Fork 212
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(marshal): serialize empty objects as data, not pass-by-reference #2622
Conversation
Finally change the serialization of a plain empty object, i.e. `harden({})`, from a pass-by-reference "marker" to plain pass-by-copy data. We think we've identified all the places where an empty object was used represent a marker, and changed them to use `Far(iface, {})` instead, which triggers pass-by-reference. refs #2018
@michaelfig any idea what's making this test fail? I thought we'd caught all the empty-objects-as-handle that needed changing. The specific failure (https://github.com/Agoric/agoric-sdk/pull/2622/checks?check_run_id=2093138223#step:9:1558) is in |
Wait, weird, I re-ran the checks and the second time it didn't fail. I'm not sure what's going on. |
Ok, I think that was an artifact, the test looks like it might be timing sensitive, and the assertion was that the number of calls to the timer handler was 2 instead of 1, which sounds like timing. So I think this is ready for review. This flips the big #2018 switch, so review really means "are we ready to change the behavior of |
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.
LGTM whew!
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.
LGTM!
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.
LGTM! I think we are ready to flip the switch
Finally change the serialization of a plain empty object, i.e.
harden({})
,from a pass-by-reference "marker" to plain pass-by-copy data. We think we've
identified all the places where an empty object was used represent a marker,
and changed them to use
Far(iface, {})
instead, which triggerspass-by-reference.
refs #2018