Bug 234528

Summary: Harden PCM and ITP databases against crashes
Product: WebKit Reporter: Kate Cheney <katherine_cheney>
Component: WebKit Misc.Assignee: Kate Cheney <katherine_cheney>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, webkit-bug-importer, wilander
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description Kate Cheney 2021-12-20 14:41:11 PST
Harden PCM and ITP databases against crashes
Comment 1 Radar WebKit Bug Importer 2021-12-20 14:41:27 PST
<rdar://problem/86741319>
Comment 2 Kate Cheney 2021-12-20 14:51:11 PST
Created attachment 447646 [details]
Patch
Comment 3 Brent Fulgham 2021-12-20 15:18:38 PST
Comment on attachment 447646 [details]
Patch

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

r=me

> Source/WebKit/NetworkProcess/DatabaseUtilities.cpp:279
> +    WebCore::SQLiteTransaction transaction(m_database);

beginTransactionIfNecessary ASSERTs when on the main thread. Should we add that assertion, too?

ASSERT(!RunLoop::isMain());
Comment 4 Kate Cheney 2021-12-21 09:25:24 PST
Comment on attachment 447646 [details]
Patch

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

Thanks!

>> Source/WebKit/NetworkProcess/DatabaseUtilities.cpp:279
>> +    WebCore::SQLiteTransaction transaction(m_database);
> 
> beginTransactionIfNecessary ASSERTs when on the main thread. Should we add that assertion, too?
> 
> ASSERT(!RunLoop::isMain());

Yes, I can add that in.
Comment 5 Kate Cheney 2021-12-21 09:28:07 PST
Created attachment 447724 [details]
Patch for landing
Comment 6 Kate Cheney 2021-12-21 09:32:11 PST
Created attachment 447725 [details]
Patch for landing
Comment 7 EWS 2021-12-21 10:32:49 PST
Committed r287322 (245472@main): <https://commits.webkit.org/245472@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447725 [details].