endojs / endo

Endo is a distributed secure JavaScript sandbox, based on SES
Apache License 2.0
804 stars 71 forks source link

refactor(ses): Move makeLRUCacheMap to a dedicated file #1983

Closed gibson042 closed 8 months ago

gibson042 commented 8 months ago

Description

makeLRUCacheMap is only used by the SES error system, but is not really specific to it. It should eventually be an endo export, possibly in its own package (just not in common, which itself depends upon ses), but this PR just promotes it up one level into an easily-movable file for when that time comes.

Security Considerations

This code is depended upon by SES assert code, and therefore cannot itself assume a hardened environment. All of the existing commentary and freeze calls were preserved.

Scaling Considerations

n/a

Documentation Considerations

None yet.

Testing Considerations

Testing was consolidated into packages/ses/test/test-lru-cache-map.js.

Upgrade Considerations

n/a