Closed
Bug 1572027
Opened 5 years ago
Closed 5 years ago
Make BlocksRingBuffer::EntryReader move-only
Categories
(Core :: Gecko Profiler, task, P2)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
mozilla70
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(1 file)
Similar to bug 1571392, but for EntryReader.
(I've been hurt a few times when passing it by-value, so I want to prevent that.)
Assignee | ||
Comment 1•5 years ago
|
||
After some bad experiences, I think EntryReader should be move-only:
- It needs to be moveable so it can be created from a function, and move-
constructed into a Maybe<> if needed. - It can be passed around as a reference.
Previously, it could be passed by value, but it was too easy to create bugs,
e.g.: A function delegates to a sub-function to read something at the beginning,
then the first function wants to read more past that, but if the reader was
passed by value the first function would not see past what the sub-function did
read.
As a bonus, mRing
can now be a reference instead of a pointer, and other
members can be const.
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b7cecb1c435b Make BlocksRingBuffer::EntryReader move-only - r=gregtatum
Comment 3•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in
before you can comment on or make changes to this bug.
Description
•