14 const std::string&
name) {
15 std::scoped_lock lock(mutex_);
16 return LookupIsolatePortByNameUnprotected(
name);
19Dart_PortEx IsolateNameServer::LookupIsolatePortByNameUnprotected(
20 const std::string&
name) {
21 auto port_iterator = port_mapping_.find(
name);
22 if (port_iterator != port_mapping_.end()) {
23 return port_iterator->second;
25 return {ILLEGAL_PORT, ILLEGAL_PORT};
29 const std::string&
name) {
30 std::scoped_lock lock(mutex_);
31 if (LookupIsolatePortByNameUnprotected(
name).port_id != ILLEGAL_PORT) {
35 port_mapping_[
name] = port;
40 std::scoped_lock lock(mutex_);
41 auto port_iterator = port_mapping_.find(
name);
42 if (port_iterator == port_mapping_.end()) {
45 port_mapping_.erase(port_iterator);
bool RegisterIsolatePortWithName(Dart_PortEx port, const std::string &name)
Dart_PortEx LookupIsolatePortByName(const std::string &name)
bool RemoveIsolateNameMapping(const std::string &name)
DEF_SWITCHES_START aot vmservice shared library name