[DevTools] Keep IP address of HttpServer as a member of DevToolsHttpHandlerImpl.
commit9fd9f0a04570cefb62b18bdac864636fc7e05026
authorbw80.lee <bw80.lee@samsung.com>
Tue, 28 Oct 2014 19:23:09 +0000 (28 12:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 28 Oct 2014 19:23:32 +0000 (28 19:23 +0000)
treebc67aa78e9dc273d6f972eb91664b9da43e7bc96
parent80024a35b06d2d5b3cb371a76fc4b0e1b4ea7cec
[DevTools] Keep IP address of HttpServer as a member of DevToolsHttpHandlerImpl.

Fix the problem that loading inspector from content_shell is failing with
thread_checker_.CalledOnValidThread() failed.

At ShellDevToolsFrontend::Show(), DevToolsHttpHandlerImpl::GetFrontendURL()
is called to get the frontend url, and inside the function,
HttpServer::GetLocalAddress() is called directly which is expected to be
called on the DevToolsHandler thread only.

To prevent the DCHECK failure, this patch keeps the ip address of HttpServer
as a member of DevToolsHttpHandlerImpl instance and use it.

BUG=425423

Review URL: https://codereview.chromium.org/666673007

Cr-Commit-Position: refs/heads/master@{#301684}
content/browser/devtools/devtools_http_handler_impl.cc
content/browser/devtools/devtools_http_handler_impl.h