| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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/isolate_reload.h" | 5 #include "vm/isolate_reload.h" |
| 6 | 6 |
| 7 #include "vm/become.h" | 7 #include "vm/become.h" |
| 8 #include "vm/bit_vector.h" | 8 #include "vm/bit_vector.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 Dart_Handle retval = (I->library_tag_handler())( | 628 Dart_Handle retval = (I->library_tag_handler())( |
| 629 Dart_kScriptTag, Api::NewHandle(thread, packages_url.raw()), | 629 Dart_kScriptTag, Api::NewHandle(thread, packages_url.raw()), |
| 630 Api::NewHandle(thread, root_lib_url.raw())); | 630 Api::NewHandle(thread, root_lib_url.raw())); |
| 631 result = Api::UnwrapHandle(retval); | 631 result = Api::UnwrapHandle(retval); |
| 632 } | 632 } |
| 633 // | 633 // |
| 634 // WEIRD CONTROL FLOW ENDS. | 634 // WEIRD CONTROL FLOW ENDS. |
| 635 TIR_Print("---- EXITED TAG HANDLER\n"); | 635 TIR_Print("---- EXITED TAG HANDLER\n"); |
| 636 | 636 |
| 637 if (result.IsUnwindError()) { | 637 if (result.IsUnwindError()) { |
| 638 // We can only propagate errors when there are Dart frames on the stack. | |
| 639 // TODO(johnmccutchan): Fix dartbug.com/29092. | |
| 640 if (thread->top_exit_frame_info() == 0) { | 638 if (thread->top_exit_frame_info() == 0) { |
| 641 FATAL( | 639 // We can only propagate errors when there are Dart frames on the stack. |
| 642 "Got an Unwind Error in the middle of a reload. " | 640 // In this case there are no Dart frames on the stack and we set the |
| 643 "http://dartbug.com/29092"); | 641 // thread's sticky error. This error will be returned to the message |
| 642 // handler. |
| 643 thread->set_sticky_error(Error::Cast(result)); |
| 644 } else { |
| 645 // If the tag handler returns with an UnwindError error, propagate it and |
| 646 // give up. |
| 647 Exceptions::PropagateError(Error::Cast(result)); |
| 648 UNREACHABLE(); |
| 644 } | 649 } |
| 645 // If the tag handler returns with an UnwindError error, propagate it and | |
| 646 // give up. | |
| 647 Exceptions::PropagateError(Error::Cast(result)); | |
| 648 UNREACHABLE(); | |
| 649 } | 650 } |
| 650 | 651 |
| 651 // Other errors (e.g. a parse error) are captured by the reload system. | 652 // Other errors (e.g. a parse error) are captured by the reload system. |
| 652 if (result.IsError()) { | 653 if (result.IsError()) { |
| 653 FinalizeFailedLoad(Error::Cast(result)); | 654 FinalizeFailedLoad(Error::Cast(result)); |
| 654 } | 655 } |
| 655 } | 656 } |
| 656 | 657 |
| 657 | 658 |
| 658 void IsolateReloadContext::RegisterClass(const Class& new_cls) { | 659 void IsolateReloadContext::RegisterClass(const Class& new_cls) { |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1893 ASSERT(!super_cls.IsNull()); | 1894 ASSERT(!super_cls.IsNull()); |
| 1894 super_cls.AddDirectSubclass(cls); | 1895 super_cls.AddDirectSubclass(cls); |
| 1895 } | 1896 } |
| 1896 } | 1897 } |
| 1897 } | 1898 } |
| 1898 } | 1899 } |
| 1899 | 1900 |
| 1900 #endif // !PRODUCT | 1901 #endif // !PRODUCT |
| 1901 | 1902 |
| 1902 } // namespace dart | 1903 } // namespace dart |
| OLD | NEW |