Closed Bug 1632128 Opened 4 years ago Closed 4 years ago

Simplify unnecessarily complex ResultHelper classes

Categories

(Core :: Storage: IndexedDB, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: sg, Assigned: sg)

Details

Attachments

(6 files, 1 obsolete file)

The union in the two ResultHelper classes should be replaced by by mozilla::Variant, which is both safer and simpler to use. Maybe the whole ResultHelper classes can be factored away in the course of this.

Priority: -- → P3
Status: NEW → ASSIGNED
Summary: Replace union by mozilla::Variant in ResultHelper classes → Simplify unnecessarily complex ResultHelper classes

(In reply to Simon Giesecke [:sg] [he/him] from comment #0)

The union in the two ResultHelper classes should be replaced by by mozilla::Variant, which is both safer and simpler to use. Maybe the whole ResultHelper classes can be factored away in the course of this.

Actually, no mozilla::Variant is necessary either, the classes can be made static, with no data members at all.

Attachment #9147662 - Attachment is obsolete: true
Attachment #9147685 - Attachment description: Bug 1632128 - Make ResultHelper a static class. r=#dom-workers-and-storage → Bug 1632128 - Dissolve ResultHelper class into a function. r=#dom-workers-and-storage
Attachment #9147914 - Attachment description: Bug 1632128 - Make FileHandleResultHelper a static class. r=#dom-workers-and-storage → Bug 1632128 - Dissolve FileHandleResultHelper class into a function. r=#dom-workers-and-storage
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e01603c2600
Use mozilla::Variant for ResultHelper. r=dom-workers-and-storage-reviewers,janv
https://hg.mozilla.org/integration/autoland/rev/e4f2bb3f4635
Use mozilla::Variant for FileHandleResultHelper. r=dom-workers-and-storage-reviewers,janv
https://hg.mozilla.org/integration/autoland/rev/b1d098d0edcf
De-virtualize IDBRequest::SetResult(Callback). r=dom-workers-and-storage-reviewers,janv
https://hg.mozilla.org/integration/autoland/rev/4c55bf108c9b
De-virtualize IDBFileRequest::SetResult(Callback). r=dom-workers-and-storage-reviewers,janv
https://hg.mozilla.org/integration/autoland/rev/1e9b275f2afa
Dissolve ResultHelper class into a function. r=dom-workers-and-storage-reviewers,janv
https://hg.mozilla.org/integration/autoland/rev/7c0d5a5a3f2a
Dissolve FileHandleResultHelper class into a function. r=dom-workers-and-storage-reviewers,janv
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: