Skip to content

Commit

Permalink
WIP test(liveslots): promises are not durable even if relaxDurability…
Browse files Browse the repository at this point in the history
…Rules
  • Loading branch information
erights committed Jun 20, 2024
1 parent 62c73f5 commit a3539f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/swingset-liveslots/src/virtualReferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ export function makeVirtualReferenceManager(
*/
function isDurable(vref) {
const { type, id, virtual, durable, allocatedByVat } = parseVatSlot(vref);
if (relaxDurabilityRules) {
if (type === 'promise') {
// promises are not durable even if `relaxDurabilityRules === true`
return false;
} else if (relaxDurabilityRules) {
// we'll pretend an object is durable if running with relaxed rules
return true;
} else if (type === 'device') {
Expand Down

0 comments on commit a3539f9

Please sign in to comment.