Commit 04501af9 authored by Jim Beveridge's avatar Jim Beveridge

Fixes assert connecting to Activity service under Linux

Fixes #313.
parent 4b03a9ee
...@@ -29,10 +29,10 @@ ShellProxy _initShellProxy() { ...@@ -29,10 +29,10 @@ ShellProxy _initShellProxy() {
ApplicationConnection _initEmbedderConnection() { ApplicationConnection _initEmbedderConnection() {
core.MojoHandle servicesHandle = new core.MojoHandle(internals.takeServicesProvidedByEmbedder()); core.MojoHandle servicesHandle = new core.MojoHandle(internals.takeServicesProvidedByEmbedder());
core.MojoHandle exposedServicesHandle = new core.MojoHandle(internals.takeServicesProvidedToEmbedder()); core.MojoHandle exposedServicesHandle = new core.MojoHandle(internals.takeServicesProvidedToEmbedder());
ServiceProviderProxy services = servicesHandle.isValid ? if (!servicesHandle.isValid || !exposedServicesHandle.isValid)
new ServiceProviderProxy.fromHandle(servicesHandle) : null; return null;
ServiceProviderStub exposedServices = exposedServicesHandle.isValid ? ServiceProviderProxy services = new ServiceProviderProxy.fromHandle(servicesHandle);
new ServiceProviderStub.fromHandle(exposedServicesHandle) : null; ServiceProviderStub exposedServices = new ServiceProviderStub.fromHandle(exposedServicesHandle);
return new ApplicationConnection(exposedServices, services); return new ApplicationConnection(exposedServices, services);
} }
...@@ -56,7 +56,7 @@ class _Shell { ...@@ -56,7 +56,7 @@ class _Shell {
if (_shell == null || url == null) { if (_shell == null || url == null) {
// If we don't have a shell or a url, we try to get the services from the // If we don't have a shell or a url, we try to get the services from the
// embedder directly instead of using the shell to connect. // embedder directly instead of using the shell to connect.
_embedderConnection.requestService(proxy); _embedderConnection?.requestService(proxy);
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment