Looking at https://searchfox.org/mozilla-central/rev/5bcbe6ae54ee5b152f6cef29dc5627ec7c0e1f1e/dom/l10n/DOMLocalization.cpp#142-153 perhaps 1 change in DOM l10n that could fix this would be reordering the args + l10n id setting (or at least ensure we don't set the l10n ID if we fail to stringify the args) ?
Bug 1801716 Comment 43 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Looking at https://searchfox.org/mozilla-central/rev/5bcbe6ae54ee5b152f6cef29dc5627ec7c0e1f1e/dom/l10n/DOMLocalization.cpp#142-153 perhaps 1 change in DOM l10n that could fix this would be reordering the args + l10n id setting (or at least ensure we don't set the l10n ID if we fail to stringify the args) ? That is, AFAICT what happens there is we set the l10n id provided, and then if stringify'ing the args fails we return early - potentially leaving the ID set without setting the args.