Skip to content

Commit

Permalink
Backed out changeset 8ea7aa580b52 (bug 1845256) for causing bustage o…
Browse files Browse the repository at this point in the history
…n Tenuring.cpp. CLOSED TREE
  • Loading branch information
ncsoregi committed Jul 25, 2023
1 parent bed8346 commit 1a7c5e1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions js/src/gc/Tenuring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,7 @@ JSString* js::gc::TenuringTracer::moveToTenured(JSString* src) {

if (src->length() < MAX_DEDUPLICATABLE_STRING_LENGTH && src->isLinear() &&
src->isDeduplicatable() && stringDeDupSet.isSome()) {
auto p = stringDeDupSet->lookupForAdd(src);
if (p) {
if (auto p = stringDeDupSet->lookup(src)) {
// Deduplicate to the looked-up string!
dst = *p;
zone->stringStats.ref().noteDeduplicated(src->length(), src->allocSize());
Expand All @@ -766,11 +765,7 @@ JSString* js::gc::TenuringTracer::moveToTenured(JSString* src) {

dst = allocTenuredString(src, zone, dstKind);

using DedupStringHasher = DeduplicationStringHasher<JSString*>;
MOZ_ASSERT(DedupStringHasher::hash(src) == DedupStringHasher::hash(dst),
"src and dst must have the same hash for lookupForAdd");

if (!stringDeDupSet->add(p, dst)) {
if (!stringDeDupSet->putNew(dst)) {
// When there is oom caused by the stringDeDupSet, stop deduplicating
// strings.
stringDeDupSet.reset();
Expand Down

0 comments on commit 1a7c5e1

Please sign in to comment.