Closed Bug 1609000 Opened 4 years ago Closed 4 years ago

nsIControllers.removeController fails on extension shutdown

Categories

(WebExtensions :: Untriaged, defect, P3)

defect

Tracking

(firefox-esr68 unaffected, firefox72 unaffected, firefox73 fixed, firefox74 fixed)

RESOLVED FIXED
mozilla74
Tracking Status
firefox-esr68 --- unaffected
firefox72 --- unaffected
firefox73 --- fixed
firefox74 --- fixed

People

(Reporter: mixedpuppy, Assigned: robwu)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I'm seeing a lot of failure tracebacks in extension tests when we destroy the background script browser that is in a hidden window. It happens during extension shutdown.

Console message: [JavaScript Error: "[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIControllers.removeController]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://global/content/elements/browser-custom-element.js :: destroy :: line 1374" data: no]"]

https://searchfox.org/mozilla-central/rev/9e45d74b956be046e5021a746b0c8912f1c27318/toolkit/content/widgets/browser-custom-element.js#1374

_releaseBrowser@resource://gre/modules/ExtensionParent.jsm:1427:18

https://searchfox.org/mozilla-central/rev/9e45d74b956be046e5021a746b0c8912f1c27318/toolkit/components/extensions/ExtensionParent.jsm#1427

e.g. bug 1590787: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=284751157&repo=autoland&lineNumber=43972

This also happens when an extension popup (e.g. browserAction) is closed. I was looking into this as a part of bug 1394019

Assignee: nobody → rob
Status: NEW → ASSIGNED
Priority: -- → P3
Keywords: regression
Regressed by: 1604003
Has Regression Range: --- → yes

(In reply to Rob Wu [:robwu] from comment #2)

Regressed by https://hg.mozilla.org/mozilla-central/rev/8f97448e08d6

The regressing bug 1604003 change is now in 73 Beta. Do we need to uplift this fix to 73 Beta?

Yes, let's do that. I'll request uplift once the patch has landed.

Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/d035b29accb1
Stop logspam when <browser> is removed r=kmag
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74

Hello,

Will this fix require manual validation? If yes, please provide some steps to reproduce in order to correctly test it and also, please set the "qe-verify+" flag. Otherwise, could the "qe-verify-" flag be added?

Thanks!

Flags: needinfo?(rob)

We're in RC week now for 73. How badly do we need to uplift this?

This patch resolves a recent regression that caused logspam in a frequently used component.
For this reason I'd like to uplift this.

Flags: needinfo?(rob) → qe-verify-

Comment on attachment 9122423 [details]
Bug 1609000 - Stop logspam when <browser> is removed

Beta/Release Uplift Approval Request

  • User impact if declined: Logspam in the browser console by frequently used browser features (non-tab <browser> elements). E.g. when the user hovers the mouse over the extension button.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small patch: the code reponsible for logspam is wrapped in a condition that does not throw.

An alternative fix is to remove the log call, as shown at: https://phabricator.services.mozilla.com/D60720?id=221020

  • String changes made/needed: -
Attachment #9122423 - Flags: approval-mozilla-release?

Comment on attachment 9122423 [details]
Bug 1609000 - Stop logspam when <browser> is removed

No end user impact, just makes some spammy warnings go away. Approved for 73.0 RC2.

Attachment #9122423 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: