> Are the arguments the same every time? Yes. The call is executed 7 times, once for a different panel, and then 6 times for `privacy.containers` with the same addon enabled and the same element. Easy to test: 1) Install the test extension from bug 1534480 STR 2) Set `console.log(arguments);` at the top of `setControllingExtensionDescription` 3) Open Firefox Preferences. > I still don't understand how multiple calls with the same arguments have anything to do with this issue. 1) Call `setControllingExtensionDescription(elem, {name: "Cookie Addon"}, "privacy.containers");` 2) We remove all childNodes from `elem`, insert `<img/>` and call `document.l10n.setAttributes(elem, "extension-controlled-privacy-containers", {name: addon.name});` - all works fine. 3) We call `setControllingExtensionDescription(elem, {name: "Cookie Addon"}, "privacy.containers");` again. 4) We remove all childNodes from `elem`, insert `<img/>` and call `document.l10n.setAttributes(elem, "extension-controlled-privacy-containers", {name: addon.name});` - all works fine. Now, with my patch in bug 1534480, in (4), we don't trigger translation again, because id/args don't change. So the element stays empty with `<img/>` child only and no translation. Hope that explains what happens better and warrants my two questions.
Bug 1545399 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
> Are the arguments the same every time? Yes. The call is executed 7 times, once for a different panel, and then 6 times for `privacy.containers` with the same addon enabled and the same element. Easy to test: 1) Install the test extension from bug 1534480 STR 2) Set `console.log(arguments);` at the top of `setControllingExtensionDescription` 3) Open Firefox Preferences. > I still don't understand how multiple calls with the same arguments have anything to do with this issue. 1) Call `setControllingExtensionDescription(elem, {name: "Cookie Addon"}, "privacy.containers");` 2) We remove all childNodes from `elem`, insert `<img/>` and call `document.l10n.setAttributes(elem, "extension-controlled-privacy-containers", {name: addon.name});` - all works fine. 3) We call `setControllingExtensionDescription(elem, {name: "Cookie Addon"}, "privacy.containers");` again. 4) We remove all childNodes from `elem`, insert `<img/>` and call `document.l10n.setAttributes(elem, "extension-controlled-privacy-containers", {name: addon.name});` - *here's what bug 1534480 impacts*. Now, with my patch in bug 1534480, in (4), we don't trigger translation again, because id/args don't change. So the element stays empty with `<img/>` child only and no translation. Hope that explains what happens better and warrants my two questions.