GeezerVison is showing github.com — src: set arraybuffer_untransferable_private_symbol · johnhenry/node@90f7a5c
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: src/node_buffer.cc +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -1213,6 +1213,10 @@ void Initialize(Local<Object> target, |
1213 | 1213 | // TODO(thangktran): drop this check when V8 is pumped to 8.0 . |
1214 | 1214 | if (!array_buffer->IsExternal()) |
1215 | 1215 | array_buffer->Externalize(array_buffer->GetBackingStore()); |
| 1216 | + array_buffer->SetPrivate( |
| 1217 | + env->context(), |
| 1218 | + env->arraybuffer_untransferable_private_symbol(), |
| 1219 | + True(env->isolate())).Check(); |
1216 | 1220 | CHECK(target |
1217 | 1221 | ->Set(env->context(), |
1218 | 1222 | FIXED_ONE_BYTE_STRING(env->isolate(), "zeroFill"), |
|
Collapse file
Copy file name to clipboardExpand all lines: src/node_http2.cc +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -578,6 +578,9 @@ Http2Session::Http2Session(Environment* env, |
578 | 578 | // TODO(thangktran): drop this check when V8 is pumped to 8.0 . |
579 | 579 | if (!ab->IsExternal()) |
580 | 580 | ab->Externalize(ab->GetBackingStore()); |
| 581 | + ab->SetPrivate(env->context(), |
| 582 | + env->arraybuffer_untransferable_private_symbol(), |
| 583 | + True(env->isolate())).Check(); |
581 | 584 | js_fields_ab_.Reset(env->isolate(), ab); |
582 | 585 | Local<Uint8Array> uint8_arr = |
583 | 586 | Uint8Array::New(ab, 0, kSessionUint8FieldCount); |
|