[webkit-reviews] review granted: [Bug 202074] Stop refing UniqueIDBDatabaseTransaction in callbacks : [Attachment 379373] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 24 05:42:00 PDT 2019


youenn fablet <youennf at gmail.com> has granted Sihui Liu <sihui_liu at apple.com>'s
request for review:
Bug 202074: Stop refing UniqueIDBDatabaseTransaction in callbacks
https://bugs.webkit.org/show_bug.cgi?id=202074

Attachment 379373: Patch

https://bugs.webkit.org/attachment.cgi?id=379373&action=review




--- Comment #5 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 379373
  --> https://bugs.webkit.org/attachment.cgi?id=379373
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=379373&action=review

> Source/WebCore/ChangeLog:9
> +	   passed to StorageQuotaManager. This can make
UniqueIDBDatabaseTransaction live longer than UniqueIDBDatabase.

LGTM.
As long as UniqueIDBDatabaseTransaction is RefCounted, we have no real way of
guaranteeing that UniqueIDBDatabaseTransaction will never live longer than
UniqueIDBDatabase.
Ideally, we should try to make UniqueIDBDatabaseTransaction no longer
RefCounted.
Instead, UniqueIDBDatabase will have unique_ptr<UniqueIDBDatabaseTransaction>
and other users of transaction will have WeakPtr<UniqueIDBDatabaseTransaction>.


More information about the webkit-reviews mailing list