[Webkit-unassigned] [Bug 211043] IndexedDB: Support IDBFactory databases method

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 11 10:54:11 PDT 2020


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

--- Comment #7 from Sihui Liu <sihui_liu at apple.com> ---
(In reply to Darryl Pogue from comment #4)
> There remains some work to do in IDBFactory for web workers to resolve the
> promise on the correct thread. I'd love suggestions on how best to do that,
> and any suggested improvements to the rest of the changes.

Probably remember the ScriptExecutionContext with the callback and invoke the the callback on the context's thread. You can subclass IDBActiveDomObject, which has the needed functions. Then replace the class in m_databaseInfoCallbacks. Also remember to do proper cleanup of the map for situations like connection is lost, see IDBConnectionProxy::forgetActivityForCurrentThread.

Again, for the rest of the change, I suggest to merge your IDBConnectionProxy::getAllDatabaseNamesAndVersions with the existing IDBConnectionProxy::getAllDatabaseNames (You can rename it to getAllDatabaseNamesAndVersions). Current getAllDatabaseNamesAndVersions is basically the same as IDBConnectionProxy::getAllDatabaseNames on the server side but including the version number in results. You can throw away the version info in result or use a parameter to indicate whether version is needed in the function.

-- 
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/20200511/489e58de/attachment-0001.htm>


More information about the webkit-unassigned mailing list