[Webkit-unassigned] [Bug 216769] Indexed DB transactions outdated immediately after it just created
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 22 19:18:30 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=216769
--- Comment #5 from Sihui Liu <sihui_liu at apple.com> ---
(In reply to zjwpeter from comment #4)
> Hi I understand this idea of transaction auto commits.
> You can see I use a function to check if the transaction has been outdated
> every time before I start a transaction operation.
> My check do work, if the transaction has been outdated, it will create a new
> transaction immediately.
>
> After the new transaction created there is no any synchronous operation, on
> the chrome and Firefox, this work well. But on the safari it seems like it
> is possible that the transaction is outdated immediately just after it has
> been created.
>
> Please carefully check my example again, I didn't include a wrong usage of
> indexed DB transaction.
ah sorry, I misunderstood your question. You meant
await transaction.store.add({ a: 1 }, 'c')
fails as newly created transaction by beforeTx() is inactive. This seems a real bug.
Specifically, we are deactivating transaction when vm is idle:
vm.whenIdle([protectedThis = makeRef(*this)]() {
protectedThis->deactivate();
});
I don't know why we need this, changelog does not provide explanation either: https://trac.webkit.org/changeset/198762/webkit. Maybe we should remove this.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200923/c478c811/attachment.htm>
More information about the webkit-unassigned
mailing list