[Webkit-unassigned] [Bug 216769] Indexed DB transactions outdated immediately after it just created

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 23 21:40:08 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=216769

--- Comment #8 from Sihui Liu <sihui_liu at apple.com> ---
(In reply to zjwpeter from comment #7)
> > Another look at the spec today, https://w3c.github.io/IndexedDB/#transaction-inactive
> > says transaction is inactive when control returns to event loop. For this test case, IIUC, transaction being and records being added are two tasks, i.e. execute JS -> JS VM idle(deactivating transaction) -> execute JS... in this perspective, it seems right to deactivate the transaction :|. @Brady may know more as he initially added this.
> 
> 
> It says "A transaction is in this state(inactive) after control returns to
> the event loop after its creation". But Promises and async function are not
> join the event loop, they are microtasks.
> 
> > A microtask is a short function which is executed after the function or program which created it exits and only if the JavaScript execution stack is empty, but before returning control to the event loop being used by the user agent to drive the script's execution environment
> 
> (https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API/
> Microtask_guide)

Thanks for the info. I confirmed transaction being created is in the same runloop task with record being added, so VM::whenIdle is definitely not what should be used here, as it does not tell us when control is returned.

-- 
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/20200924/09b5c1f5/attachment-0001.htm>


More information about the webkit-unassigned mailing list