Summary: | Make sure SQLiteStatement objects get destroyed before the database is closed | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||||
Component: | WebCore Misc. | Assignee: | Chris Dumez <cdumez> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | achristensen, darin, ggaren, sam, sihui_liu, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Chris Dumez
2021-05-17 12:59:11 PDT
Created attachment 428862 [details]
Patch
Created attachment 428910 [details]
Patch
Comment on attachment 428910 [details] 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? Created attachment 428935 [details]
Patch
Committed r277653 (237859@main): <https://commits.webkit.org/237859@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 428935 [details]. |