Skip to content

Commit

Permalink
[DevTools] Initialize InspectorSession later
Browse files Browse the repository at this point in the history
Restoring InspectorSession may send protocol notifications
synchronously, so we should setup all bindings beforehand.

[email protected]

(cherry picked from commit c27cabf)

Bug: 804214
Change-Id: I68989990fe210a61251dc20047b891fa4155d596
Reviewed-on: https://chromium-review.googlesource.com/879137
Reviewed-by: Pavel Feldman <[email protected]>
Commit-Queue: Dmitry Gozman <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#531349}
Reviewed-on: https://chromium-review.googlesource.com/884510
Reviewed-by: Dmitry Gozman <[email protected]>
Cr-Commit-Position: refs/branch-heads/3325@{#72}
Cr-Branched-From: bc084a8-refs/heads/master@{#530369}
  • Loading branch information
dgozman committed Jan 24, 2018
1 parent a76d99a commit f698044
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,6 @@ WebDevToolsAgentImpl::Session::Session(
: agent_(agent),
frame_(agent->web_local_frame_impl_),
binding_(this, std::move(request)) {
InitializeInspectorSession(reattach_state);

io_session_ =
new IOSession(Platform::Current()->GetIOTaskRunner(),
frame_->GetFrame()->GetTaskRunner(TaskType::kUnthrottled),
Expand All @@ -329,6 +327,8 @@ WebDevToolsAgentImpl::Session::Session(
host_ptr_.Bind(std::move(host_ptr_info));
host_ptr_.set_connection_error_handler(WTF::Bind(
&WebDevToolsAgentImpl::Session::Detach, WrapWeakPersistent(this)));

InitializeInspectorSession(reattach_state);
}

void WebDevToolsAgentImpl::Session::Trace(blink::Visitor* visitor) {
Expand Down

0 comments on commit f698044

Please sign in to comment.