diff options
Diffstat (limited to 'test_ffi/tests/test.js')
-rw-r--r-- | test_ffi/tests/test.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test_ffi/tests/test.js b/test_ffi/tests/test.js index cb0ea71ab..9f6cc4547 100644 --- a/test_ffi/tests/test.js +++ b/test_ffi/tests/test.js @@ -376,11 +376,12 @@ assertEquals(isNullBuffer(new Uint8Array()), false, "isNullBuffer(new Uint8Array // Externally backed ArrayBuffer has a non-null data pointer, even though its length is zero. const externalZeroBuffer = new Uint8Array(Deno.UnsafePointerView.getArrayBuffer(ptr0, 0)); -// However: V8 Fast calls get null pointers for zero-sized buffers. -assertEquals(isNullBuffer(externalZeroBuffer), true, "isNullBuffer(externalZeroBuffer) !== true"); -// Also: V8's `Local<ArrayBuffer>->Data()` method returns null pointers for zero-sized buffers. -// Using `Local<ArrayBuffer>->GetBackingStore()->Data()` would give the original pointer. -assertEquals(isNullBufferDeopt(externalZeroBuffer), true, "isNullBufferDeopt(externalZeroBuffer) !== true"); +// V8 Fast calls used to get null pointers for all zero-sized buffers no matter their external backing. +assertEquals(isNullBuffer(externalZeroBuffer), false, "isNullBuffer(externalZeroBuffer) !== false"); +// V8's `Local<ArrayBuffer>->Data()` method also used to similarly return null pointers for all +// zero-sized buffers which would not match what `Local<ArrayBuffer>->GetBackingStore()->Data()` +// API returned. These issues have been fixed in https://bugs.chromium.org/p/v8/issues/detail?id=13488. +assertEquals(isNullBufferDeopt(externalZeroBuffer), false, "isNullBufferDeopt(externalZeroBuffer) !== false"); // The same pointer with a non-zero byte length for the buffer will return non-null pointers in // both Fast call and V8 API calls. |