0
Files
src/content/browser
Mingyu Lei 0ece2ab04a Apply BFCache logic to notifications dispatched to dedicated workers
In the previous CL from the chain (https://crrev.com/c/3861889), we
implemented the logic to check if the current document is BFCache
when dispatching the notification events. However, this only works for
notification service that is created from the document directly since
the weak document pointer will be null if the notification service
is created from a worker.

In this CL, the notification service creation functions are changed
to also accept a enum flag indicating whether it's created from a
document, shared worker, dedicated worker, or service worker. This flag
will be stored in the notification service so we don't have to rely on
the `document_url` to check if it's associated with a worker.
Additionally, for dedicated workers, we store the weak document
pointer of its ancestor frame so we can determined if the host
document is in BFCache when dispatching the notification events.


Bug: 1350944
Change-Id: I8475b1e243998e599ebb3208a48f1cfa9df30b95
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3876770
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1064794}
2022-10-28 11:58:54 +00:00
..
2022-09-15 14:03:50 +00:00
2022-09-15 14:03:50 +00:00
2022-09-15 14:03:50 +00:00
2022-10-27 21:14:33 +00:00
2022-10-19 05:11:27 +00:00