Skip to content
Commit Detail

Commit c259dbc

Author
Kenton Varda <kenton@cloudflare.com> 2025-04-11 11:14:41 -0500
Parents
4d6df91
Tree
4612025
Cleanup: Remove ExternalMemoryAccounter.

The entire purpose of v8::ExternalMemoryAccounter is to verify that all adjustments add to zero in the end.

But we don't want that, so we created a wrapper, jsg::ExternalMemoryAccounter, whose entire purpose is to cause the adjustments to add to zero by applying a final adjustment that is the negation of the sum of all previous adjustments.

This is silly. We should just use AdjustAmountOfExternalAllocatedMemory() directly.

There's just one problem, which is that AdjustAmountOfExternalAllocatedMemory() is deprecated, in favor of ExternalMemoryAccounter. We should probably just patch v8 to un-deprecate it. For now this commit will cause a deprecation warning.

Files changed

4 files changed~4 modified