[webkit-reviews] review denied: [Bug 209618] REGRESSION(r259034): access to null UniqueIDBDatabase in UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection() : [Attachment 394654] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 26 14:42:37 PDT 2020


Geoffrey Garen <ggaren at apple.com> has denied Sihui Liu <sihui_liu at apple.com>'s
request for review:
Bug 209618: REGRESSION(r259034): access to null UniqueIDBDatabase in
UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection()
https://bugs.webkit.org/show_bug.cgi?id=209618

Attachment 394654: Patch

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




--- Comment #3 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 394654
  --> https://bugs.webkit.org/attachment.cgi?id=394654
Patch

It's not great for correctness to rely on destruction order. We don't have a
smart reliable way to guarantee destruction order.

I think a better solution in this case would be to change
UniqueIDBDatabaseConnection to hold a direct pointer to IDBServer. That way,
there's no need to deference UniqueIDBDatabase in the destructor. Also, it
would be good to change UniqueIDBDatabaseConnection::m_database to be a
WeakPtr, for memory safety. (That way, a bug like this will be detectable even
without guard malloc, and will not become a security bug.)


More information about the webkit-reviews mailing list