Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 916c99371938da6f63eea6eea42525cc1afd0c00..7edf0130676b4c205838e5d3b35c263e61b9c110 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -4125,11 +4125,9 @@ MUST_USE_RESULT static MaybeObject* StringReplaceGlobalRegExpWithEmptyString( |
if (delta == 0) return *answer; |
Address end_of_string = answer->address() + string_size; |
- isolate->heap()->CreateFillerObjectAt(end_of_string, delta); |
- if (Marking::IsBlack(Marking::MarkBitFrom(*answer))) { |
- MemoryChunk::IncrementLiveBytesFromMutator(answer->address(), -delta); |
- } |
- |
+ Heap* heap = isolate->heap(); |
+ heap->CreateFillerObjectAt(end_of_string, delta); |
+ heap->AdjustLiveBytes(answer->address(), -delta, Heap::FROM_MUTATOR); |
return *answer; |
} |