Closed Bug 1686910 Opened 3 years ago Closed 3 years ago

Bad handling of non-existent origin directory in SaveOriginAccessTimeOp::DoDirectoryWork

Categories

(Core :: Storage: Quota Manager, defect)

defect

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: sg, Assigned: sg)

References

(Blocks 4 open bugs)

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/2a24205479519e70c0574929f45730d285141584/dom/quota/ActorsParent.cpp#8282 appears to expect that GetBinaryOutputStream returns nullptr in case of a non-existent file. However, it return a NS_ERROR_UNEXPECTED in that case. Since that doesn't allow to discriminate between a non-existent file and other errors without ambiguity, it should probably check for existence of the file before trying to open it. The comment above the line confusingly refers to existence of the origin directory. This should also be adjusted, and resolve the implicit assumption that existence of the origin directory and of the metadata file are equivalent.

Type: task → defect
Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED
Attachment #9197375 - Attachment description: Bug 1686910 - Check for existence of metadata file explicitly in SaveOriginAccessTimeOp::DoDirectoryWork. r=#dom-workers-and-storage → Bug 1686910 - Check for existence of origin directory explicitly in SaveOriginAccessTimeOp::DoDirectoryWork. r=#dom-workers-and-storage
Summary: Bad handling of non-existent metadata file in SaveOriginAccessTimeOp::DoDirectoryWork → Bad handling of non-existent origin directory in SaveOriginAccessTimeOp::DoDirectoryWork

(In reply to Jan Varga [:janv] from comment #2)

This might fix bug 1582384, bug 1582385, bug 1582386 and bug 1582387.

Once this lands we should have a look at those bugs, thus marking them as blocked.

I wonder what tool produces/tracks these warning counts?

Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/acd57716ac6d
Check for existence of origin directory explicitly in SaveOriginAccessTimeOp::DoDirectoryWork. r=dom-workers-and-storage-reviewers,janv
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: