You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calls to makeClientMarshaller share static mutable state: the results of 1 call to makeTranslationTable(...).
To Reproduce
This test fails:
test('calls to makeClientMarshaller do not share static mutable state',()=>{constm1=makeClientMarshaller();constm2=makeClientMarshaller();constcapData={body: '#"$0.Brand"',slots: ['board0123']};// b1 is a fresh synthetic remotable objectconstb1=m1.fromCapData(capData);// unless m2 somehow has access to state from m1, m2 can't access b1.constb2=m2.fromCapData(capData);expect(b1).not.toBe(b2);});
Expected behavior
The call to makeTranslationTable(...) should be inside makeClientMarshaller.
Exported function such as makeClientMarshaller should not close over static mutable state.
This follows from anything globally accessible is immutable data in OCap Discipline.
Platform Environment
what OS are you using? what version of Node.js?
v18.17.1
The text was updated successfully, but these errors were encountered:
Describe the bug
Calls to
makeClientMarshaller
share static mutable state: the results of 1 call tomakeTranslationTable(...)
.To Reproduce
This test fails:
Expected behavior
The call to
makeTranslationTable(...)
should be insidemakeClientMarshaller
.Exported function such as
makeClientMarshaller
should not close over static mutable state.This follows from anything globally accessible is immutable data in OCap Discipline.
Platform Environment
v18.17.1
The text was updated successfully, but these errors were encountered: