Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 10837070: Remove old isolate API and update all code in the repository to use (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/isolate_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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";
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/isolate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698