Index: runtime/vm/dart_api_impl_test.cc |
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc |
index 93cbbfa849a235faeb58791c3d1c454732d4f36f..18416e82fbe03752139373727ab5752e9dffefd8 100644 |
--- a/runtime/vm/dart_api_impl_test.cc |
+++ b/runtime/vm/dart_api_impl_test.cc |
@@ -5936,26 +5936,22 @@ static bool RunLoopTestCallback(const char* script_name, |
const char* kScriptChars = |
"#import('builtin');\n" |
"#import('dart:isolate');\n" |
- "class MyIsolate extends Isolate {\n" |
- " MyIsolate() : super() { }\n" |
- " void main() {\n" |
- " port.receive((message, replyTo) {\n" |
- " if (message) {\n" |
- " throw new Exception('MakeChildExit');\n" |
- " } else {\n" |
- " replyTo.call('hello');\n" |
- " port.close();\n" |
- " }\n" |
- " });\n" |
- " }\n" |
+ "void entry() {\n" |
+ " port.receive((message, replyTo) {\n" |
+ " if (message) {\n" |
+ " throw new Exception('MakeChildExit');\n" |
+ " } else {\n" |
+ " replyTo.call('hello');\n" |
+ " port.close();\n" |
+ " }\n" |
+ " });\n" |
"}\n" |
"\n" |
"void main(exc_child, exc_parent) {\n" |
- " new MyIsolate().spawn().then((port) {\n" |
- " port.call(exc_child).then((message) {\n" |
- " if (message != 'hello') throw new Exception('ShouldNotHappen');\n" |
- " if (exc_parent) throw new Exception('MakeParentExit');\n" |
- " });\n" |
+ " var port = spawnFunction(entry);\n" |
+ " port.call(exc_child).then((message) {\n" |
+ " if (message != 'hello') throw new Exception('ShouldNotHappen');\n" |
+ " if (exc_parent) throw new Exception('MakeParentExit');\n" |
" });\n" |
"}\n"; |