| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/service_isolate.h" | 5 #include "vm/service_isolate.h" |
| 6 | 6 |
| 7 #include "vm/compiler.h" | 7 #include "vm/compiler.h" |
| 8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 429 |
| 430 | 430 |
| 431 void ServiceIsolate::KillServiceIsolate() { | 431 void ServiceIsolate::KillServiceIsolate() { |
| 432 if (!FLAG_shutdown) { | 432 if (!FLAG_shutdown) { |
| 433 return; | 433 return; |
| 434 } | 434 } |
| 435 { | 435 { |
| 436 MonitorLocker ml(monitor_); | 436 MonitorLocker ml(monitor_); |
| 437 shutting_down_ = true; | 437 shutting_down_ = true; |
| 438 } | 438 } |
| 439 Isolate::KillIfExists(isolate_); | 439 Isolate::KillIfExists(isolate_, Isolate::kInternalKillMsg); |
| 440 { | 440 { |
| 441 MonitorLocker ml(monitor_); | 441 MonitorLocker ml(monitor_); |
| 442 while (shutting_down_) { | 442 while (shutting_down_) { |
| 443 ml.Wait(); | 443 ml.Wait(); |
| 444 } | 444 } |
| 445 } | 445 } |
| 446 } | 446 } |
| 447 | 447 |
| 448 | 448 |
| 449 void ServiceIsolate::Shutdown() { | 449 void ServiceIsolate::Shutdown() { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 ASSERT(!result.IsNull()); | 486 ASSERT(!result.IsNull()); |
| 487 Dart_Port port = ILLEGAL_PORT; | 487 Dart_Port port = ILLEGAL_PORT; |
| 488 if (result.IsReceivePort()) { | 488 if (result.IsReceivePort()) { |
| 489 port = ReceivePort::Cast(result).Id(); | 489 port = ReceivePort::Cast(result).Id(); |
| 490 } | 490 } |
| 491 ASSERT(port != ILLEGAL_PORT); | 491 ASSERT(port != ILLEGAL_PORT); |
| 492 ServiceIsolate::SetServicePort(port); | 492 ServiceIsolate::SetServicePort(port); |
| 493 } | 493 } |
| 494 | 494 |
| 495 } // namespace dart | 495 } // namespace dart |
| OLD | NEW |