Skip to content

Commit d2bc0c1

Browse files
committed
add HandleScope in heap_utils loops
1 parent 0d90052 commit d2bc0c1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/heap_utils.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,9 @@ 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-
{
120+
for (const std::unique_ptr<Node>& n : nodes_) {
121121
HandleScope handle_scope(isolate_);
122-
for (const std::unique_ptr<Node>& n : nodes_)
123-
info_objects[n.get()] = Object::New(isolate_);
122+
info_objects[n.get()] = Object::New(isolate_);
124123
}
125124

126125
{

0 commit comments

Comments
 (0)