Closed Bug 1548006 Opened 7 years ago Closed 7 years ago

Reloading a system add-on leaks 2 windows and 1 docshell

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox68 --- affected

People

(Reporter: nhnt11, Unassigned)

References

(Blocks 1 open bug)

Details

STR:

  1. Add a minimal system add-on in browser/extensions (manifest + empty background script)
  2. Create a mochitest-bc with the following code:
add_task(async function foo() {
  let addon = await AddonManager.getAddonByID("bar@mozilla.org");
  await addon.reload();
  ok(true, "yay");
});
  1. Run the test on debug

I modified the fxmonitor add-on/test to reproduce this; here's what I see in the log:

 0:17.16 ERROR TEST-UNEXPECTED-FAIL | browser/extensions/fxmonitor/test/browser/browser_fxmonitor_doorhanger.js | leaked 2 window(s) until shutdown [url = moz-extension://100e67e6-5bf5-714c-8e5d-e18a218965ca/_generated_background_page.html]
 0:17.16 INFO TEST-INFO | browser/extensions/fxmonitor/test/browser/browser_fxmonitor_doorhanger.js | windows(s) leaked: [pid = 35394] [serial = 18], [pid = 35394] [serial = 16]
 0:17.16 ERROR TEST-UNEXPECTED-FAIL | browser/extensions/fxmonitor/test/browser/browser_fxmonitor_doorhanger.js | leaked 1 docShell(s) until shutdown

I think this bug should go in the WebExtensions product but I couldn't really find any combination of product+component that made sense. Apologies in advance.

I'll try and find some time to make a minimal testcase patch later.

I had a conversation with aswan about this on IRC. This is not practical to "fix" - i.e. to get the leak-checking code to expect this/ignore it. Seems like xpcshell is a better choice for tests that involve reloading add-ons.

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.