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

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: Fix namespace comment. 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
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 6bd4ae0e681528bb3b08684118538d5f3afd7672..0cd8473f366861a3f594f7c1996b3af7e4002d07 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";

Powered by Google App Engine
This is Rietveld 408576698