Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThang Tran <trankimthang279@gmail.com>2019-12-21 11:09:15 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2019-12-25 14:01:56 +0300
commit90f7a5c010f7f22eb73807f6401e3924fa36c700 (patch)
treec426e012f4e59d9ea4ff904a35262d72296ef257 /src/node_http2.cc
parent643241ae3f5177572465f701ef9ed0d0f24ea4d0 (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.cc3
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);