-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(swingset): initializeKindHandleKind early enough to support durables
Previously, `kindIDID` (the ID of the virtual object Kind that is used to hold the KindHandles we need for durable kinds) was allocated on-demand, the first time `makeKindHandle()` was called. The ID it received (and the ID of everything allocate afterwards) thus depended upon if/when userspace decided to use `makeKindHandle()`. In addition, `vrm.registerKind()` for the KindHandle kind was not called until `kindIDID` itself was allocated. This doesn't necessarily happen at all in the version-2 of a vat (i.e. if v2 doesn't define any additional durable kinds), and can't be relied upon to happen before v2 needs to deserialize the KindHandles that live in the 'baggage'. So this commit changes liveslots to factor out the initialization and registration into a new `initializeKindHandleKind` function, and arranges to call it during `startVat()`. Several "fake" test harnesses in `tools/` were updated to call it as they build their stuff. Many unit tests were updated to deal with the change in allocated IDs, but they ought to be somewhat more stable now. Two of these updates puzzled me: * In `test-gc-kernel.js`, I understand why doomedExport1Vref changed from o+9 to o+10, and I'm not surprised that doomedExport2Vref is now o+11, but I don't understand why doomedExport2Vref was o+9 before instead of o+10. * In test-virtualObjectGC.js line 1297, why did the single- and multi- facet test cases start behaving the same way? Why were they different before? refs #1848
- Loading branch information
Showing
14 changed files
with
98 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.