Skip to content

Commit

Permalink
src: use SealHandleScope for inspector tasks
Browse files Browse the repository at this point in the history
This addresses a TODO comment that can be resolved,
now that we have V8 7.4.

PR-URL: #27116
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  • Loading branch information
addaleax authored and danbev committed Apr 10, 2019
1 parent f1ab837 commit c1e03ed
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/inspector/main_thread_interface.cc
Original file line number Diff line number Diff line change
@@ -269,13 +269,7 @@ void MainThreadInterface::DispatchMessages() {
std::swap(dispatching_message_queue_.front(), task);
dispatching_message_queue_.pop_front();

// TODO(addaleax): The V8 inspector code currently sometimes allocates
// handles that leak to the outside scope, rendering a HandleScope here
// necessary. This handle scope can be removed/turned into a
// SealHandleScope once/if
// https://chromium-review.googlesource.com/c/v8/v8/+/1484304 makes it
// into our copy of V8, maybe guarded with #ifdef DEBUG if we want.
v8::HandleScope handle_scope(isolate_);
v8::SealHandleScope seal_handle_scope(isolate_);
task->Call(this);
}
} while (had_messages);

0 comments on commit c1e03ed

Please sign in to comment.