WebExtensionTest#testExtensionProcessCrash never crashes an extension process
Categories
(GeckoView :: Extensions, defect)
Tracking
(firefox160 fixed)
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: RyanVM, Assigned: RyanVM)
Details
Attachments
(1 external file)
WebExtensionTest#testExtensionProcessCrash, added in bug 1819737, loads about:crashextensions and expects ExtensionProcessDelegate.onDisabledProcessSpawning to be called once. In the GeckoView junit runtime it is never called, and the test passes only because end-of-test @AssertCalled counts are not checked (bug 2080318).
The junit runtime starts with extensions.webextensions.remote set to false, and ExtensionPolicyService caches that pref on first read, so setting it in the test does not move extensions out of the parent process. The test's extension, borderify.xpi, also has no background page, so there is no extension process for about:crashextensions to kill. With an extension that has a background page, its background load is refused in the parent process with NS_ERROR_CONTENT_BLOCKED.
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
The shared junit runtime starts with extensions.webextensions.remote=false and ExtensionPolicyService caches
that value, so the test's pref flip left extensions in the parent process, and borderify has no background
page, so about:crashextensions had nothing to kill. Start a TestRuntimeService in its own process with
extensionsProcessEnabled(true) and a crash threshold of 0, wait for the messaging extension's background page,
then check that crashing the extension process calls onDisabledProcessSpawning exactly once.
Updated•1 month ago
|
Comment 3•1 month ago
|
||
| bugherder | ||
Description
•