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

Unified Diff: vm/port.cc

Issue 11052006: 1. Create a port when a debugger object is created for an isolate, use this (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 2 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 | « vm/port.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/port.cc
===================================================================
--- vm/port.cc (revision 13206)
+++ vm/port.cc (working copy)
@@ -230,6 +230,19 @@
}
+Isolate* PortMap::GetIsolate(Dart_Port id) {
+ MutexLocker ml(mutex_);
+ intptr_t index = FindPort(id);
+ if (index < 0) {
+ // Port does not exist.
+ return NULL;
+ }
+
+ MessageHandler* handler = map_[index].handler;
+ return handler->GetIsolate();
+}
+
+
void PortMap::InitOnce() {
mutex_ = new Mutex();
« no previous file with comments | « vm/port.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698