Commit 7c4aef60 authored by Adam Barth's avatar Adam Barth

Merge pull request #2422 from abarth/init_bundle

Make _initRootBundle more robust
parents 9f142710 eea4bae6
...@@ -96,14 +96,11 @@ class MojoAssetBundle extends CachingAssetBundle { ...@@ -96,14 +96,11 @@ class MojoAssetBundle extends CachingAssetBundle {
} }
AssetBundle _initRootBundle() { AssetBundle _initRootBundle() {
try { int h = ui.takeRootBundleHandle();
AssetBundleProxy bundle = new AssetBundleProxy.fromHandle( if (h == core.MojoHandle.INVALID)
new core.MojoHandle(ui.takeRootBundleHandle())
);
return new MojoAssetBundle(bundle);
} catch (e) {
return null; return null;
} core.MojoHandle handle = new core.MojoHandle(h);
return new MojoAssetBundle(new AssetBundleProxy.fromHandle(handle));
} }
final AssetBundle rootBundle = _initRootBundle(); final AssetBundle rootBundle = _initRootBundle();
...@@ -46,9 +46,5 @@ void _debugPrintTask() { ...@@ -46,9 +46,5 @@ void _debugPrintTask() {
} }
void debugPrintStack() { void debugPrintStack() {
try { debugPrint(StackTrace.current.toString());
throw new Exception();
} catch (e, stack) {
debugPrint(stack.toString());
}
} }
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