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

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

Issue 1041523002: Refactor Thread lifecycle interface, add Thread::Enter/ExitIsolate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/native_api_impl.cc ('k') | runtime/vm/thread.h » ('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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 NULL, 604 NULL,
605 NULL, 605 NULL,
606 NULL, 606 NULL,
607 &error)); 607 &error));
608 if (isolate == NULL) { 608 if (isolate == NULL) {
609 OS::PrintErr("vm-service: Isolate creation error: %s\n", error); 609 OS::PrintErr("vm-service: Isolate creation error: %s\n", error);
610 ServiceIsolate::FinishedInitializing(); 610 ServiceIsolate::FinishedInitializing();
611 return; 611 return;
612 } 612 }
613 613
614 Isolate::SetCurrent(NULL); 614 Thread::ExitIsolate();
615 615
616 ServiceIsolate::ConstructExitMessageAndCache(isolate); 616 ServiceIsolate::ConstructExitMessageAndCache(isolate);
617 617
618 RunMain(isolate); 618 RunMain(isolate);
619 619
620 ServiceIsolate::FinishedInitializing(); 620 ServiceIsolate::FinishedInitializing();
621 621
622 isolate->message_handler()->Run(Dart::thread_pool(), 622 isolate->message_handler()->Run(Dart::thread_pool(),
623 NULL, 623 NULL,
624 ShutdownIsolate, 624 ShutdownIsolate,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 return result; 773 return result;
774 } 774 }
775 Dart_Handle source = GetSource(url_string); 775 Dart_Handle source = GetSource(url_string);
776 if (Dart_IsError(source)) { 776 if (Dart_IsError(source)) {
777 return source; 777 return source;
778 } 778 }
779 return Dart_LoadSource(library, url, source, 0, 0); 779 return Dart_LoadSource(library, url, source, 0, 0);
780 } 780 }
781 781
782 } // namespace dart 782 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/native_api_impl.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698