src: use SealHandleScope for inspector tasks · nodejs/node@c1e03ed (original) (raw)

Original file line number Diff line number Diff line change
@@ -269,13 +269,7 @@ void MainThreadInterface::DispatchMessages() {
269 269 std::swap(dispatching_message_queue_.front(), task);
270 270 dispatching_message_queue_.pop_front();
271 271
272 -// TODO(addaleax): The V8 inspector code currently sometimes allocates
273 -// handles that leak to the outside scope, rendering a HandleScope here
274 -// necessary. This handle scope can be removed/turned into a
275 -// SealHandleScope once/if
276 -// https://chromium-review.googlesource.com/c/v8/v8/+/1484304 makes it
277 -// into our copy of V8, maybe guarded with #ifdef DEBUG if we want.
278 - v8::HandleScope handle_scope(isolate_);
272 + v8::SealHandleScope seal_handle_scope(isolate_);
279 273 task->Call(this);
280 274 }
281 275 } while (had_messages);