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

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: code review 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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/port.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index f79dc5898e4a4257805531e7bea40532558d4d01..4eaf30692844fe9ee9b1ddd3cc03089e35914035 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -18808,7 +18808,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));
@@ -18821,7 +18823,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();
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698