The caller of CreateStorageConnection needs to know if the usage file was removed even if the method failed
Categories
(Core :: Storage: localStorage & sessionStorage, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox84 | --- | unaffected |
firefox85 | --- | disabled |
firefox86 | --- | fixed |
People
(Reporter: janv, Assigned: sg)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
This is a regression that was introduced by changes done in bug 1671367.
Reporter | ||
Comment 1•5 years ago
|
||
The call at https://searchfox.org/mozilla-central/rev/f8a41209af503016e78278774052d48d8c52b91c/dom/localstorage/ActorsParent.cpp#7395 no longer sets rv
and LS_TRY_INSPECT immediately returns if there was an error, so the check below doesn't have a chance to update the quota object.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
We could either change the return type of CreateStorageConnection
to std::pair<Result<nsCOMPtr<mozIStorageConnection>, nsresult>, bool>
(with the bool indicating whether the usage file was removed), or add a functor argument that is called by CreateStorageConnection
in case it removes the usage file and change the return type to simply Result<nsCOMPtr<mozIStorageConnection>, nsresult>
. Without having checked feasibility, I have a slight preference for the latter option.
Reporter | ||
Comment 3•5 years ago
|
||
Yes, I would prefer the latter as well.
Assignee | ||
Comment 4•5 years ago
|
||
The handler is called before opening the connection again. This does not restore
the behaviour before Bug 1684912 exactly. In case removal of the usage or database
file fails, the handler will not be called. Also, if the handler fails, the database
will not be attempted to be recreated.
Updated•5 years ago
|
Comment 5•5 years ago
|
||
Set release status flags based on info from the regressing bug 1671367
Comment 6•5 years ago
|
||
Is this something we can live with for 85, is the fix going to be ready for uplift this week, or are we better off reverting the regressing change?
Assignee | ||
Comment 7•5 years ago
|
||
(In reply to Julien Cristau [:jcristau] from comment #6)
Is this something we can live with for 85, is the fix going to be ready for uplift this week, or are we better off reverting the regressing change?
The affected behaviour is enabled only in Nightly, so we can live with the unpatched version riding to 85.
Updated•5 years ago
|
Comment 9•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•