Closed Bug 1598164 Opened 5 months ago Closed 4 months ago

Make transactions inactive during clone

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- wontfix
firefox73 --- fixed

People

(Reporter: asuth, Assigned: sg)

References

(Regressed 1 open bug, )

Details

Attachments

(11 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

There's a nice invariant cleanup at https://github.com/w3c/IndexedDB/pull/310 that would be good to implement.

Tests already were upstreamed by Chrome to WPT in https://github.com/web-platform-tests/wpt/commit/fee6738f9523f5e257accfaea8ddfef2e28cfbcd and we have the test in-tree (although failing) at https://searchfox.org/mozilla-central/source/testing/web-platform/tests/IndexedDB/structured-clone-transaction-state.any.js

:sg, this seems up your alley with your recent cleanups.

Flags: needinfo?(sgiesecke)
Assignee: nobody → sgiesecke
Status: NEW → ASSIGNED
Flags: needinfo?(sgiesecke)

Implementing this properly requires the cleanup of the IDBTranscation state model to better match the spec planned for Bug 1497007 (explicit commit).

Is calling IDBObjectStore.deleteIndex allowed during structured clone? We have a custom test for that here: dom/indexedDB/test/unit/test_clone_before_key_evaluation.js, which fails after making the wpt work.

Flags: needinfo?(bugmail)

It was previously allowed but a bad idea to allow it. test_clone_before_key_evaluation.js can be removed as with the changes to the spec and WPT we will have sufficient coverage of this area of code.

Er, and to be explicit: deleteIndex is no longer allowed during structured clone per the spec changes. (And I think this is a significant improvement in the spec!)

Flags: needinfo?(bugmail)

Also removed obsolete dom/indexedDB/test/test_clone_before_key_evaluation.html test case,
which tested for the opposite behaviour.

Depends on D54266

Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18bfaf645c42
Improved test assertion messages and removed code duplication. r=dom-workers-and-storage-reviewers,edenchuang
https://hg.mozilla.org/integration/autoland/rev/fa4b9c36227a
Fix structured-clone-transaction-state.any.js test case. r=dom-workers-and-storage-reviewers,janv
https://hg.mozilla.org/integration/autoland/rev/82141e34c89f
Use scoped enums in IDBTransaction. r=dom-workers-and-storage-reviewers,edenchuang
https://hg.mozilla.org/integration/autoland/rev/812780d706ae
Make use of std::copy_if/MakeBackInserter in IDBTransaction::AbortInternal. r=dom-workers-and-storage-reviewers,ytausky
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7e0a3e5cdb4d
Fixed log message printf string. r=dom-workers-and-storage-reviewers,janv
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/97a03c24e865
Align ReadyState with states defined in the spec. r=dom-workers-and-storage-reviewers,edenchuang
https://hg.mozilla.org/integration/autoland/rev/fb6184becfbd
Remove uses of already_AddRefed. r=dom-workers-and-storage-reviewers,janv
Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c56dd45e9f5
Added FlippedOnce class template to help reducing statefulness of boolean flags. r=dom-workers-and-storage-reviewers,ytausky
https://hg.mozilla.org/integration/autoland/rev/2c2c3b33ea1b
Made some boolean flags in IDBTransaction FlippedOnce to reduce statefulness. r=dom-workers-and-storage-reviewers,ytausky
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ebf5f725d0b3
Implement transaction inactive state according to spec. r=dom-workers-and-storage-reviewers,ytausky
Keywords: leave-open
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ca182ba97ae6
Fixed log messages, use serial number of transaction. r=dom-workers-and-storage-reviewers,janv
Status: REOPENED → RESOLVED
Closed: 4 months ago4 months ago
Resolution: --- → FIXED
Regressions: 1605948
You need to log in before you can comment on or make changes to this bug.