Closed
Bug 1670972
Opened 4 years ago
Closed 3 years ago
defineLazyPreferenceGetter should throw on debug builds if the type of defaultValue mismatches with the preference type
Categories
(Core :: XPConnect, enhancement, P3)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
89 Branch
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: jaws, Assigned: jaws)
References
Details
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
Bug 1670972 - Fix default value preference type mismatches with calls to defineLazyPreferenceGetter.
47 bytes,
text/x-phabricator-request
|
Details | Review |
I've run in to this mistake before while writing patches, providing the wrong type for the default value due to some refactoring.
In debug builds, we could throw if there is a mismatch so we can catch these types of errors before code gets to release.
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9874086b7526 Throw an exception if the default value provided to defineLazyPreferenceGetter doesn't match the prefType. r=kmag https://hg.mozilla.org/integration/autoland/rev/ee63d9126cd8 Fix default value preference type mismatches with calls to defineLazyPreferenceGetter. r=vbudhram,markh,tjr
Comment 4•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9874086b7526
https://hg.mozilla.org/mozilla-central/rev/ee63d9126cd8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox89:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•