API to report events

Summary:
Extends the WebPerformance API with ability to report events, [according to the standard](https://www.w3.org/TR/event-timing/#sec-performance-event-timing).

This is an API-only change, the actual reporting comes in a separate diff, to simplify reviewing.

Changelog: [Internal]

Reviewed By: christophpurrer

Differential Revision: D42097695

fbshipit-source-id: d8b468ffed50c1c3d889151df5e8ca644d6e1a68
This commit is contained in:
Ruslan Shestopalyuk
2022-12-16 11:45:06 -08:00
committed by Facebook GitHub Bot
parent d09c5fd7a9
commit 4eecab3a76
6 changed files with 46 additions and 5 deletions
@@ -26,7 +26,7 @@ using RawPerformanceEntry = NativePerformanceObserverCxxBaseRawPerformanceEntry<
// For "event" entries only:
std::optional<double>,
std::optional<double>,
std::optional<double>>;
std::optional<uint32_t>>;
template <>
struct Bridging<RawPerformanceEntry>
@@ -37,7 +37,7 @@ struct Bridging<RawPerformanceEntry>
double,
std::optional<double>,
std::optional<double>,
std::optional<double>> {};
std::optional<uint32_t>> {};
using GetPendingEntriesResult =
NativePerformanceObserverCxxBaseGetPendingEntriesResult<