Check notifyPagesWhenTelemetryWasCaptured before notifying pages if there is no WebPa...
authorwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2017 18:21:16 +0000 (18:21 +0000)
committerwilander@apple.com <wilander@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Oct 2017 18:21:16 +0000 (18:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178470
<rdar://problem/34417518>

Reviewed by Brian Burg.

* UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
    Add a missing check of notifyPagesWhenTelemetryWasCaptured.
    The page notification is only for testing purposes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223616 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebResourceLoadStatisticsTelemetry.cpp

index 025c615..dcc2e5a 100644 (file)
@@ -1,3 +1,16 @@
+2017-10-18  John Wilander  <wilander@apple.com>
+
+        Check notifyPagesWhenTelemetryWasCaptured before notifying pages if there is no WebPageProxy
+        https://bugs.webkit.org/show_bug.cgi?id=178470
+        <rdar://problem/34417518>
+
+        Reviewed by Brian Burg.
+
+        * UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
+        (WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
+            Add a missing check of notifyPagesWhenTelemetryWasCaptured.
+            The page notification is only for testing purposes.
+
 2017-10-18  Chris Dumez  <cdumez@apple.com>
 
         Unreviewed, fix build error after r223608 with some SDKs.
index bb1f7b6..5302aee 100644 (file)
@@ -248,7 +248,8 @@ void WebResourceLoadStatisticsTelemetry::calculateAndSubmit(const WebResourceLoa
     
     auto webPageProxy = nonEphemeralWebPageProxy();
     if (!webPageProxy) {
-        notifyPages(0, 0, 0);
+        if (notifyPagesWhenTelemetryWasCaptured)
+            notifyPages(0, 0, 0);
         return;
     }