ExtensionProcessCrashObserver should use integer (number) instead of string type for childID
Categories
(WebExtensions :: General, task, P3)
Tracking
(firefox142 fixed)
| Tracking | Status | |
|---|---|---|
| firefox142 | --- | fixed |
People
(Reporter: robwu, Assigned: alex.stout55555, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [addons-jira])
Attachments
(1 file, 1 obsolete file)
The childID parameter in ExtensionProcessCrashObserver is currently a string, but the more common convention is for the value to be a number.
We should use parseInt(data, 10) instead of just data at: https://searchfox.org/mozilla-central/rev/b6b8ff043e944a5e32ea63208d3ba7cb6b16191d/toolkit/components/extensions/Extension.sys.mjs#697
and for test coverage, add Assert.ok(Number.isInteger(currentProcessChildID), "correct type"); after https://searchfox.org/mozilla-central/rev/b6b8ff043e944a5e32ea63208d3ba7cb6b16191d/toolkit/components/extensions/test/browser/browser_ext_process_crash_handling.js#107
Updated•3 years ago
|
| Reporter | ||
Comment 1•3 years ago
|
||
This is a good first bug for people who want to familiarize themselves with setting up a development environment and submitting a patch. To get started, see https://wiki.mozilla.org/WebExtensions/Contribution_Onramp
Since this bug is essentially two lines of change, I recommend the following steps once you have set up the development environment:
- Run the test first to verify that it passes as expected:
./mach test toolkit/components/extensions/test/browser/browser_ext_process_crash_handling.js - Add the test as explained in the first comment.
- Run the test again to verify that it not fails.
- Fix the bug as suggested in the first comment.
- Run the test again to verify that the test now passes again.
- Submit the patch for review.
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
Updated•1 year ago
|
Comment 5•1 year ago
|
||
| bugherder | ||
Description
•