GleanEvent.record(null) throws
Categories
(Toolkit :: Telemetry, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: florian, Assigned: chutten)
Details
Attachments
(1 external file)
I was told instrumentation methods are supposed to never throw, but I noticed today that passing null to an event's record method throws ("Uncaught TypeError: GleanEvent.record: Argument 1 is not an object.")
Passing undefined or an actual object works, but this might be one of the reasons to have a try/catch block around the Glean calls.
| Assignee | ||
Comment 1•2 years ago
|
||
Might be able to solve this by just adding ? to the record function making aExtra nullable in addition to optional.
| Assignee | ||
Comment 2•2 years ago
|
||
Update: having difficulty with the combination of the param being both optional and nullable (hitting an assert inside mozilla::Maybe). Might be solvable, might not be.
| Assignee | ||
Comment 3•2 years ago
|
||
Treat it like undefined and empty records: like nothing was passed at all.
Comment 4•2 years ago
|
||
The severity field is not set for this bug.
:chutten, could you have a look please?
For more information, please visit BugBot documentation.
| Assignee | ||
Updated•2 years ago
|
Comment 6•2 years ago
|
||
| bugherder | ||
Description
•