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

Unified Diff: src/runtime/runtime-regexp.cc

Issue 1163793002: Fix bogus insertion of filler in LO-space by String#replace. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | test/mjsunit/regress/regress-crbug-493779.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-regexp.cc
diff --git a/src/runtime/runtime-regexp.cc b/src/runtime/runtime-regexp.cc
index 2f80fe9a35ff1e28086408d4cc5fd59018cb9cbc..efa91b84859d5eee37fc3f5ad2f15fc8ad2675d5 100644
--- a/src/runtime/runtime-regexp.cc
+++ b/src/runtime/runtime-regexp.cc
@@ -638,7 +638,11 @@ MUST_USE_RESULT static Object* StringReplaceGlobalRegExpWithEmptyString(
// fresly allocated page or on an already swept page. Hence, the sweeper
// thread can not get confused with the filler creation. No synchronization
// needed.
- heap->CreateFillerObjectAt(end_of_string, delta);
+ // TODO(hpayer): We should shrink the large object page if the size
+ // of the object changed significantly.
+ if (!heap->lo_space()->Contains(*answer)) {
+ heap->CreateFillerObjectAt(end_of_string, delta);
+ }
heap->AdjustLiveBytes(answer->address(), -delta, Heap::CONCURRENT_TO_SWEEPER);
return *answer;
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-493779.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698