diff options
author | Thang Tran <trankimthang279@gmail.com> | 2019-12-21 11:09:15 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-12-25 14:01:56 +0300 |
commit | 90f7a5c010f7f22eb73807f6401e3924fa36c700 (patch) | |
tree | c426e012f4e59d9ea4ff904a35262d72296ef257 /src/node_http2.cc | |
parent | 643241ae3f5177572465f701ef9ed0d0f24ea4d0 (diff) |
src: set arraybuffer_untransferable_private_symbol
for `ArrayBuffer` whose buffers are not own by `BackingStore`. This
would help us avoid problem with the new V8 BackingStore API where new
`ArrayBuffer` is allocated at the same place of previous `ArrayBuffer`
that is still being tracked in `BackingStore` table.
PR-URL: https://github.com/nodejs/node/pull/31053
Refs: https://github.com/nodejs/node/issues/31052
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r-- | src/node_http2.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc index 1110288f6f9..a4d1df0ca9f 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -578,6 +578,9 @@ Http2Session::Http2Session(Environment* env, // TODO(thangktran): drop this check when V8 is pumped to 8.0 . if (!ab->IsExternal()) ab->Externalize(ab->GetBackingStore()); + ab->SetPrivate(env->context(), + env->arraybuffer_untransferable_private_symbol(), + True(env->isolate())).Check(); js_fields_ab_.Reset(env->isolate(), ab); Local<Uint8Array> uint8_arr = Uint8Array::New(ab, 0, kSessionUint8FieldCount); |