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

Unified Diff: runtime/vm/object.cc

Issue 456983002: Refactor isolate startup code in preparation for making isolate spawning more truly non-blocking. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: portmap changes, fixed hang Created 6 years, 4 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/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 208769deac28799bc71794a21b65ab361b4c3d3e..ad89974c3e4a29d85ad048489cb8f71964caf12e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -18818,7 +18818,9 @@ void Capability::PrintJSONImpl(JSONStream* stream, bool ref) const {
}
-RawReceivePort* ReceivePort::New(Dart_Port id, Heap::Space space) {
+RawReceivePort* ReceivePort::New(Dart_Port id,
+ bool is_control_port,
+ Heap::Space space) {
Isolate* isolate = Isolate::Current();
const SendPort& send_port = SendPort::Handle(isolate, SendPort::New(id));
@@ -18831,7 +18833,11 @@ RawReceivePort* ReceivePort::New(Dart_Port id, Heap::Space space) {
result ^= raw;
result.raw_ptr()->send_port_ = send_port.raw();
}
- PortMap::SetLive(id);
+ if (is_control_port) {
+ PortMap::SetPortState(id, PortMap::kControlPort);
+ } else {
+ PortMap::SetPortState(id, PortMap::kLivePort);
+ }
return result.raw();
}
« runtime/vm/isolate.h ('K') | « runtime/vm/object.h ('k') | runtime/vm/port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698