runOncePerModification works on strings. If you pass a boolean down it
will always call its callback (because "true" != true etc).
Details
Diff Detail
- Repository
- rFIREFOXAUTOLAND firefox-autoland
- Build Status
Buildable 871815 Build 972735: arc lint + arc unit
Event Timeline
| browser/components/enterprisepolicies/Policies.sys.mjs | ||
|---|---|---|
| 1164 | This seems like a footgun. Can we instead modify runOncePerModification to stringify the value before doing the comparison? | |
| browser/components/enterprisepolicies/Policies.sys.mjs | ||
|---|---|---|
| 1164 |
Sure, in fact at first I thought of that but it was documented to take a string... Do you know if we're thinking of adding types to JS long term? It seems like typescript would've caught this. | |
| browser/components/enterprisepolicies/Policies.sys.mjs | ||
|---|---|---|
| 1164 | Yes we are and in fact I'm delighted to have examples to point to where they would have helped! | |
This revision requires a Testing Policy Project Tag to be set before landing. Please apply one of testing-approved, testing-exception-unchanged, testing-exception-ui, testing-exception-elsewhere, testing-exception-other. Tip: this Firefox add-on makes it easy!