Closed darvld closed 1 month ago
Issues
12 New issues
0 Accepted issues
Measures
0 Security Hotspots
60.5% Coverage on New Code
0.0% Duplication on New Code
Attention: Patch coverage is 51.26147%
with 425 lines
in your changes missing coverage. Please review.
Project coverage is 52.55%. Comparing base (
84ec973
) to head (40acda6
).
Summary
Adds a custom implementation of the Node.js
Buffer
class, for use both as a global symbol and as part of thenode:buffer
built-in module. Two new interfaces are added:BufferInstance
represents actualBuffer
objects, withBufferClass
serving as meta-object, holding all static (class-level) properties and methods.This means that when injected into a guest context, there should only be one instance of
BufferClass
, which is bound as theBuffer
symbol (and insidenode:buffer
), which can in turn be used to create multipleBufferInstance
objects using the Node.js API.Pending changes
The following changes are vital to the feature and currently block merge:
ProxyObject
implementation forBufferClass
.node:buffer
builtin module to use the new implementation.BufferClass
instance as a globalBuffer
symbol.Buffer
polyfill and ensure only the new implementation is available in guest contexts.