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