[webkit-reviews] review granted: [Bug 225881] Make sure SQLiteStatement objects get destroyed before the database is closed : [Attachment 428910] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 17 23:07:01 PDT 2021


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 225881: Make sure SQLiteStatement objects get destroyed before the database
is closed
https://bugs.webkit.org/show_bug.cgi?id=225881

Attachment 428910: Patch

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




--- Comment #3 from Darin Adler <darin at apple.com> ---
Comment on attachment 428910
  --> https://bugs.webkit.org/attachment.cgi?id=428910
Patch

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

> Source/WebCore/platform/sql/SQLiteDatabase.cpp:225
> +	   ASSERT_WITH_MESSAGE(!m_statementCount, "All SQLiteTransaction
objects should be destroyed before closing the database");

"should" -> "must"

> Source/WebCore/platform/sql/SQLiteDatabase.cpp:727
> +void SQLiteDatabase::incrementStatementCount()
> +{
> +#if ASSERT_ENABLED
> +    ++m_statementCount;
> +#endif
> +}
> +
> +void SQLiteDatabase::decrementStatementCount()
> +{
> +#if ASSERT_ENABLED
> +    ASSERT(m_statementCount);
> +    --m_statementCount;
> +#endif
> +}

When asserts are disabled you’d want this empty function inlined. Can we put
these in the header?


More information about the webkit-reviews mailing list