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

Unified Diff: runtime/lib/isolate.dart

Issue 8588040: Add a mid-sized integration test for the Dart Embedding Api which (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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/lib/isolate.cc ('k') | runtime/vm/custom_isolate_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate.dart
===================================================================
--- runtime/lib/isolate.dart (revision 1904)
+++ runtime/lib/isolate.dart (working copy)
@@ -32,7 +32,13 @@
/**** Internal implementation details ****/
// Called from the VM to create a new ReceivePort instance.
- static ReceivePortImpl create_(int id) {
+ static ReceivePortImpl _get_or_create(int id) {
+ if (_portMap !== null) {
+ ReceivePortImpl port = _portMap[id];
+ if (port !== null) {
+ return port;
+ }
+ }
return new ReceivePortImpl._internal(id);
}
ReceivePortImpl._internal(int id) : _id = id {
@@ -43,7 +49,7 @@
}
// Called from the VM to dispatch to the handler.
- static void handleMessage_(int id, int replyId, var message) {
+ static void _handleMessage(int id, int replyId, var message) {
assert(_portMap !== null);
ReceivePort port = _portMap[id];
SendPort replyTo = (replyId == 0) ? null : new SendPortImpl(replyId);
@@ -119,9 +125,9 @@
/*--- private implementation ---*/
const SendPortImpl(int id) : _id = id;
- // SendPortImpl.create_ is called from the VM when a new SendPort instance is
+ // SendPortImpl._create is called from the VM when a new SendPort instance is
// needed by the VM code.
- static SendPort create_(int id) {
+ static SendPort _create(int id) {
return new SendPortImpl(id);
}
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/custom_isolate_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698