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

Side by Side Diff: runtime/vm/service_isolate.cc

Issue 1371193005: VM restart + shutdown fixes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more code review Created 5 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698