Closed
Bug 1413621
Opened 8 years ago
Closed 8 years ago
Odd warning in telemetry IPC code
Categories
(Toolkit :: Telemetry, enhancement, P2)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
mozilla58
| Tracking | Status | |
|---|---|---|
| firefox58 | --- | fixed |
People
(Reporter: nika, Assigned: paul.bignier, Mentored)
Details
(Whiteboard: [good first bug][lang=c++])
Attachments
(1 file, 1 obsolete file)
|
1.05 KB,
patch
|
nika
:
review+
|
Details | Diff | Splinter Review |
While reading some telemetry ipc code, I noticed this code where we check whether ipcActor is null, and issue a warning if it is, keep running, and then proceed to dereference the actor pointer anyway.
It seems to me that this should be changed to a MOZ_ASSERT.
http://searchfox.org/mozilla-central/rev/aa1343961fca52e8c7dab16788530da31aab7c8d/toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.cpp#293
Comment 1•8 years ago
|
||
It would be odd to not have valid values for these, they should be the singleton for the specific child process the code runs in.
MOZ_ASSERT() sounds good to me.
Chris, sounds good? Want to set it up as a mentored bug?
Flags: needinfo?(chutten)
Priority: -- → P2
Comment 2•8 years ago
|
||
Sure.
To fix this bug, do as Nika says in comment#0: Replace the NS_WARN_IF line in SendAccumulatedData with a MOZ_ASSERT with a helpful message.
Mentor: chutten
Flags: needinfo?(chutten)
Whiteboard: [good first bug][lang=c++]
| Assignee | ||
Comment 3•8 years ago
|
||
| Assignee | ||
Updated•8 years ago
|
Attachment #8926576 -
Flags: review?(nika)
| Reporter | ||
Comment 4•8 years ago
|
||
Comment on attachment 8926576 [details] [diff] [review]
Telemetry: replace NS_WARN_IF with MOZ_ASSERT
Review of attachment 8926576 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/components/telemetry/ipc/TelemetryIPCAccumulator.cpp
@@ +294,2 @@
> if (histogramsToSend.Length()) {
> + MOZ_ASSERT(ipcActor->SendAccumulateChildHistograms(histogramsToSend));
Please don't change these lines to MOZ_ASSERT. We only want to change line 293 to a MOZ_ASSERT, the other lines can still fail :-).
Attachment #8926576 -
Flags: review?(nika)
| Assignee | ||
Comment 5•8 years ago
|
||
| Assignee | ||
Updated•8 years ago
|
Attachment #8926774 -
Flags: review?(nika)
| Assignee | ||
Updated•8 years ago
|
Attachment #8926576 -
Attachment is obsolete: true
| Reporter | ||
Comment 6•8 years ago
|
||
Comment on attachment 8926774 [details] [diff] [review]
Telemetry: replace NS_WARN_IF with MOZ_ASSERT
Review of attachment 8926774 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks :-)
Attachment #8926774 -
Flags: review?(nika) → review+
| Reporter | ||
Updated•8 years ago
|
Assignee: nobody → paul.bignier
| Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3ade6d760d37
Telemetry: replace NS_WARN_IF with MOZ_ASSERT. r=mystor
Keywords: checkin-needed
Comment 8•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•