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:
1
engine/src/flutter/tests/dart/mirror-system-expected.txt
Normal file
1
engine/src/flutter/tests/dart/mirror-system-expected.txt
Normal file
@@ -0,0 +1 @@
|
||||
PASS
|
||||
14
engine/src/flutter/tests/dart/mirror-system.sky
Normal file
14
engine/src/flutter/tests/dart/mirror-system.sky
Normal 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>>
|
||||
Reference in New Issue
Block a user