Title: [256085] trunk/Source/WebKit
Revision
256085
Author
[email protected]
Date
2020-02-07 17:03:47 -0800 (Fri, 07 Feb 2020)

Log Message

REGRESSION: ASSERTION FAILED: resetResult == 0 on regression tests in ITP code, resetting SQLite statement
https://bugs.webkit.org/show_bug.cgi?id=207269
<rdar://problem/59188891>

Reviewed by Brady Eidson.

Adds logging if ITP telemetry calculations fail to step and makes sure
not to reset the statement in this case as it will result in an error.

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (256084 => 256085)


--- trunk/Source/WebKit/ChangeLog	2020-02-08 00:52:41 UTC (rev 256084)
+++ trunk/Source/WebKit/ChangeLog	2020-02-08 01:03:47 UTC (rev 256085)
@@ -1,3 +1,16 @@
+2020-02-07  Kate Cheney  <[email protected]>
+
+        REGRESSION: ASSERTION FAILED: resetResult == 0 on regression tests in ITP code, resetting SQLite statement
+        https://bugs.webkit.org/show_bug.cgi?id=207269
+        <rdar://problem/59188891>
+
+        Reviewed by Brady Eidson.
+
+        Adds logging if ITP telemetry calculations fail to step and makes sure
+        not to reset the statement in this case as it will result in an error.
+
+        * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+
 2020-02-07  Chris Dumez  <[email protected]>
 
         [IPC Hardening] Protect against bad parameters in WebProcessProxy::getPluginProcessConnection()

Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (256084 => 256085)


--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp	2020-02-08 00:52:41 UTC (rev 256084)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp	2020-02-08 01:03:47 UTC (rev 256085)
@@ -946,7 +946,13 @@
 
 unsigned ResourceLoadStatisticsDatabaseStore::getNumberOfPrevalentResources() const
 {
-    if (m_countPrevalentResourcesStatement.step() == SQLITE_ROW) {
+    auto stepValue = m_countPrevalentResourcesStatement.step();
+    if (stepValue != SQLITE_ROW && stepValue != SQLITE_DONE) {
+        RELEASE_LOG_ERROR(Network, "ResourceLoadStatisticsDatabaseStore::getNumberOfPrevalentResources failed to step, error message: %{public}s", m_database.lastErrorMsg());
+        ASSERT_NOT_REACHED();
+        return 0;
+    }
+    if (stepValue == SQLITE_ROW) {
         unsigned prevalentResourceCount = m_countPrevalentResourcesStatement.getColumnInt(0);
         if (prevalentResourceCount >= minimumPrevalentResourcesForTelemetry) {
             resetStatement(m_countPrevalentResourcesStatement);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to