Skip to content

Commit d856e98

Browse files
committed
src: add HandleScope to edge loop in heap_utils
1 parent d1ab5ef commit d856e98

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

configure.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
valid_mips_float_abi = ('soft', 'hard')
5656
valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu')
5757
icu_versions = json.loads((tools_path / 'icu' / 'icu_versions.json').read_text(encoding='utf-8'))
58-
maglev_enabled_architectures = ('x64', 'arm', 'arm64', 's390x')
58+
maglev_enabled_architectures = ('x64', 'arm', 'arm64')
5959

6060
# builtins may be removed later if they have been disabled by options
6161
shareable_builtins = {'cjs_module_lexer/lexer': 'deps/cjs-module-lexer/lexer.js',
@@ -1830,7 +1830,6 @@ def configure_v8(o, configs):
18301830
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
18311831
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
18321832
o['variables']['v8_enable_maglev'] = B(not options.v8_disable_maglev and
1833-
flavor != 'zos' and
18341833
o['variables']['target_arch'] in maglev_enabled_architectures)
18351834
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
18361835
# Using the sandbox requires always allocating array buffer backing stores in the sandbox.

doc/api/util.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,14 @@ The `section` supports wildcard also:
135135

136136
```mjs
137137
import { debuglog } from 'node:util';
138-
const log = debuglog('foo-bar');
138+
const log = debuglog('foo');
139139

140140
log('hi there, it\'s foo-bar [%d]', 2333);
141141
```
142142

143143
```cjs
144144
const { debuglog } = require('node:util');
145-
const log = debuglog('foo-bar');
145+
const log = debuglog('foo');
146146

147147
log('hi there, it\'s foo-bar [%d]', 2333);
148148
```

src/heap_utils.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ class JSGraph : public EmbedderGraph {
180180
size_t i = 0;
181181
size_t j = 0;
182182
for (const auto& edge : edge_info.second) {
183+
HandleScope handle_scope(isolate_);
183184
Local<Object> to_object = info_objects[edge.second];
184185
Local<Object> edge_obj = Object::New(isolate_);
185186
Local<Value> edge_name_value;

src/node_http2.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ size_t Http2Settings::Init(
251251
for (uint32_t i = 0; i < numAddSettings; i++) {
252252
uint32_t key = buffer[offset + i * 2 + 0];
253253
uint32_t val = buffer[offset + i * 2 + 1];
254-
entries[count++] = nghttp2_settings_entry{static_cast<int32_t>(key), val};
254+
entries[count++] = nghttp2_settings_entry{(int32_t)key, val};
255255
}
256256
}
257257

@@ -331,8 +331,8 @@ void Http2Settings::Update(Http2Session* session, get_setting fn, bool local) {
331331
for (size_t i = 0; i < imax; i++) {
332332
// We flag unset the settings with a bit above the allowed range
333333
if (!(custom_settings.entries[i].settings_id & (~0xffff))) {
334-
uint32_t settings_id = static_cast<uint32_t>(
335-
custom_settings.entries[i].settings_id & 0xffff);
334+
uint32_t settings_id =
335+
(uint32_t)(custom_settings.entries[i].settings_id & 0xffff);
336336
size_t j = 0;
337337
while (j < count) {
338338
if ((buffer[IDX_SETTINGS_COUNT + 1 + j * 2 + 1] & 0xffff) ==
@@ -647,7 +647,7 @@ void Http2Session::FetchAllowedRemoteCustomSettings() {
647647
(buffer[offset + i * 2 + 0] & 0xffff) |
648648
(1
649649
<< 16); // setting the bit 16 indicates, that no values has been set
650-
entries[count++] = nghttp2_settings_entry{static_cast<int32_t>(key), 0};
650+
entries[count++] = nghttp2_settings_entry{(int32_t)key, 0};
651651
}
652652
remote_custom_settings_.number = count;
653653
}

0 commit comments

Comments
 (0)