Bug 234528 - Harden PCM and ITP databases against crashes
Summary: Harden PCM and ITP databases against crashes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kate Cheney
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-20 14:41 PST by Kate Cheney
Modified: 2021-12-21 10:32 PST (History)
4 users (show)

See Also:


Attachments
Patch (5.69 KB, patch)
2021-12-20 14:51 PST, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch for landing (7.92 KB, patch)
2021-12-21 09:28 PST, Kate Cheney
no flags Details | Formatted Diff | Diff
Patch for landing (5.82 KB, patch)
2021-12-21 09:32 PST, Kate Cheney
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].