[webkit-changes] [WebKit/WebKit] f2b771: [Reporting API] Track limit of 100 reports by repo...

Brent Fulgham noreply at github.com
Fri Oct 7 20:53:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f2b771d11e7993796621895b3a5f5312575870a3
      https://github.com/WebKit/WebKit/commit/f2b771d11e7993796621895b3a5f5312575870a3
  Author: Brent Fulgham <bfulgham at apple.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/imported/w3c/web-platform-tests/reporting/reporting-api-honors-limits.https.sub-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/reporting/reporting-api-honors-limits.https.sub.html
    A LayoutTests/imported/w3c/web-platform-tests/reporting/reporting-api-honors-limits.https.sub.html.sub.headers
    M Source/WTF/wtf/Deque.h
    M Source/WebCore/Modules/reporting/ReportingObserver.cpp
    M Source/WebCore/Modules/reporting/ReportingScope.cpp
    M Source/WebCore/Modules/reporting/ReportingScope.h

  Log Message:
  -----------
  [Reporting API] Track limit of 100 reports by report type
https://bugs.webkit.org/show_bug.cgi?id=244369
<rdar://problem/99463125>

Reviewed by Chris Dumez.

Track the count of reports by type so we can limit enforcement of the 100-report
cap to each type.

* LayoutTests/TestExpectations: Update to log to stderr.
* LayoutTests/imported/w3c/web-platform-tests/reporting/reporting-api-honors-limits.https.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/reporting/reporting-api-honors-limits.https.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/reporting/reporting-api-honors-limits.https.sub.html.sub.headers: Added.
* Source/WTF/wtf/Deque.h:
(WTF::inlineCapacity>::removeFirstMatching): Added.
* Source/WebCore/Modules/reporting/ReportingObserver.cpp:
(WebCore::ReportingObserver::appendQueuedReportIfCorrectType): Only enqueue the set of reports when the report count is one. The full
set will get read when the Task starts draining the existing queue.
* Source/WebCore/Modules/reporting/ReportingScope.cpp:
(WebCore::ReportingScope::clearReports):
(WebCore::ReportingScope::notifyReportObservers): Increment per-report count. Only
purge matching reports once we exceed the limit.
* Source/WebCore/Modules/reporting/ReportingScope.h:

Canonical link: https://commits.webkit.org/255307@main




More information about the webkit-changes mailing list