LGTM! I tested on ChromeOS and can confirm this does resolve the P0 issue of language installs not happening. Language installs still take much longer than previously (~30 sec), which we should look into.
Fixed: b/448034422
Please fix this WARNING reported by No short links in OSS: Do not use b/<number> on the Fixed: line in OSS code. Prefer `Fixed: <number>` i...
Do not use b/<number> on the Fixed: line in OSS code. Prefer `Fixed: <number>` instead. While bugs should be public by default, bugs that must remain internal may use b:<number>, ignoring this warning; see https://www.chromium.org/issue-tracking/googler-guidelines/.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Auto-Submit | +1 |
Commit-Queue | +1 |
Please fix this WARNING reported by No short links in OSS: Do not use b/<number> on the Fixed: line in OSS code. Prefer `Fixed: <number>` i...
Do not use b/<number> on the Fixed: line in OSS code. Prefer `Fixed: <number>` instead. While bugs should be public by default, bugs that must remain internal may use b:<number>, ignoring this warning; see https://www.chromium.org/issue-tracking/googler-guidelines/.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks for the fix! Could we add a regression test?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Auto-Submit | +1 |
Commit-Queue | +1 |
Thanks for the fix! Could we add a regression test?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
PTAL as this is blocking stable. Thanks.
Code-Review | +1 |
Thanks! Just one small improvement
IN_PROC_BROWSER_TEST_F(ServiceWorkerBasedBackgroundTest,
WakeEventPage_WakesServiceWorkerBasedExtension) {
nit: Lets add a comment that explains the test and links to the regression bug
const Extension* extension =
extension_registry_->enabled_extensions().GetByID(extension_id);
if ((extension && BackgroundInfo::IsServiceWorkerBased(extension) &&
!GetServiceWorkersForExtension(extension_id).empty()) ||
GetBackgroundHostForExtension(extension_id)) {
nit: If there is no extension, cannot wake the event page regardless of whether it's service worker or background page. The background host is removed if the extension is unloaded [here](https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/process_manager.cc;l=635-643;drc=240825a2c96b5bd0ae6d124919de323054ac6080;bpv=1;bpt=1)
I think it's more correct to exit early if there is no extension:
```
if (!extension) {
// No extension to wake up.
return;
}
if (BackgroundInfo::IsServiceWorkerBased(extension) &&
!GetServiceWorkersForExtension(extension_id).empty()) ||
GetBackgroundHostForExtension(extension_id)) {
// The extension is already awake
return;
}
```
Sorry I missed this on the previous review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Auto-Submit | +1 |
IN_PROC_BROWSER_TEST_F(ServiceWorkerBasedBackgroundTest,
WakeEventPage_WakesServiceWorkerBasedExtension) {
nit: Lets add a comment that explains the test and links to the regression bug
Done
const Extension* extension =
extension_registry_->enabled_extensions().GetByID(extension_id);
if ((extension && BackgroundInfo::IsServiceWorkerBased(extension) &&
!GetServiceWorkersForExtension(extension_id).empty()) ||
GetBackgroundHostForExtension(extension_id)) {
nit: If there is no extension, cannot wake the event page regardless of whether it's service worker or background page. The background host is removed if the extension is unloaded [here](https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/process_manager.cc;l=635-643;drc=240825a2c96b5bd0ae6d124919de323054ac6080;bpv=1;bpt=1)
I think it's more correct to exit early if there is no extension:
```
if (!extension) {
// No extension to wake up.
return;
}if (BackgroundInfo::IsServiceWorkerBased(extension) &&
!GetServiceWorkersForExtension(extension_id).empty()) ||
GetBackgroundHostForExtension(extension_id)) {
// The extension is already awake
return;
}
```Sorry I missed this on the previous review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
6 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/extensions/service_worker_apitest.cc
Insertions: 3, Deletions: 0.
@@ -1970,6 +1970,9 @@
EXPECT_TRUE(finished_listener.WaitUntilSatisfied());
}
+// Regression test for crbug.com/c/448034422. Other tests already test that a
+// background page is wakened via WakeEventPage, but this tests that service
+// worker based extensions wake too.
IN_PROC_BROWSER_TEST_F(ServiceWorkerBasedBackgroundTest,
WakeEventPage_WakesServiceWorkerBasedExtension) {
ExtensionTestMessageListener event_listener_added("ready");
```
Ensure WakeEventPage works for service worker based extensions
On ChromeOS we have a launch blocking P0 that language downloads do not
work in read aloud. This is because we are waiting for the tts engine to
wake before requesting install but it never wakes in the manifest v3
version. See where this is used at
https://source.corp.google.com/h/chromium/chromium/src/+/main:chrome/browser/extensions/component_loader.cc;l=753?q=chrome%2Fbrowser%2Fextensions%2Fcomponent_loader.cc
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |