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

Unified Diff: src/objects.cc

Issue 1733333002: Clear recorded slots when creating filler objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment Created 4 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/spaces.cc ('k') | src/profiler/allocation-tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 3bfe1d1df48a0e0bda80a5d9113e45da92abfb9f..a49bc807f1707ece12e9087c4a1a5b9e71147e74 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1738,7 +1738,8 @@ bool String::MakeExternal(v8::String::ExternalStringResource* resource) {
// Byte size of the external String object.
int new_size = this->SizeFromMap(new_map);
- heap->CreateFillerObjectAt(this->address() + new_size, size - new_size);
+ heap->CreateFillerObjectAt(this->address() + new_size, size - new_size,
+ ClearRecordedSlots::kNo);
// We are storing the new map using release store after creating a filler for
// the left-over space to avoid races with the sweeper thread.
@@ -1799,7 +1800,8 @@ bool String::MakeExternal(v8::String::ExternalOneByteStringResource* resource) {
// Byte size of the external String object.
int new_size = this->SizeFromMap(new_map);
- heap->CreateFillerObjectAt(this->address() + new_size, size - new_size);
+ heap->CreateFillerObjectAt(this->address() + new_size, size - new_size,
+ ClearRecordedSlots::kNo);
// We are storing the new map using release store after creating a filler for
// the left-over space to avoid races with the sweeper thread.
@@ -2943,8 +2945,8 @@ void MigrateFastToFast(Handle<JSObject> object, Handle<Map> new_map) {
if (instance_size_delta > 0) {
Address address = object->address();
- heap->CreateFillerObjectAt(
- address + new_instance_size, instance_size_delta);
+ heap->CreateFillerObjectAt(address + new_instance_size, instance_size_delta,
+ ClearRecordedSlots::kYes);
heap->AdjustLiveBytes(*object, -instance_size_delta,
Heap::CONCURRENT_TO_SWEEPER);
}
@@ -3039,7 +3041,7 @@ void MigrateFastToSlow(Handle<JSObject> object, Handle<Map> new_map,
if (instance_size_delta > 0) {
Heap* heap = isolate->heap();
heap->CreateFillerObjectAt(object->address() + new_instance_size,
- instance_size_delta);
+ instance_size_delta, ClearRecordedSlots::kYes);
heap->AdjustLiveBytes(*object, -instance_size_delta,
Heap::CONCURRENT_TO_SWEEPER);
}
@@ -12115,7 +12117,8 @@ Handle<String> SeqString::Truncate(Handle<SeqString> string, int new_length) {
Heap* heap = string->GetHeap();
// Sizes are pointer size aligned, so that we can use filler objects
// that are a multiple of pointer size.
- heap->CreateFillerObjectAt(start_of_string + new_size, delta);
+ heap->CreateFillerObjectAt(start_of_string + new_size, delta,
+ ClearRecordedSlots::kNo);
heap->AdjustLiveBytes(*string, -delta, Heap::CONCURRENT_TO_SWEEPER);
// We are storing the new length using release store after creating a filler
« no previous file with comments | « src/heap/spaces.cc ('k') | src/profiler/allocation-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698