Closed Bug 1179025 Opened 10 years ago Closed 10 years ago

Protect against using cursors on a deleted objectStore/index

Categories

(Core :: Storage: IndexedDB, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: bent.mozilla, Assigned: bent.mozilla)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached patch Patch, v1 (obsolete) — Splinter Review
From bug 1178829: http://w3c-test.org/IndexedDB/idbcursor_advance_index9.htm http://w3c-test.org/IndexedDB/idbcursor_advance_objectstore5.htm http://w3c-test.org/IndexedDB/idbcursor_continue_index8.htm http://w3c-test.org/IndexedDB/idbcursor_continue_objectstore6.htm These are now fixed. The DOM changes were easy, but verifying stuff in the parent is a little more tricky. I think the old parameter verification for continue/advance was never called, so I moved some stuff around to make it more sane.
Attachment #8627987 - Flags: review?(Jan.Varga)
Attached patch Patch, v1Splinter Review
Sorry, previous version had a change from another bug mixed in.
Attachment #8627987 - Attachment is obsolete: true
Attachment #8627987 - Flags: review?(Jan.Varga)
Attachment #8627990 - Flags: review?(Jan.Varga)
Blocks: 1178829
Comment on attachment 8627990 [details] [diff] [review] Patch, v1 Review of attachment 8627990 [details] [diff] [review]: ----------------------------------------------------------------- Looks good!
Attachment #8627990 - Flags: review?(Jan.Varga) → review+
Relanded with s/false/nullptr/ in the relevant function.
Jan, is there a reason we have those two separate switch statements after this patch instead of a single combined one?
Flags: needinfo?(Jan.Varga)
Not checking this in pending an answer to comment 8
(In reply to Boris Zbarsky [:bz] from comment #8) > Jan, is there a reason we have those two separate switch statements after > this patch instead of a single combined one? Hm, thanks for catching this. Yeah, it can be combined and objectStoreId and indexId can be removed too.
Flags: needinfo?(Jan.Varga)
Well, objectStoreId and indexId _have_ to be removed to not turn the tree orange. Can you do the combining, based on that last patch I attached?
Flags: needinfo?(Jan.Varga)
Ok, I'll do it.
(In reply to Jan Varga [:janv] from comment #12) > Ok, I'll do it. Done.
Flags: needinfo?(Jan.Varga)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: