Skip to content

Commit

Permalink
refactor(daemon): Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Kris Kowal <[email protected]>
  • Loading branch information
rekmarks and kriskowal authored Feb 22, 2024
1 parent e285f4c commit bdaf855
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/daemon/src/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,8 @@ const makeDaemonCore = async (
provideControllerForFormulaIdentifier(formulaIdentifier)
);
return controller.external.then(value => {
// Release the value to the public only after ensuring
// we can reverse-lookup its nonce.
if (typeof value === 'object' && value !== null) {
formulaIdentifierForRef.set(value, formulaIdentifier);
}
Expand Down
3 changes: 1 addition & 2 deletions packages/daemon/test/test-endo.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,8 +881,7 @@ test('name and reuse inspector', async t => {
await stop(locator);
});

// This tests behavior that previously failed due to a bug.
// See: https://github.com/endojs/endo/issues/2021
// Regression test for: https://github.com/endojs/endo/issues/2021
test('eval-mediated worker name', async t => {
const { promise: cancelled, reject: cancel } = makePromiseKit();
t.teardown(() => cancel(Error('teardown')));
Expand Down

0 comments on commit bdaf855

Please sign in to comment.