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

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

Issue 2047123002: Move code that sends an isolate shutdown message to the service isolate to the block after we trans… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | runtime/vm/dart_api_impl.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/dart.h" 5 #include "vm/dart.h"
6 6
7 #include "vm/become.h" 7 #include "vm/become.h"
8 #include "vm/code_observers.h" 8 #include "vm/code_observers.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_api_state.h" 10 #include "vm/dart_api_state.h"
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 } 648 }
649 649
650 return buffer.Steal(); 650 return buffer.Steal();
651 } 651 }
652 652
653 653
654 void Dart::RunShutdownCallback() { 654 void Dart::RunShutdownCallback() {
655 Isolate* isolate = Isolate::Current(); 655 Isolate* isolate = Isolate::Current();
656 void* callback_data = isolate->init_callback_data(); 656 void* callback_data = isolate->init_callback_data();
657 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback(); 657 Dart_IsolateShutdownCallback callback = Isolate::ShutdownCallback();
658 ServiceIsolate::SendIsolateShutdownMessage();
659 if (callback != NULL) { 658 if (callback != NULL) {
660 (callback)(callback_data); 659 (callback)(callback_data);
661 } 660 }
662 } 661 }
663 662
664 663
665 void Dart::ShutdownIsolate(Isolate* isolate) { 664 void Dart::ShutdownIsolate(Isolate* isolate) {
666 ASSERT(Isolate::Current() == NULL); 665 ASSERT(Isolate::Current() == NULL);
667 // We need to enter the isolate in order to shut it down. 666 // We need to enter the isolate in order to shut it down.
668 bool result = Thread::EnterIsolate(isolate); 667 bool result = Thread::EnterIsolate(isolate);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 return predefined_handles_->handles_.IsValidScopedHandle(address); 705 return predefined_handles_->handles_.IsValidScopedHandle(address);
707 } 706 }
708 707
709 708
710 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) { 709 bool Dart::IsReadOnlyApiHandle(Dart_Handle handle) {
711 ASSERT(predefined_handles_ != NULL); 710 ASSERT(predefined_handles_ != NULL);
712 return predefined_handles_->api_handles_.IsValidHandle(handle); 711 return predefined_handles_->api_handles_.IsValidHandle(handle);
713 } 712 }
714 713
715 } // namespace dart 714 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698