| Index: shell/child_main.cc
|
| diff --git a/shell/child_main.cc b/shell/child_main.cc
|
| index 447a93918bd5042ace253a2ece0a0bc0b3f4aafd..05abbc6733f8b7b9adc3686ff11c83447493b36c 100644
|
| --- a/shell/child_main.cc
|
| +++ b/shell/child_main.cc
|
| @@ -175,7 +175,7 @@ class AppContext : public mojo::embedder::SlaveProcessDelegate {
|
|
|
| // ChildControllerImpl ---------------------------------------------------------
|
|
|
| -class ChildControllerImpl : public ChildController, public mojo::ErrorHandler {
|
| +class ChildControllerImpl : public ChildController {
|
| public:
|
| ~ChildControllerImpl() override {
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| @@ -210,14 +210,6 @@ class ChildControllerImpl : public ChildController, public mojo::ErrorHandler {
|
| binding_.Bind(handle.Pass());
|
| }
|
|
|
| - // |mojo::ErrorHandler| methods:
|
| - void OnConnectionError() override {
|
| - // A connection error means the connection to the shell is lost. This is not
|
| - // recoverable.
|
| - LOG(ERROR) << "Connection error to the shell";
|
| - _exit(1);
|
| - }
|
| -
|
| // |ChildController| methods:
|
| void StartApp(const mojo::String& app_path,
|
| mojo::InterfaceRequest<mojo::Application> application_request,
|
| @@ -243,7 +235,14 @@ class ChildControllerImpl : public ChildController, public mojo::ErrorHandler {
|
| unblocker_(unblocker),
|
| channel_info_(nullptr),
|
| binding_(this) {
|
| - binding_.set_error_handler(this);
|
| + binding_.set_connection_error_handler([this]() { OnConnectionError(); });
|
| + }
|
| +
|
| + void OnConnectionError() {
|
| + // A connection error means the connection to the shell is lost. This is not
|
| + // recoverable.
|
| + LOG(ERROR) << "Connection error to the shell";
|
| + _exit(1);
|
| }
|
|
|
| // Callback for |mojo::embedder::ConnectToMaster()|.
|
|
|