lib,src: use built-in array buffer detach - #50130
Conversation
63d7adb to
8eaae52
Compare
|
Note that the v8 flag |
There was a problem hiding this comment.
this is a mutable property, so it must be a primordial
| if (viewBuffer.detached) { | |
| if (ArrayBufferPrototypeDetached(viewBuffer)) { |
There was a problem hiding this comment.
| if (ArrayBufferViewGetBuffer(view).detached) { | |
| if (ArrayBufferPrototypeDetached(ArrayBufferViewGetBuffer(view)) { |
There was a problem hiding this comment.
| const transferredBuffer = buffer.transfer(); | |
| const transferredBuffer = ArrayBufferPrototypeTransfer(buffer); |
There was a problem hiding this comment.
| transferredBuffer = buffer.transfer(); | |
| transferredBuffer = ArrayBufferPrototypeTransfer(buffer); |
There was a problem hiding this comment.
| desc.buffer = desc.buffer.transfer(); | |
| desc.buffer = ArrayBufferPrototypeTransfer(desc.buffer); |
There was a problem hiding this comment.
| const transferredBuffer = buffer.transfer(); | |
| const transferredBuffer = ArrayBufferPrototypeTransfer(buffer); |
There was a problem hiding this comment.
| if (firstPendingPullInto.buffer.detached) { | |
| if (ArrayBufferPrototypeDetached(firstPendingPullInto.buffer)) { |
There was a problem hiding this comment.
| firstPendingPullInto.buffer = firstPendingPullInto.buffer.transfer(); | |
| firstPendingPullInto.buffer = ArrayBufferPrototypeTransfer(firstPendingPullInto.buffer); |
There was a problem hiding this comment.
| desc.buffer = viewBuffer.transfer(); | |
| desc.buffer = ArrayBufferPrototypeTransfer(viewBuffer); |
8eaae52 to
9096c77
Compare
|
@legendecas would you be interested in removing the flag that disables arraybuffer.prototype.detach, from v8? |
|
Sure, the feature has been released since M111 and I believe it is a good time to remove the flag. |
|
v8/v8@9ebca66 the flag was removed since V8 12.6. |
I couldn't make the |
|
My |
This change requires v8 11.8, therefore can't be backported to v18 and v20