Commit c40082b
committed
CrashTracer: com.apple.WebKit.Networking at WebKit: WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource
https://bugs.webkit.org/show_bug.cgi?id=221432
<rdar://problem/67069819>
Reviewed by John Wilander.
We are seeing crashes in ResourceLoadStatisticsDatabaseStore::setPrevalentResource
as a result of trying to use a nullopt domainID value. In theory this should
never be WTF::nullopt but is because of a failing SQLite query in
ResourceLoadStatisticsDatabaseStore::domainID which reports the error "not an error".
To fix this we should check the domain ID and return early with a
debug assert in setPrevalentResource() if it is WTF::nullopt to avoid
a crash. Additionally, we should add more information to the logging
statement, specifically the SQLite statement string, to try and debug further.
* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::ResourceLoadStatisticsDatabaseStore::domainID const):
(WebKit::ResourceLoadStatisticsDatabaseStore::setPrevalentResource):
Canonical link: https://commits.webkit.org/233742@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272418 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent ccae124 commit c40082b
2 files changed
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
1 | 23 | | |
2 | 24 | | |
3 | 25 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
796 | 796 | | |
797 | 797 | | |
798 | 798 | | |
799 | | - | |
| 799 | + | |
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
| |||
1670 | 1670 | | |
1671 | 1671 | | |
1672 | 1672 | | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
1673 | 1680 | | |
1674 | 1681 | | |
1675 | 1682 | | |
| |||
1693 | 1700 | | |
1694 | 1701 | | |
1695 | 1702 | | |
1696 | | - | |
| 1703 | + | |
1697 | 1704 | | |
1698 | 1705 | | |
1699 | 1706 | | |
| |||
0 commit comments