Closed Bug 1265973 Opened 8 years ago Closed 8 years ago

Update is not allowed when the iteration of the cursor is in progress.

Categories

(Core :: Storage: IndexedDB, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: bevis, Assigned: bevis)

References

Details

(Whiteboard: btpp-active)

Attachments

(1 file)

      No description provided.
Summary: Update is not allow when iterating the cursor is already in progress → Update is not allowed when the iteration of the cursor is in progress.
Status: NEW → ASSIGNED
Ask r? for the following changes:
1. Check |mContinueCalled| flag in IDBCursor::Update()
2. Add corresponding web-platform tests.

Quate the statements in [1].
"
If this cursor's got value flag is false, indicating that the cursor is being iterated or has iterated past its end, or if this cursor does not implement the IDBCursorWithValue interface, the implementation MUST throw a DOMException of type InvalidStateError.
"

Since |mContinueCalled| is used to identify if the cursor is being iterated in addition to |mHaveValue|, |mContinueCalled| has to be checked as well when requesting IDBCursor::Update().

[1] https://www.w3.org/TR/IndexedDB/#widl-IDBCursor-update-IDBRequest-any-value
Attachment #8743150 - Flags: review?(khuey)
tryserver result in comment 1 looks fine.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/5f04a61564c8
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.