Closed
Bug 1509040
Opened 7 years ago
Closed 6 years ago
Don't allow snapshotting in non-main processes
Categories
(Toolkit :: Telemetry, enhancement, P1)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
mozilla67
People
(Reporter: chutten, Assigned: janerik)
Details
Attachments
(2 files)
A report on Telemetry from :Bas[1] shows that we permit content processes in mochitests to try to snapshot histograms.
Whoops.
We should either early-return or, in the case of the JS{Keyed}Histogram objects, omit unsupported functions from their prototypes.
We should also audit Scalars and Events to ensure that they do something sensible and predictable, too.
[1]: https://mozilla.logbot.info/telemetry/20181121#c15640130-c15640199
Reporter | ||
Comment 1•7 years ago
|
||
Taking the bug to investigate alternatives and propose a solution.
Assignee: nobody → chutten
Status: NEW → ASSIGNED
Points: --- → 1
Priority: -- → P1
Reporter | ||
Comment 2•7 years ago
|
||
SCALARS AUDIT:
On non-parent processes we return `{}` for snapshots
EVENTS AUDIT:
On non-parent processes we return an error for snapshots.
HISTOGRAMS AUDIT:
Two ways to snapshot: `getSnapshotFor{Keyed}Histograms` and `JS{Keyed}HistogramInstance.snapshot()`
getSnapshotFor{Keyed}Histograms might successfully generate a snapshot with default values for all flag histograms, but it checks its return values so likely isn't an immediate problem.
JS{Keyed}HistogramInstance.snapshot() doesn't check its return values, so derefs a potentially-nullptr.
JS{Keyed}HistogramInstance.clear() checks its return values, so likely isn't an immediate problem.
---
We need to throw some early returns in there. I vote for NS_ERROR_FAILURE to echo Events' behaviour.
We can optionally also not define "snapshot" and "clear" on JS{Keyed}Histogram objects in non-parent processes. I like this approach from a "tests with bad uses can't even pass by accident" point-of-view, but I don't know how widely this behaviour might be spread (and how e10s/Fennec might interfere).
Reporter | ||
Comment 3•7 years ago
|
||
Investigation complete. Popping back out for retriage.
Assignee: chutten → nobody
Status: ASSIGNED → NEW
Priority: P1 → --
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → chutten
Status: NEW → ASSIGNED
Priority: -- → P2
Reporter | ||
Updated•6 years ago
|
Assignee: chutten → nobody
Status: ASSIGNED → NEW
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → jrediger
Priority: P2 → P1
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D17920
Pushed by jrediger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ff9bc983ae7
Don't allow snapshotting/clearing in non-parent processes r=chutten
https://hg.mozilla.org/integration/autoland/rev/a5d034708f99
Remove useless wrapper function r=chutten
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2ff9bc983ae7
https://hg.mozilla.org/mozilla-central/rev/a5d034708f99
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox67:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Updated•6 years ago
|
status-firefox66:
--- → ?
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•