Bug 178380
| Summary: | IndexedDB index cursor stops when updating an object | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Fahlander <david.fahlander> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Normal | CC: | bfulgham, icewil, sihui_liu, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 11 | ||
| Hardware: | Unspecified | ||
| OS: | All | ||
| URL: | http://dexie.org/test/dexie-issue-594/index.html | ||
David Fahlander
Steps to reproduce:
1. Opening a cursor on an index (IDBIndex.prototype.openCursor())
2. req.onsuccess: call cursor.update() or store.put()
3. Next req.onsuccess indicates end of iteration (req.result is falsy)
Expected behavior:
...
3. Next req.onsuccess lands on the next object matched in the index.
Note: There seems not to be an issue for IDBObjectStore.prototype.openCursor(), it's just IDBIndex that fails.
Repro: http://dexie.org/test/dexie-issue-594/index.html
The repro should show:
3
3
But with Safari 10 or 11, it shows
3
1
The reason the last digit is 1, is because a call to Dexie.Collection.modify() will stop after first match, as it calls cursor.update() on it.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
David Fahlander
Original issue: https://github.com/dfahlander/Dexie.js/issues/594
Radar WebKit Bug Importer
<rdar://problem/88339506>
Brent Fulgham
This appears to be working properly in current Safari/WebKit.