| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 8842a1b2daf89864d6912d992ff847ae47b941ec..9ee9799bb9e70666d4340e6031101843e93b3be0 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -836,6 +836,9 @@ bool String::MakeExternal(v8::String::ExternalStringResource* resource) {
|
| // Fill the remainder of the string with dead wood.
|
| int new_size = this->Size(); // Byte size of the external String object.
|
| heap->CreateFillerObjectAt(this->address() + new_size, size - new_size);
|
| + if (Marking::IsBlack(Marking::MarkBitFrom(this))) {
|
| + MemoryChunk::IncrementLiveBytes(this->address(), new_size - size);
|
| + }
|
| return true;
|
| }
|
|
|
| @@ -882,6 +885,10 @@ bool String::MakeExternal(v8::String::ExternalAsciiStringResource* resource) {
|
| // Fill the remainder of the string with dead wood.
|
| int new_size = this->Size(); // Byte size of the external String object.
|
| heap->CreateFillerObjectAt(this->address() + new_size, size - new_size);
|
| + if (Marking::IsBlack(Marking::MarkBitFrom(this))) {
|
| + MemoryChunk::IncrementLiveBytes(this->address(), new_size - size);
|
| + }
|
| +
|
| return true;
|
| }
|
|
|
| @@ -2688,6 +2695,10 @@ MaybeObject* JSObject::NormalizeProperties(PropertyNormalizationMode mode,
|
| ASSERT(instance_size_delta >= 0);
|
| current_heap->CreateFillerObjectAt(this->address() + new_instance_size,
|
| instance_size_delta);
|
| + if (Marking::IsBlack(Marking::MarkBitFrom(this))) {
|
| + MemoryChunk::IncrementLiveBytes(this->address(), -instance_size_delta);
|
| + }
|
| +
|
|
|
| set_map(new_map);
|
| new_map->clear_instance_descriptors();
|
|
|