QuotaManagerService does not run on GeckoView
Categories
(Core :: Storage: Quota Manager, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: esawin, Assigned: baku)
References
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
While working on bug 1501108 to implement the data clearing API, I've noticed that the QuotaManagerService
is never run on GeckoView so that the "clear-origin-attributes-data"
is not handled to clear storage data.
Do we need to initialize the service on startup and if so, what is the proper way to do that?
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
"clear-origin-attributes-data" category entry is currently registered here:
https://searchfox.org/mozilla-central/rev/7c20ad925005fbad7b8e08813115f1ec7fa1c248/layout/build/nsLayoutModule.cpp#248
GeckoView probably needs something similar.
Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Jan Varga [:janv] from comment #1)
"clear-origin-attributes-data" category entry is currently registered here:
https://searchfox.org/mozilla-central/rev/7c20ad925005fbad7b8e08813115f1ec7fa1c248/layout/build/nsLayoutModule.cpp#248GeckoView probably needs something similar.
We could easily call Services.qms.clearStorageForOriginAttributesPattern
alongside with Services.clearData.deleteDataFromOriginAttributesPattern
, but to me it seems like this is a bug in ClearDataService
, shouldn't it take care of initialization of all the storage management services when deleting storage data?
Reporter | ||
Updated•6 years ago
|
Comment 3•6 years ago
|
||
The initialization is currently lazy, so we only register a category entry here:
https://searchfox.org/mozilla-central/rev/7c20ad925005fbad7b8e08813115f1ec7fa1c248/layout/build/nsLayoutModule.cpp#248
When there's a Services.clearData.deleteDataFromOriginAttributesPattern call, the QuotaManagerService is created and "clear-origin-attributes-data" is handled by that service.
I don't know why it doesn't work in GeckoView.
Andrea, do you have an idea ?
Assignee | ||
Comment 4•6 years ago
|
||
Wondering if the problem is here:
We don't initialize nsLayoutModule for GeckoView processes, could it be?
I think it's OK to initialize QMS in ClearDataService. I'll take this bug. Esawin, can you check if nsComponentManager.cpp initialize nsLayoutModule in GeckoView? Thanks!
Assignee | ||
Comment 5•6 years ago
|
||
Depends on D24674
Comment 7•6 years ago
|
||
bugherder |
Reporter | ||
Comment 8•6 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #4)
Wondering if the problem is here:
We don't initialize nsLayoutModule for GeckoView processes, could it be?
I think it's OK to initialize QMS in ClearDataService. I'll take this bug. Esawin, can you check if nsComponentManager.cpp initialize nsLayoutModule in GeckoView? Thanks!
We do call nsLoayoutModuleInitialize()
in nsComponentManager
for both GeckoView processes (parent and content).
It looks like your patch doesn't fix the situation, QuotaManagerService
is initialized but is not handling "clear-origin-attributes-data"
.
Comment 9•6 years ago
|
||
I think the problem is that QMS currently doesn't register as an observer for "clear-origin-attributes-data".
It registers a category entry for that instead, so the observer service notifies it by searching category entries.
The category stuff probably doesn't work in GeckoView.
Comment 10•4 years ago
|
||
(In reply to Jan Varga [:janv] from comment #9)
I think the problem is that QMS currently doesn't register as an observer for "clear-origin-attributes-data".
It registers a category entry for that instead, so the observer service notifies it by searching category entries.
The category stuff probably doesn't work in GeckoView.
For posterity: This came up in https://phabricator.services.mozilla.com/D33758 as part of bug 1474608 and was addressed by :tt. While we do continue to generate the observer notification in ClearDataService, this is now done explicitly as part of ClearDataService's explicit support for deleteByOriginAttributes
and QuotaManager's cleaner explicitly was made to handle this directly without caring about the observer notification.
Description
•