Closed Bug 1674968 Opened 5 years ago Closed 5 years ago

UniqueJSONStrings copy constructor doesn't copy anything

Categories

(Core :: Gecko Profiler, defect, P2)

defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: mozbugz, Assigned: mozbugz)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

At the start of the copy constructor, we look if there are elements in the current object under construction, instead of the given object to copy! The local default-constructed hash table will always be empty, so we won't copy anything.

The previous code before bug 1520104 did the right thing by counting elements in the given aOther.

The likely effect is that some strings coming from a JITFrameInfo would be lost, and references to these strings would likely point at different strings added during the profile serialization.
But nobody noticed 🤔

Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4e9b6333fa61 UniqueJSONStrings unit tests - r=gregtatum https://hg.mozilla.org/integration/autoland/rev/a3ebf62f6368 Fix UniqueJSONStrings copy constructor, to actually copy from the source - r=gregtatum
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: