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

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

Issue 1408653002: Skip making code pages temporarily writable when finalizing the VM isolate loaded from precompiled … (Closed) Base URL: git@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
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 "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "vm/dart_api_impl.h" 8 #include "vm/dart_api_impl.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 FindNothing find_nothing; 273 FindNothing find_nothing;
274 EXPECT(Object::null() == heap->FindObject(&find_nothing)); 274 EXPECT(Object::null() == heap->FindObject(&find_nothing));
275 } 275 }
276 } 276 }
277 277
278 278
279 TEST_CASE(IterateReadOnly) { 279 TEST_CASE(IterateReadOnly) {
280 const String& obj = String::Handle(String::New("x", Heap::kOld)); 280 const String& obj = String::Handle(String::New("x", Heap::kOld));
281 Heap* heap = Thread::Current()->isolate()->heap(); 281 Heap* heap = Thread::Current()->isolate()->heap();
282 EXPECT(heap->Contains(RawObject::ToAddr(obj.raw()))); 282 EXPECT(heap->Contains(RawObject::ToAddr(obj.raw())));
283 heap->WriteProtect(true); 283 heap->WriteProtect(true, true /* include_code_pages */);
284 EXPECT(heap->Contains(RawObject::ToAddr(obj.raw()))); 284 EXPECT(heap->Contains(RawObject::ToAddr(obj.raw())));
285 heap->WriteProtect(false); 285 heap->WriteProtect(false, true /* include_code_pages */);
286 EXPECT(heap->Contains(RawObject::ToAddr(obj.raw()))); 286 EXPECT(heap->Contains(RawObject::ToAddr(obj.raw())));
287 } 287 }
288 288
289 } // namespace dart. 289 } // namespace dart.
OLDNEW
« runtime/vm/heap.h ('K') | « runtime/vm/heap.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698