Add a comment for why we're storing the scalar name in KeyedScalars
Categories
(Toolkit :: Telemetry, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: chutten, Assigned: danielvictoriadbugzilla, Mentored)
References
Details
(Whiteboard: [good first bug][lang=c++])
Attachments
(1 file)
In bug 1555798 Alessio noted that we should add a comment to KeyedScalar to explain why we're going through the dance of storing the scalar and then getting the info based on the name when we want to allocate a new scalar.
In short it's because references to BaseScalarInfo aren't guaranteed to be safe if they're DynamicScalarInfos (because their underlying storage is an nsTArray that can reshuffle its data).
Reporter | ||
Comment 1•5 years ago
|
||
To help Mozilla out with this bug, here's the steps:
- Comment here on the bug that you want to volunteer to help. I (or someone else) will assign it to you.
- Download and build the Firefox source code
- If you have any problems, please ask on IRC in the
#introduction
channel. They're there to help you get started. - You can also read the Developer Guide, which has answers to most development questions:
- If you have any problems, please ask on IRC in the
- Start working on this bug. In this bug you'll be adding a code comment to the KeyedScalar constructor here. The comment should read something like
// We store the name instead of a reference to the BaseScalarInfo because the BaseScalarInfo can move if it's from a dynamic scalar.
.- If you have any problems with this bug, please comment on this bug and set the needinfo flag for me. Also, you can find me and my teammates on the #telemetry channel on IRC most hours of most days.
- Build your change with
mach build
and test your change withmach test toolkit/components/telemetry/tests/unit/
. Also check your changes for adherence to our style guidelines by usingmach lint
- Submit the patch (including an automated test, if applicable) for review. Mark me as a reviewer so I'll get an email to come look at your code.
- After a series of reviews and changes to your patch, I'll mark it for checkin or push it to autoland. Your code will soon be shipping to Firefox users worldwide!
- ...now you get to think about what kind of bug you'd like to work on next. Let me know what you're interested in and I can help you find your next contribution.
Assignee | ||
Comment 2•5 years ago
|
||
Hello Chris:
I would like to volunteer to help add this comment to the code.
Thanks,
Daniel
Reporter | ||
Comment 3•5 years ago
|
||
Great! I have assigned this bug to you. Let me know if you have any questions.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
Hey Chris I have posted the patch on the Phabricator, let me know if everything is Ok with it.
Assignee | ||
Comment 6•5 years ago
|
||
Hi Chris, thanks for the review, I would like to contribute C++ code.
Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/95e8c5139082 Added comment to explain that we store the scalar name in KeyedScalars because references to BaseScalarInfo aren't guaranteed to be safe if they're DynamicScalarInfos. r=chutten@mozilla.com
Comment 8•5 years ago
|
||
bugherder |
Description
•