| Index: sky/framework/embedder.dart
|
| diff --git a/sky/framework/embedder.dart b/sky/framework/embedder.dart
|
| index e3988c24f73602b60e38321f46ac5400b4840eb2..ce27ccdd2bea5f512e325825e51de11aedb74f17 100644
|
| --- a/sky/framework/embedder.dart
|
| +++ b/sky/framework/embedder.dart
|
| @@ -15,9 +15,20 @@ final _EmbedderImpl embedder = new _EmbedderImpl();
|
| class _EmbedderImpl {
|
| ApplicationConnection _connection;
|
| ServiceRegistryProxy _serviceRegistry;
|
| + ShellProxy _shell;
|
| + bool _internalsHasNoShell = false;
|
|
|
| - final ShellProxy shell = new ShellProxy.fromHandle(
|
| - new core.MojoHandle(internals.takeShellProxyHandle()));
|
| + ShellProxy get shell {
|
| + if (_internalsHasNoShell || _shell != null) return _shell;
|
| +
|
| + try {
|
| + _shell = new ShellProxy.fromHandle(
|
| + new core.MojoHandle(internals.takeShellProxyHandle()));
|
| + } catch (e) {
|
| + _internalsHasNoShell = true;
|
| + }
|
| + return _shell;
|
| + }
|
|
|
| ApplicationConnection get connection {
|
| if (_connection == null) {
|
|
|