Ensure isolates have a root library so createMirrorSystem() and spawnUri() are happy.

https://github.com/domokit/mojo/issues/98

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1088263004
This commit is contained in:
Ryan Macnak
2015-04-16 15:49:11 -07:00
parent 514c65df29
commit c9abc3cfc4
2 changed files with 15 additions and 0 deletions

View File

@@ -0,0 +1 @@
PASS

View File

@@ -0,0 +1,14 @@
<script>
import "dart:mirrors";
import "dart:sky.internals" as internals;
// Regression test for the embedder not setting up the root library.
// Used to crash.
void main() {
if (currentMirrorSystem().isolate.rootLibrary == null) {
throw "Missing root library";
}
internals.notifyTestComplete("PASS");
}
</script>>