Chromium Code Reviews| 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 627 | 627 |
| 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 BackgroundCompiler::Enable(); | 637 BackgroundCompiler::Enable(); |
|
siva
2017/03/16 18:09:45
We should probably enable the background compiler
| |
| 638 | 638 |
| 639 if (result.IsUnwindError() || result.IsUnhandledException()) { | 639 if (result.IsUnwindError()) { |
| 640 // If the tag handler returns with an UnwindError or an UnhandledException | 640 // We can only propagate errors when there are Dart frames on the stack. |
| 641 // error, propagate it and give up. | 641 // TODO(johnmccutchan): Fix dartbug.com/29092. |
| 642 if (thread->top_exit_frame_info() == 0) { | |
| 643 FATAL( | |
| 644 "Got an Unwind Error in the middle of a reload. " | |
| 645 "http://dartbug.com/29092"); | |
| 646 } | |
| 647 // If the tag handler returns with an UnwindError error, propagate it and | |
| 648 // give up. | |
| 642 Exceptions::PropagateError(Error::Cast(result)); | 649 Exceptions::PropagateError(Error::Cast(result)); |
| 643 UNREACHABLE(); | 650 UNREACHABLE(); |
| 644 } | 651 } |
| 645 | 652 |
| 646 // Other errors (e.g. a parse error) are captured by the reload system. | 653 // Other errors (e.g. a parse error) are captured by the reload system. |
| 647 if (result.IsError()) { | 654 if (result.IsError()) { |
| 648 FinalizeFailedLoad(Error::Cast(result)); | 655 FinalizeFailedLoad(Error::Cast(result)); |
| 649 } | 656 } |
| 650 } | 657 } |
| 651 | 658 |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1886 ASSERT(!super_cls.IsNull()); | 1893 ASSERT(!super_cls.IsNull()); |
| 1887 super_cls.AddDirectSubclass(cls); | 1894 super_cls.AddDirectSubclass(cls); |
| 1888 } | 1895 } |
| 1889 } | 1896 } |
| 1890 } | 1897 } |
| 1891 } | 1898 } |
| 1892 | 1899 |
| 1893 #endif // !PRODUCT | 1900 #endif // !PRODUCT |
| 1894 | 1901 |
| 1895 } // namespace dart | 1902 } // namespace dart |
| OLD | NEW |