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

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

Issue 2754113002: Address Siva's DBC (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | 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) 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
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();
638
639 if (result.IsUnwindError()) { 637 if (result.IsUnwindError()) {
640 // We can only propagate errors when there are Dart frames on the stack. 638 // We can only propagate errors when there are Dart frames on the stack.
641 // TODO(johnmccutchan): Fix dartbug.com/29092. 639 // TODO(johnmccutchan): Fix dartbug.com/29092.
642 if (thread->top_exit_frame_info() == 0) { 640 if (thread->top_exit_frame_info() == 0) {
643 FATAL( 641 FATAL(
644 "Got an Unwind Error in the middle of a reload. " 642 "Got an Unwind Error in the middle of a reload. "
645 "http://dartbug.com/29092"); 643 "http://dartbug.com/29092");
646 } 644 }
647 // If the tag handler returns with an UnwindError error, propagate it and 645 // If the tag handler returns with an UnwindError error, propagate it and
648 // give up. 646 // give up.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 if (!reload_finalized_) { 716 if (!reload_finalized_) {
719 Rollback(); 717 Rollback();
720 } 718 }
721 CommonFinalizeTail(); 719 CommonFinalizeTail();
722 } 720 }
723 721
724 722
725 void IsolateReloadContext::CommonFinalizeTail() { 723 void IsolateReloadContext::CommonFinalizeTail() {
726 ReportOnJSON(js_); 724 ReportOnJSON(js_);
727 reload_finalized_ = true; 725 reload_finalized_ = true;
726 // As a final step, re-enable the background compiler.
727 BackgroundCompiler::Enable();
728 } 728 }
729 729
730 730
731 void IsolateReloadContext::ReportOnJSON(JSONStream* stream) { 731 void IsolateReloadContext::ReportOnJSON(JSONStream* stream) {
732 JSONObject jsobj(stream); 732 JSONObject jsobj(stream);
733 jsobj.AddProperty("type", "ReloadReport"); 733 jsobj.AddProperty("type", "ReloadReport");
734 jsobj.AddProperty("success", reload_skipped_ || !HasReasonsForCancelling()); 734 jsobj.AddProperty("success", reload_skipped_ || !HasReasonsForCancelling());
735 { 735 {
736 JSONObject details(&jsobj, "details"); 736 JSONObject details(&jsobj, "details");
737 if (reload_skipped_) { 737 if (reload_skipped_) {
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 ASSERT(!super_cls.IsNull()); 1893 ASSERT(!super_cls.IsNull());
1894 super_cls.AddDirectSubclass(cls); 1894 super_cls.AddDirectSubclass(cls);
1895 } 1895 }
1896 } 1896 }
1897 } 1897 }
1898 } 1898 }
1899 1899
1900 #endif // !PRODUCT 1900 #endif // !PRODUCT
1901 1901
1902 } // namespace dart 1902 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698