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

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

Issue 1410643008: Get rid of deprecated methods accessing mutator_thread_ instead of current thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « runtime/vm/exceptions.cc ('k') | runtime/vm/isolate.h » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/heap.h" 5 #include "vm/heap.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 MicrosecondsToMilliseconds(stats_.times_[2]), 780 MicrosecondsToMilliseconds(stats_.times_[2]),
781 MicrosecondsToMilliseconds(stats_.times_[3]), 781 MicrosecondsToMilliseconds(stats_.times_[3]),
782 stats_.data_[0], 782 stats_.data_[0],
783 stats_.data_[1], 783 stats_.data_[1],
784 stats_.data_[2], 784 stats_.data_[2],
785 stats_.data_[3]); 785 stats_.data_[3]);
786 } 786 }
787 787
788 788
789 NoHeapGrowthControlScope::NoHeapGrowthControlScope() 789 NoHeapGrowthControlScope::NoHeapGrowthControlScope()
790 : StackResource(Isolate::Current()) { 790 : StackResource(Thread::Current()) {
791 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); 791 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
792 current_growth_controller_state_ = heap->GrowthControlState(); 792 current_growth_controller_state_ = heap->GrowthControlState();
793 heap->DisableGrowthControl(); 793 heap->DisableGrowthControl();
794 } 794 }
795 795
796 796
797 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() { 797 NoHeapGrowthControlScope::~NoHeapGrowthControlScope() {
798 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap(); 798 Heap* heap = reinterpret_cast<Isolate*>(isolate())->heap();
799 heap->SetGrowthControlState(current_growth_controller_state_); 799 heap->SetGrowthControlState(current_growth_controller_state_);
800 } 800 }
801 801
802 802
803 WritableVMIsolateScope::WritableVMIsolateScope(Thread* thread, 803 WritableVMIsolateScope::WritableVMIsolateScope(Thread* thread,
804 bool include_code_pages) 804 bool include_code_pages)
805 : StackResource(thread), include_code_pages_(include_code_pages) { 805 : StackResource(thread), include_code_pages_(include_code_pages) {
806 Dart::vm_isolate()->heap()->WriteProtect(false, include_code_pages_); 806 Dart::vm_isolate()->heap()->WriteProtect(false, include_code_pages_);
807 } 807 }
808 808
809 809
810 WritableVMIsolateScope::~WritableVMIsolateScope() { 810 WritableVMIsolateScope::~WritableVMIsolateScope() {
811 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0); 811 ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
812 Dart::vm_isolate()->heap()->WriteProtect(true, include_code_pages_); 812 Dart::vm_isolate()->heap()->WriteProtect(true, include_code_pages_);
813 } 813 }
814 814
815 } // namespace dart 815 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698