Bug 186180
| Summary: | IDBTransaction randomly hangs for concurrent operations | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ian Weng <ian.weng> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | ||
| Priority: | P2 | ||
| Version: | Safari 11 | ||
| Hardware: | Mac | ||
| OS: | macOS 10.13 | ||
Ian Weng
The bug was found while using localForage: https://github.com/localForage/localForage
Initially I thought it was a localForage bug, but after play around, I believe it should belong to WebKit.
Basically none of IDBTransaction onabort/onerror/oncomplete are fired.
https://github.com/localForage/localForage/issues/824
My testing code can reproduce the bug (it passes in FF and Chrome)
https://github.com/localForage/localForage/pull/825
Doing this (referencing transaction in a global object) makes my testing code pass but I don't understand and guess the transaction could be garbage collected too early (before oncomplete being dispatched to event loop)
Let me know if you want some code getting rid of localForage (purely indexeddb), I am happy to do that but not sure whether it is needed at current stage.
Environments:
mac OS 10.13.4 (17E202), also tried r232383 High Sierra on it
iOS 11.3.1 (15E302)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |