Skip to content

Commit 3b0d160

Browse files
committed
src: add HandleScope to loop in heap_utils,
1 parent d09c3ff commit 3b0d160

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/heap_utils.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,11 @@ class JSGraph : public EmbedderGraph {
117117
Local<String> wraps_string = FIXED_ONE_BYTE_STRING(isolate_, "wraps");
118118
Local<String> to_string = FIXED_ONE_BYTE_STRING(isolate_, "to");
119119

120-
for (const std::unique_ptr<Node>& n : nodes_)
121-
info_objects[n.get()] = Object::New(isolate_);
120+
{
121+
HandleScope handle_scope(isolate_);
122+
for (const std::unique_ptr<Node>& n : nodes_)
123+
info_objects[n.get()] = Object::New(isolate_);
124+
}
122125

123126
{
124127
HandleScope handle_scope(isolate_);

0 commit comments

Comments
 (0)