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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 { | 682 { |
683 // Print the error if there is one. This may execute dart code to | 683 // Print the error if there is one. This may execute dart code to |
684 // print the exception object, so we need to use a StartIsolateScope. | 684 // print the exception object, so we need to use a StartIsolateScope. |
685 StartIsolateScope start_scope(I); | 685 StartIsolateScope start_scope(I); |
686 Thread* T = Thread::Current(); | 686 Thread* T = Thread::Current(); |
687 ASSERT(I == T->isolate()); | 687 ASSERT(I == T->isolate()); |
688 StackZone zone(T); | 688 StackZone zone(T); |
689 HandleScope handle_scope(T); | 689 HandleScope handle_scope(T); |
690 Error& error = Error::Handle(Z); | 690 Error& error = Error::Handle(Z); |
691 error = I->object_store()->sticky_error(); | 691 error = I->object_store()->sticky_error(); |
692 if (!error.IsNull()) { | 692 if (!error.IsNull() && !error.IsUnwindError()) { |
693 OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString()); | 693 OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString()); |
694 } | 694 } |
695 Dart::RunShutdownCallback(); | 695 Dart::RunShutdownCallback(); |
696 } | 696 } |
697 { | 697 { |
698 // Shut the isolate down. | 698 // Shut the isolate down. |
699 SwitchIsolateScope switch_scope(I); | 699 SwitchIsolateScope switch_scope(I); |
700 Dart::ShutdownIsolate(); | 700 Dart::ShutdownIsolate(); |
701 } | 701 } |
702 if (FLAG_trace_service) { | 702 if (FLAG_trace_service) { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 return result; | 847 return result; |
848 } | 848 } |
849 Dart_Handle source = GetSource(url_string); | 849 Dart_Handle source = GetSource(url_string); |
850 if (Dart_IsError(source)) { | 850 if (Dart_IsError(source)) { |
851 return source; | 851 return source; |
852 } | 852 } |
853 return Dart_LoadSource(library, url, source, 0, 0); | 853 return Dart_LoadSource(library, url, source, 0, 0); |
854 } | 854 } |
855 | 855 |
856 } // namespace dart | 856 } // namespace dart |
OLD | NEW |