Closed Bug 1875781 Opened 8 months ago Closed 8 months ago

Add explicit (non-generated) URLSearchParams deserialization

Categories

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

task

Tracking

()

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: janv, Assigned: janv)

References

Details

Attachments

(2 files)

Bug 1636761 needs to make URLSearchParams not structured-cloneable. Ideally, we would be able to adjust all structured clones containing URLSearchParams stored in IndexedDB to not contain URLSearchParams. The main concern is the amount of data which would need to be read, deserialized, serialized and stored again. It will be better to just create an empty object during deserialization for given tag. However, the support for serialization/deserialization of URLSearchParams is currently automatically generated and that code will disappear after bug 1636761. So we need to add support for explicit (non-generated) URLSearchParams deserialization in IndexedDB first.

Bug 1636761 needs to make URLSearchParams not structured-cloneable. This new
test makes sure that a serialized URLSearchParams object stored in a
pre-existing database is correctly deserialized when read from the pre-existing
database. The test is supposed to be modified as part of making URLSearchParams
not structured-cloneable.

This is a preparation for bug 1636761 which needs to make URLSearchParams not structured-cloneable.

Depends on D199338

Pushed by bugmail@asutherland.org:
https://hg.mozilla.org/integration/autoland/rev/464fd132979b
Add testing for pre-existing databases containing URLSearchParams; r=dom-storage-reviewers,asuth
https://hg.mozilla.org/integration/autoland/rev/ad0e7eb94dfc
Add explicit non-default URLSearchParams deserialization; r=dom-storage-reviewers,asuth

Backed out for causing mochitests failures in test_structuredCloneAndExposed.html.

Flags: needinfo?(jvarga)
Flags: needinfo?(jvarga)
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/407b25cb78f3
Add testing for pre-existing databases containing URLSearchParams; r=dom-storage-reviewers,asuth
https://hg.mozilla.org/integration/autoland/rev/fa2f2d4895b1
Add explicit non-default URLSearchParams deserialization; r=dom-storage-reviewers,asuth

Backed out for causing xpcshell failures in test_URLSearchParams.js.

Flags: needinfo?(jvarga)

For some unknown reason the new test failed on autoland, but it works on try:
https://treeherder.mozilla.org/jobs?repo=try&revision=65a83ad4219f59c3c9cb256f85f022b65c125fed

Flags: needinfo?(jvarga)

Aha, the automatic reverting change in phab (done as part of the first backout) https://phabricator.services.mozilla.com/D199338?vs=814699&id=815391#toc zeroed the zip file in the patch. So when I landed it again, the zip file landed as zero sized.

Also, please take into account the fact that this hazard fail also appears.

  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | hazards | unrooted '<returnvalue>' of type 'JSObject*' live across GC call at dom/indexedDB/IndexedDatabase.cpp:396
Flags: needinfo?(jvarga)

Ok, thanks.

Flags: needinfo?(jvarga)
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6b9ad25d33f8
Add testing for pre-existing databases containing URLSearchParams; r=dom-storage-reviewers,asuth
https://hg.mozilla.org/integration/autoland/rev/82be6ce55d85
Add explicit non-default URLSearchParams deserialization; r=dom-storage-reviewers,asuth
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: