Fixes bug in html_viewer that could lead to dropping interface requests
commit887c3cdefe5b0ac5be1ff581bf11dd27e9a31f11
authorsky <sky@chromium.org>
Thu, 2 Jul 2015 00:06:05 +0000 (1 17:06 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 2 Jul 2015 00:07:04 +0000 (2 00:07 +0000)
treea768d20a5e43a7e2bdc73593118193de3f0dc74e
parent31a9ac51305255db5e006dc655458c4566620333
Fixes bug in html_viewer that could lead to dropping interface requests

Connections other than the first to html viewer asynchronously create
HTMLDocument. HTMLDocument's constructor registers as an
InterfaceFactory for a handful of services. This means that any
requests for services between the time of the connection and creation
of HTMLDocument are dropped on the floor. This patch queues up all
requests and then processes them once HTMLDocument is created.

BUG=none
TEST=covered by tests
R=msw@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#337138}
components/html_viewer/html_document_application_delegate.cc
components/html_viewer/html_document_application_delegate.h
mojo/application/public/cpp/application_connection.h
mojo/application/public/cpp/lib/service_registry.cc
mojo/application/public/cpp/lib/service_registry.h