On 2/1/18 6:40 PM, Nicholas Nethercote wrote:
- prefs.js, which is written by Firefox. Firefox should always generate
data that is accepted by the new parser

OK. I assume we've double-checked that? And that this was the case all along, for prefs extensions or about:config might have set in the past? (Especially the no-embedded-null thing.)

(If users do hand-edit, there might be problems. But that
file has a big "Do not edit this file" warning at the top, so I'm not too
worried about that case.)

People hand-edit somewhat commonly, because the interaction of user.js with the rest of the system is terrible...

Do you have suggestions on a better approach?

We could make a backup copy of prefs.js if an error is discovered in it, so that when we write it out again the old thing can still be recovered if needed.

Silently wrapping was also a footgun that came up in practice in bug
1424030 and bug 1434813. IMO it's better to give a clear error than to
silently do the wrong thing...

Modulo the dataloss issue, I agree.

-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to