-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(node): custom Buffer implementation #1072
Conversation
c359790
to
9c41494
Compare
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Signed-off-by: Dario Valdespino <dvaldespino00@gmail.com>
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1072 +/- ##
==========================================
- Coverage 53.17% 52.55% -0.62%
==========================================
Files 405 413 +8
Lines 14207 15055 +848
Branches 2394 2720 +326
==========================================
+ Hits 7554 7912 +358
- Misses 5903 6236 +333
- Partials 750 907 +157
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 11 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
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.