Open Bug 1640192 Opened 5 years ago Updated 4 months ago

Extension not completely gone after shutting down (likely because tabs.executeScript calls on pending/discarded tabs)

Categories

(WebExtensions :: General, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: rpl, Assigned: zombie)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

STR:

  • install uBlock origin
  • set in about:preferences the option to save the session on quit
  • open some http urls in some new tabs
  • shutdown and restart Firefox again
  • uninstall uBlock
  • select on of the pending tabs not yet restored

Expected:

  • uBlock is completely gone and selecting the tab doesn't trigger any error

Actual:

  • The following message is logged in the Browser Console:
Cannot send function call result: other side closed connection (call data: {{path: "tabs.executeScript", args: [..., {..., file: "js/scriptlets/should-inject-contentscript.js", ..., runAt: "document_idle"}]}))
  • part of the WebExtensions framework internals related to uBlock are not completely gone:

By setting a breakpoint right where that message is logged (ExtensionParent.jsm:976) I did also verified that the
the ProxyContextParent, Extension class instance and the WebExtensionPolicy instance are still around, but the WebExtensionPolicy instance is not active (its active property is false).

(As a side note, I did also double-checked that the Extension instance did successfully completed to execute its shutdown method, and it is where its WebExtensionPolicy has been marked as false).

The reason for this state may be related to the fact that the tabs were still pending when uBlock did call tabs.executeScript before being uninstalled (but I haven't actively checked if there were other ways to trigger this behavior without pending tabs).

There are perhaps two separate issue. The executeScript should be rejected on lazy tabs, and we should investigate why the proxy context is still alive.

Assignee: nobody → tomica
Flags: needinfo?(tomica)
Severity: -- → S3
Flags: needinfo?(tomica)
Priority: -- → P2
Depends on: 1653876
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: