Unexpected exception TypeError: can't access property "endsWith", marker.data.filename is undefined at Z:/task_1636322741/build/tests/xpcshell/tests/tools/profiler/tests/xpcshell/head.js:131
Categories
(Core :: Gecko Profiler, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
Details
Attachments
(1 file)
I've seen this happen in this Try, log.
The test marker.data?.filename.endsWith(filename)
assumes that there is always a "filename"
field in a "FileIO" marker, but it's not true if the IOInterposer could not retrieve a filename.
So the test should really be marker.data?.filename?.endsWith(filename)
, note the added ?
after filename
.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
If the IOInterposer cannot retrieve a filename, the "filename" property is not even written in the marker "data" payload. So its presence should be checked before trying to use JS string functions on it.
Comment 3•4 years ago
|
||
I checked that in the frontend types, we properly marked this property as optional.
Comment 4•4 years ago
|
||
bugherder |
Assignee | ||
Comment 5•4 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #3)
I checked that in the frontend types, we properly marked this property as optional.
Good idea, thank you for checking.
Description
•