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

Unified Diff: src/heap.cc

Issue 22933006: Mark HStringCompareAndBranch as potentially causing GCs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 9d8a6fad9954d96eb3576d25a90630a29277d794..623ec31e20fca8169ba724e5be33a5f736511a34 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -4013,10 +4013,10 @@ MaybeObject* Heap::AllocateByteArray(int length, PretenureFlag pretenure) {
return AllocateByteArray(length);
}
int size = ByteArray::SizeFor(length);
+ AllocationSpace space =
+ (size > Page::kMaxNonCodeHeapObjectSize) ? LO_SPACE : OLD_DATA_SPACE;
Object* result;
- { MaybeObject* maybe_result = (size <= Page::kMaxNonCodeHeapObjectSize)
- ? old_data_space_->AllocateRaw(size)
- : lo_space_->AllocateRaw(size, NOT_EXECUTABLE);
+ { MaybeObject* maybe_result = AllocateRaw(size, space, space);
Hannes Payer (out of office) 2013/08/16 13:56:28 We should use AllocateRaw in all Allocate* functio
Michael Starzinger 2013/08/16 15:10:54 Yes, I wholeheartedly agree. It's on my plate as a
if (!maybe_result->ToObject(&result)) return maybe_result;
}

Powered by Google App Engine
This is Rietveld 408576698