There are two issues here. The first is a race condition. There is an incoming patch for this and I'll include a more detailed description of what the race is on the Phabricator page. This patch should solve the missing strings in the "Search in..." item, among other intermittent Touch Bar issues. In my own testing it also fixes the missing search icon although that might be a false positive. There are more icon-related issues: The second issue is that inputs not currently in the user's Touch Bar will be missing their icon in the Customization screen. STR: 1. Open Firefox. 2. Open the customization window (`Firefox > Customize Touch Bar...` in the menu bar). All icons should be present. 3. Close the customization window and close the Firefox window. 4. Open a new Firefox window. 5. Open the customization window again. Some icons and strings will be missing. (NB: If you open the customization again in the same window, the icons will now be showing). The patch for the race condition fixes the missing strings, but the missing icons seem to be an unrelated issue. I suspect the icon-issue is related to how we pass the document principal to `imgLoader`. Looks like the Touch Bar icon loader code gets all the way to [loading the image with `imgLoader->LoadImage`](https://searchfox.org/mozilla-central/source/widget/cocoa/nsIconLoaderService.mm#100) and then it dies somewhere in there. Presumably one of the parameters is wrong; maybe the document is outdated? Since these are two separate issues I'm going to post the patch for the race and file a follow-up.
Bug 1591839 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.
There are two issues here. The first is a race condition. There is an incoming patch for this and I'll include a more detailed description of what the race is on the Phabricator page. This patch should solve the missing strings in the "Search in..." item, among other intermittent Touch Bar issues. In my own testing it also fixes the missing search icon although that might be a false positive. There are more icon-related issues: The second issue is that inputs not currently in the user's Touch Bar will be missing their icon in the Customization screen. STR: 1. Open Firefox. 2. Open the customization window (`Firefox > Customize Touch Bar...` in the menu bar). All icons should be present. 3. Close the customization window and close the Firefox window. 4. Open a new Firefox window. 5. Open the customization window again. Some icons and strings will be missing. (NB: If you open the customization window again in the same Firefox window, the icons will now be showing). The patch for the race condition fixes the missing strings, but the missing icons seem to be an unrelated issue. I suspect the icon-issue is related to how we pass the document principal to `imgLoader`. Looks like the Touch Bar icon loader code gets all the way to [loading the image with `imgLoader->LoadImage`](https://searchfox.org/mozilla-central/source/widget/cocoa/nsIconLoaderService.mm#100) and then it dies somewhere in there. Presumably one of the parameters is wrong; maybe the document is outdated? Since these are two separate issues I'm going to post the patch for the race and file a follow-up.