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

Unified Diff: src/liveedit.cc

Issue 12217106: Don't use TLS for space iterators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed feedback. Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap-profiler.cc ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index 2502ae688aa7116284b05c0b225eb5eeb079cec6..23e7b436f732799118b159e861f5021d90da5856 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -1047,10 +1047,11 @@ static void ReplaceCodeObject(Handle<Code> original,
// Since we are not in an incremental marking phase we can write pointers
// to code objects (that are never in new space) without worrying about
// write barriers.
- HEAP->CollectAllGarbage(Heap::kMakeHeapIterableMask,
+ Heap* heap = original->GetHeap();
+ heap->CollectAllGarbage(Heap::kMakeHeapIterableMask,
"liveedit.cc ReplaceCodeObject");
- ASSERT(!HEAP->InNewSpace(*substitution));
+ ASSERT(!heap->InNewSpace(*substitution));
AssertNoAllocation no_allocations_please;
@@ -1059,11 +1060,11 @@ static void ReplaceCodeObject(Handle<Code> original,
// Iterate over all roots. Stack frames may have pointer into original code,
// so temporary replace the pointers with offset numbers
// in prologue/epilogue.
- HEAP->IterateRoots(&visitor, VISIT_ALL);
+ heap->IterateRoots(&visitor, VISIT_ALL);
// Now iterate over all pointers of all objects, including code_target
// implicit pointers.
- HeapIterator iterator;
+ HeapIterator iterator(heap);
for (HeapObject* obj = iterator.next(); obj != NULL; obj = iterator.next()) {
obj->Iterate(&visitor);
}
@@ -1129,7 +1130,7 @@ class LiteralFixer {
Visitor* visitor) {
AssertNoAllocation no_allocations_please;
- HeapIterator iterator;
+ HeapIterator iterator(shared_info->GetHeap());
for (HeapObject* obj = iterator.next(); obj != NULL;
obj = iterator.next()) {
if (obj->IsJSFunction()) {
« no previous file with comments | « src/heap-profiler.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698