Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

fix(performance): assign entry navigation identities

ldm0e2d80d44355e
diff --git a/moli-renderer-v8/Cargo.toml b/moli-renderer-v8/Cargo.toml
index c7ece53cf..7e194383b 100644
--- a/moli-renderer-v8/Cargo.toml
+++ b/moli-renderer-v8/Cargo.toml
@@ -101,6 +101,7 @@ html5ever = "0.39.0"
hashlink = "0.12.2"
indexmap = "2.14.2"
parking_lot = "0.12"
+fastrand = "2.3.0"
markup5ever = "0.39.0"
xml5ever = "0.39.0"
serde = { version = "1.0.228", features = ["derive"] }
diff --git a/moli-renderer-v8/src/context_bootstrap/performance_runtime.rs b/moli-renderer-v8/src/context_bootstrap/performance_runtime.rs
index 1a566272d..a0d322c8e 100644
--- a/moli-renderer-v8/src/context_bootstrap/performance_runtime.rs
+++ b/moli-renderer-v8/src/context_bootstrap/performance_runtime.rs
@@ -25,12 +25,15 @@ pub(in crate::context_bootstrap) const PERFORMANCE_NAVIGATION_REDIRECT_COUNT_SLO
"__moliPerformanceNavigationRedirectCount";
pub(in crate::context_bootstrap) const PERFORMANCE_ENTRY_NAME_SLOT: &str =
"__moliPerformanceEntryName";
+pub(in crate::context_bootstrap) const PERFORMANCE_ENTRY_ID_SLOT: &str = "__moliPerformanceEntryId";
pub(in crate::context_bootstrap) const PERFORMANCE_ENTRY_TYPE_SLOT: &str =
"__moliPerformanceEntryType";
pub(in crate::context_bootstrap) const PERFORMANCE_ENTRY_START_TIME_SLOT: &str =
"__moliPerformanceEntryStartTime";
pub(in crate::context_bootstrap) const PERFORMANCE_ENTRY_DURATION_SLOT: &str =
"__moliPerformanceEntryDuration";
+pub(in crate::context_bootstrap) const PERFORMANCE_ENTRY_NAVIGATION_ID_SLOT: &str =
+ "__moliPerformanceEntryNavigationId";
pub(in crate::context_bootstrap) const PERFORMANCE_ENTRY_DETAIL_SLOT: &str =
"__moliPerformanceEntryDetail";
pub(in crate::context_bootstrap) const PERFORMANCE_RESOURCE_INITIATOR_TYPE_SLOT: &str =
@@ -78,6 +81,7 @@ pub(in crate::context_bootstrap) const PERFORMANCE_EVENT_COUNTS_SLOT: &str =
pub(in crate::context_bootstrap) const PERFORMANCE_EVENT_COUNTS_VALUES_SLOT: &str =
"__moliPerformanceEventCountsValues";
pub(super) const PERFORMANCE_NAVIGATION_ENTRY_SLOT: &str = "__moliPerformanceNavigationEntry";
+pub(super) const PERFORMANCE_LAST_ENTRY_ID_SLOT: &str = "__moliPerformanceLastEntryId";
pub(super) const PERFORMANCE_NAVIGATION_TYPE_SEED_SLOT: &str =
"__moliPerformanceNavigationTypeSeed";
pub(super) const PERFORMANCE_NAVIGATION_NAME_SEED_SLOT: &str =
diff --git a/moli-renderer-v8/src/context_bootstrap/performance_runtime/entries.rs b/moli-renderer-v8/src/context_bootstrap/performance_runtime/entries.rs
index 136e5a8f8..67dfb76bc 100644
--- a/moli-renderer-v8/src/context_bootstrap/performance_runtime/entries.rs
+++ b/moli-renderer-v8/src/context_bootstrap/performance_runtime/entries.rs
@@ -28,6 +28,9 @@ struct PerformanceGetEntriesByNameArgs {
#[derive(WebApiObject)]
#[webapi(interface = web_api_interfaces::PerformanceEntry, scope_lifetime = 'scope)]
struct PerformanceEntryObjectDeclaration<'scope, 'name, 'entry_type> {
+ #[webapi(slot = PERFORMANCE_ENTRY_ID_SLOT)]
+ id: f64,
+
#[webapi(slot = PERFORMANCE_ENTRY_NAME_SLOT)]
name: &'name str,
@@ -40,6 +43,9 @@ struct PerformanceEntryObjectDeclaration<'scope, 'name, 'entry_type> {
#[webapi(slot = PERFORMANCE_ENTRY_DURATION_SLOT)]
duration: f64,
+ #[webapi(slot = PERFORMANCE_ENTRY_NAVIGATION_ID_SLOT)]
+ navigation_id: f64,
+
#[webapi(slot = PERFORMANCE_ENTRY_DETAIL_SLOT)]
detail: v8::Local<'scope, v8::Value>,
}
@@ -47,10 +53,12 @@ struct PerformanceEntryObjectDeclaration<'scope, 'name, 'entry_type> {
#[derive(WebApiObject)]
#[webapi(plain, data_properties, enumerable)]
struct PerformanceEntryJsonSnapshotDeclaration {
+ id: f64,
name: String,
entry_type: String,
start_time: f64,
duration: f64,
+ navigation_id: f64,
}
#[derive(WebApiObject)]
@@ -120,10 +128,12 @@ struct PerformanceResourceTimingSlotDeclaration {
#[derive(WebApiObject)]
#[webapi(plain, data_properties, enumerable)]
struct PerformanceResourceTimingJsonSnapshotDeclaration {
+ id: f64,
name: String,
entry_type: String,
start_time: f64,
duration: f64,
+ navigation_id: f64,
initiator_type: String,
next_hop_protocol: String,
worker_start: f64,
@@ -152,10 +162,12 @@ impl PerformanceResourceTimingJsonSnapshotDeclaration {
entry: v8::Local<'s, v8::Object>,
) -> Option<Self> {
Some(Self::new(
+ performance_entry_slot_number(scope, entry, PERFORMANCE_ENTRY_ID_SLOT)?,
performance_entry_slot_string(scope, entry, PERFORMANCE_ENTRY_NAME_SLOT)?,
performance_entry_slot_string(scope, entry, PERFORMANCE_ENTRY_TYPE_SLOT)?,
performance_entry_slot_number(scope, entry, PERFORMANCE_ENTRY_START_TIME_SLOT)?,
performance_entry_slot_number(scope, entry, PERFORMANCE_ENTRY_DURATION_SLOT)?,
+ performance_entry_slot_number(scope, entry, PERFORMANCE_ENTRY_NAVIGATION_ID_SLOT)?,
performance_entry_slot_string(scope, entry, PERFORMANCE_RESOURCE_INITIATOR_TYPE_SLOT)?,
performance_entry_slot_string(
scope,
@@ -217,28 +229,42 @@ struct PerformanceEntryPrototypeAccessorsDeclaration {
data = callback_data_index_value(scope, 0),
enumerable
)]
- name: (),
+ id: (),
#[webapi(
accessor_property,
getter = performance_entry_base_attribute_getter_callback,
data = callback_data_index_value(scope, 1),
enumerable
)]
- entry_type: (),
+ name: (),
#[webapi(
accessor_property,
getter = performance_entry_base_attribute_getter_callback,
data = callback_data_index_value(scope, 2),
enumerable
)]
- start_time: (),
+ entry_type: (),
#[webapi(
accessor_property,
getter = performance_entry_base_attribute_getter_callback,
data = callback_data_index_value(scope, 3),
enumerable
)]
+ start_time: (),
+ #[webapi(
+ accessor_property,
+ getter = performance_entry_base_attribute_getter_callback,
+ data = callback_data_index_value(scope, 4),
+ enumerable
+ )]
duration: (),
+ #[webapi(
+ accessor_property,
+ getter = performance_entry_base_attribute_getter_callback,
+ data = callback_data_index_value(scope, 5),
+ enumerable
+ )]
+ navigation_id: (),
}
#[derive(WebApiFunctionTemplate)]
@@ -467,6 +493,10 @@ fn performance_entry_to_json_callback<'s>(
mut rv: v8::ReturnValue<'_, v8::Value>,
) {
let receiver = args.this();
+ let Some(id) = performance_entry_slot_number(scope, receiver, PERFORMANCE_ENTRY_ID_SLOT) else {
+ throw_type_error(scope, "Illegal invocation");
+ return;
+ };
let Some(name) = performance_entry_slot_string(scope, receiver, PERFORMANCE_ENTRY_NAME_SLOT)
else {
throw_type_error(scope, "Illegal invocation");
@@ -490,10 +520,22 @@ fn performance_entry_to_json_callback<'s>(
throw_type_error(scope, "Illegal invocation");
return;
};
- let snapshot =
- PerformanceEntryJsonSnapshotDeclaration::new(name, entry_type, start_time, duration)
- .bind(scope)
- .expect("PerformanceEntry toJSON snapshot declaration should bind");
+ let Some(navigation_id) =
+ performance_entry_slot_number(scope, receiver, PERFORMANCE_ENTRY_NAVIGATION_ID_SLOT)
+ else {
+ throw_type_error(scope, "Illegal invocation");
+ return;
+ };
+ let snapshot = PerformanceEntryJsonSnapshotDeclaration::new(
+ id,
+ name,
+ entry_type,
+ start_time,
+ duration,
+ navigation_id,
+ )
+ .bind(scope)
+ .expect("PerformanceEntry toJSON snapshot declaration should bind");
rv.set(snapshot.into());
}
@@ -626,10 +668,12 @@ pub(in crate::context_bootstrap) fn set_performance_entry_slot_number<'s>(
}
const PERFORMANCE_ENTRY_BASE_ATTRIBUTE_SLOTS: &[&str] = &[
+ PERFORMANCE_ENTRY_ID_SLOT,
PERFORMANCE_ENTRY_NAME_SLOT,
PERFORMANCE_ENTRY_TYPE_SLOT,
PERFORMANCE_ENTRY_START_TIME_SLOT,
PERFORMANCE_ENTRY_DURATION_SLOT,
+ PERFORMANCE_ENTRY_NAVIGATION_ID_SLOT,
];
const PERFORMANCE_ENTRY_DETAIL_ATTRIBUTE_SLOTS: &[&str] = &[PERFORMANCE_ENTRY_DETAIL_SLOT];
@@ -749,10 +793,12 @@ pub(super) fn create_performance_entry<'s>(
) -> v8::Local<'s, v8::Object> {
let detail = detail.unwrap_or_else(|| v8::null(scope).into());
let entry = PerformanceEntryObjectDeclaration {
+ id: 0.0,
name,
entry_type,
start_time,
duration,
+ navigation_id: 0.0,
detail,
}
.bind(scope)
@@ -785,10 +831,12 @@ pub(super) fn initialize_performance_entry_slots<'s>(
) {
let detail = detail.unwrap_or_else(|| v8::null(scope).into());
PerformanceEntryObjectDeclaration {
+ id: 0.0,
name,
entry_type,
start_time,
duration,
+ navigation_id: 0.0,
detail,
}
.initialize(scope, entry)
@@ -800,6 +848,10 @@ pub(super) fn push_performance_entry<'s>(
performance: v8::Local<'s, v8::Object>,
entry: v8::Local<'s, v8::Object>,
) {
+ if super::install::is_window_performance(scope, performance) {
+ super::install::ensure_navigation_performance_entry(scope, performance);
+ }
+ assign_queued_performance_entry_identity(scope, performance, entry);
let entry_type = performance_entry_slot_string(scope, entry, PERFORMANCE_ENTRY_TYPE_SLOT)
.unwrap_or_default();
if entry_type == "resource" {
@@ -811,6 +863,60 @@ pub(super) fn push_performance_entry<'s>(
queue_matching_performance_observers(scope, entry, &entry_type);
}
+pub(super) fn assign_navigation_performance_entry_identity<'s>(
+ scope: &mut v8::PinScope<'s, '_>,
+ performance: v8::Local<'s, v8::Object>,
+ entry: v8::Local<'s, v8::Object>,
+) {
+ let id = ensure_performance_entry_id(scope, performance, entry);
+ set_performance_entry_slot_number(scope, entry, PERFORMANCE_ENTRY_NAVIGATION_ID_SLOT, id);
+}
+
+fn assign_queued_performance_entry_identity<'s>(
+ scope: &mut v8::PinScope<'s, '_>,
+ performance: v8::Local<'s, v8::Object>,
+ entry: v8::Local<'s, v8::Object>,
+) {
+ ensure_performance_entry_id(scope, performance, entry);
+ let navigation_id = get_private_value(scope, performance, PERFORMANCE_NAVIGATION_ENTRY_SLOT)
+ .and_then(|value| v8::Local::<v8::Object>::try_from(value).ok())
+ .and_then(|navigation| {
+ performance_entry_slot_number(scope, navigation, PERFORMANCE_ENTRY_ID_SLOT)
+ })
+ .unwrap_or(0.0);
+ set_performance_entry_slot_number(
+ scope,
+ entry,
+ PERFORMANCE_ENTRY_NAVIGATION_ID_SLOT,
+ navigation_id,
+ );
+}
+
+fn ensure_performance_entry_id<'s>(
+ scope: &mut v8::PinScope<'s, '_>,
+ performance: v8::Local<'s, v8::Object>,
+ entry: v8::Local<'s, v8::Object>,
+) -> f64 {
+ if let Some(id) = performance_entry_slot_number(scope, entry, PERFORMANCE_ENTRY_ID_SLOT)
+ .filter(|id| *id > 0.0)
+ {
+ return id;
+ }
+ let last_id = get_private_value(scope, performance, PERFORMANCE_LAST_ENTRY_ID_SLOT)
+ .and_then(|value| value.number_value(scope))
+ .unwrap_or_else(|| fastrand::u64(100..=10_000) as f64);
+ let id = last_id + fastrand::u64(1..=10) as f64;
+ let id_value = v8::Number::new(scope, id);
+ set_private_value(
+ scope,
+ performance,
+ PERFORMANCE_LAST_ENTRY_ID_SLOT,
+ id_value.into(),
+ );
+ set_performance_entry_slot_number(scope, entry, PERFORMANCE_ENTRY_ID_SLOT, id);
+ id
+}
+
pub(super) fn append_performance_entry<'s>(
scope: &mut v8::PinScope<'s, '_>,
performance: v8::Local<'s, v8::Object>,
diff --git a/moli-renderer-v8/src/context_bootstrap/performance_runtime/install.rs b/moli-renderer-v8/src/context_bootstrap/performance_runtime/install.rs
index cbf055d8c..2e47581cc 100644
--- a/moli-renderer-v8/src/context_bootstrap/performance_runtime/install.rs
+++ b/moli-renderer-v8/src/context_bootstrap/performance_runtime/install.rs
@@ -59,12 +59,19 @@ const LOAD_START_INDEX: usize = 2;
pub(super) const LOAD_END_INDEX: usize = 3;
const LIFECYCLE_TIMESTAMP_COUNT: usize = 4;
+fn initial_performance_entry_id() -> f64 {
+ fastrand::u64(100..=10_000) as f64
+}
+
#[derive(WebApiObject)]
#[webapi(interface = web_api_interfaces::Performance)]
struct PerformanceObjectDeclaration<'scope> {
#[webapi(slot = PERFORMANCE_TIME_ORIGIN_SLOT)]
time_origin: f64,
+ #[webapi(slot = PERFORMANCE_LAST_ENTRY_ID_SLOT)]
+ last_entry_id: f64,
+
#[webapi(slot = PERFORMANCE_ENTRIES_SLOT, init = "array")]
entries: (),
@@ -84,6 +91,9 @@ struct WorkerPerformanceObjectDeclaration {
#[webapi(slot = PERFORMANCE_TIME_ORIGIN_SLOT)]
time_origin: f64,
+ #[webapi(slot = PERFORMANCE_LAST_ENTRY_ID_SLOT)]
+ last_entry_id: f64,
+
#[webapi(slot = PERFORMANCE_ENTRIES_SLOT, init = "array")]
entries: (),
}
@@ -363,9 +373,12 @@ pub(in crate::context_bootstrap) fn install_worker_performance_runtime_state<'s>
)?;
super::super::exposed_interfaces::ensure_intrinsic_interface_constructor(scope, "Performance")?;
- let performance = WorkerPerformanceObjectDeclaration::new(unix_epoch_millis())
- .bind(scope)
- .map_err(|error| anyhow!("failed to create worker performance: {error}"))?;
+ let performance = WorkerPerformanceObjectDeclaration::new(
+ unix_epoch_millis(),
+ initial_performance_entry_id(),
+ )
+ .bind(scope)
+ .map_err(|error| anyhow!("failed to create worker performance: {error}"))?;
install_simple_event_target_methods(
scope,
performance,
@@ -400,6 +413,7 @@ pub(super) fn create_performance_object<'s>(
) -> v8::Local<'s, v8::Object> {
let performance = PerformanceObjectDeclaration::new(
time_origin,
+ initial_performance_entry_id(),
v8::undefined(scope).into(),
v8::undefined(scope).into(),
v8::undefined(scope).into(),
@@ -886,6 +900,7 @@ pub(super) fn ensure_navigation_performance_entry<'s>(
.map(|value| value.to_rust_string_lossy(scope))
.unwrap_or_else(|| "document".to_owned());
let entry = create_navigation_performance_entry(scope, &navigation_type, &name);
+ super::entries::assign_navigation_performance_entry_identity(scope, performance, entry);
set_private_value(
scope,
performance,
diff --git a/moli-renderer-v8/src/script_vm/tests/browser_api/navigation/performance.rs b/moli-renderer-v8/src/script_vm/tests/browser_api/navigation/performance.rs
index 657826fb8..56d0d1e44 100644
--- a/moli-renderer-v8/src/script_vm/tests/browser_api/navigation/performance.rs
+++ b/moli-renderer-v8/src/script_vm/tests/browser_api/navigation/performance.rs
@@ -293,6 +293,68 @@ fn performance_entries_hide_backing_slots_and_ignore_spoofing() {
);
}
+#[test]
+fn performance_entry_ids_follow_the_current_navigation() {
+ let mut vm = new_storage_test_vm("https://performance-entry-identity.test/");
+
+ let result = vm
+ .eval(
+ r#"
+ (() => {
+ const navigation = performance.getEntriesByType("navigation")[0];
+ const mark = performance.mark("identity-mark", { startTime: 1 });
+ const measure = performance.measure("identity-measure", {
+ start: 1,
+ duration: 2
+ });
+ const detached = new PerformanceMark("detached", { startTime: 3 });
+ const markJson = mark.toJSON();
+ const descriptors = ["id", "navigationId"].map(name => {
+ const descriptor = Object.getOwnPropertyDescriptor(
+ PerformanceEntry.prototype,
+ name
+ );
+ return [
+ name,
+ typeof descriptor?.get,
+ descriptor?.get?.name,
+ descriptor?.get?.length,
+ typeof descriptor?.set,
+ descriptor?.enumerable,
+ descriptor?.configurable
+ ].join(":");
+ });
+ return JSON.stringify({
+ descriptors,
+ navigation:
+ Number.isSafeInteger(navigation.id)
+ && navigation.id > 0
+ && navigation.navigationId === navigation.id,
+ queued:
+ Number.isSafeInteger(mark.id)
+ && Number.isSafeInteger(measure.id)
+ && navigation.id < mark.id
+ && mark.id < measure.id
+ && mark.navigationId === navigation.id
+ && measure.navigationId === navigation.id,
+ detached: detached.id === 0 && detached.navigationId === 0,
+ json:
+ Object.keys(markJson).join(",") ===
+ "id,name,entryType,startTime,duration,navigationId"
+ && markJson.id === mark.id
+ && markJson.navigationId === navigation.id
+ });
+ })()
+ "#,
+ )
+ .expect("PerformanceEntry identity probe should evaluate");
+
+ assert_eq!(
+ result,
+ r#"{"descriptors":["id:function:get id:0:undefined:true:true","navigationId:function:get navigationId:0:undefined:true:true"],"navigation":true,"queued":true,"detached":true,"json":true}"#
+ );
+}
+
#[test]
fn performance_user_timing_enforces_mark_and_measure_boundaries() {
let mut vm = new_storage_test_vm("https://performance-user-timing-boundaries.test/");
@@ -468,6 +530,17 @@ fn performance_entry_to_json_returns_native_base_snapshot() {
} catch (error) {
fakeError = error.name;
}
+ const markJson = mark.toJSON();
+ const measureJson = measure.toJSON();
+ const identities =
+ markJson.id === mark.id
+ && markJson.navigationId === mark.navigationId
+ && measureJson.id === measure.id
+ && measureJson.navigationId === measure.navigationId;
+ delete markJson.id;
+ delete markJson.navigationId;
+ delete measureJson.id;
+ delete measureJson.navigationId;
return JSON.stringify({
descriptor: [
descriptor.value.name,
@@ -480,8 +553,9 @@ fn performance_entry_to_json_returns_native_base_snapshot() {
&& PerformanceMeasure.prototype.toJSON === descriptor.value
&& !Object.prototype.hasOwnProperty.call(PerformanceMark.prototype, "toJSON")
&& !Object.prototype.hasOwnProperty.call(PerformanceMeasure.prototype, "toJSON"),
- mark: mark.toJSON(),
- measure: measure.toJSON(),
+ mark: markJson,
+ measure: measureJson,
+ identities,
fakeError
});
})()
@@ -491,7 +565,7 @@ fn performance_entry_to_json_returns_native_base_snapshot() {
assert_eq!(
result,
- r#"{"descriptor":"toJSON:0:true:true:true","inherited":true,"mark":{"name":"json-mark","entryType":"mark","startTime":12,"duration":0},"measure":{"name":"json-measure","entryType":"measure","startTime":3,"duration":4},"fakeError":"TypeError"}"#
+ r#"{"descriptor":"toJSON:0:true:true:true","inherited":true,"mark":{"name":"json-mark","entryType":"mark","startTime":12,"duration":0},"measure":{"name":"json-measure","entryType":"measure","startTime":3,"duration":4},"identities":true,"fakeError":"TypeError"}"#
);
}
@@ -541,10 +615,12 @@ fn parser_script_network_results_populate_buffered_resource_timing_snapshots() {
fakeToJSONError = error.name;
}
const expectedJsonKeys = [
+ "id",
"name",
"entryType",
"startTime",
"duration",
+ "navigationId",
"initiatorType",
"nextHopProtocol",
"workerStart",
@@ -580,6 +656,11 @@ fn parser_script_network_results_populate_buffered_resource_timing_snapshots() {
transferSizePositive: entry.transferSize > entry.encodedBodySize,
encodedBodySize: entry.encodedBodySize,
decodedBodySize: entry.decodedBodySize,
+ identity:
+ Number.isSafeInteger(entry.id)
+ && entry.id > 0
+ && entry.navigationId ===
+ performance.getEntriesByType("navigation")[0].id,
jsonOwnKeys: expectedJsonKeys.every(key =>
Object.prototype.hasOwnProperty.call(json, key)),
jsonMatchesEntry: expectedJsonKeys.every(key => json[key] === entry[key]),
@@ -599,7 +680,7 @@ fn parser_script_network_results_populate_buffered_resource_timing_snapshots() {
assert_eq!(
result,
- r#"{"length":1,"name":"https://resource-timing-script.test/app.js","entryType":"resource","initiatorType":"script","instance":true,"responseStatus":200,"contentType":"application/javascript","renderBlockingStatusValid":true,"transferSizePositive":true,"encodedBodySize":7,"decodedBodySize":7,"jsonOwnKeys":true,"jsonMatchesEntry":true,"toJSONDescriptor":"toJSON:0:true:true:true","fakeToJSONError":"TypeError"}"#
+ r#"{"length":1,"name":"https://resource-timing-script.test/app.js","entryType":"resource","initiatorType":"script","instance":true,"responseStatus":200,"contentType":"application/javascript","renderBlockingStatusValid":true,"transferSizePositive":true,"encodedBodySize":7,"decodedBodySize":7,"identity":true,"jsonOwnKeys":true,"jsonMatchesEntry":true,"toJSONDescriptor":"toJSON:0:true:true:true","fakeToJSONError":"TypeError"}"#
);
}
diff --git a/moli-renderer-v8/src/worker/thread/tests/postmessage.rs b/moli-renderer-v8/src/worker/thread/tests/postmessage.rs
index 54f1cab86..eff6c3f59 100644
--- a/moli-renderer-v8/src/worker/thread/tests/postmessage.rs
+++ b/moli-renderer-v8/src/worker/thread/tests/postmessage.rs
@@ -2256,6 +2256,17 @@ async fn worker_user_timing_uses_shared_mark_measure_runtime() {
measure.duration,
measure.detail.kind
].join(":"),
+ entryIds:
+ Number.isSafeInteger(mark.id)
+ && mark.id > 0
+ && Number.isSafeInteger(measure.id)
+ && measure.id > mark.id
+ && mark.navigationId === 0
+ && measure.navigationId === 0
+ && detached.id === 0
+ && detached.navigationId === 0
+ && mark.toJSON().id === mark.id
+ && mark.toJSON().navigationId === 0,
detachedTimelineCount:
performance.getEntriesByName("detached", "mark").length,
bufferedTypes: performance.getEntries()
@@ -2279,7 +2290,7 @@ async fn worker_user_timing_uses_shared_mark_measure_runtime() {
.expect("channel closed");
assert_eq!(
expect_post_json(msg),
- r#"{"timingNamesAccepted":true,"interfaces":true,"inheritance":true,"mark":"worker-mark:mark:2:0:before:false","measure":"worker-measure:measure:2:3:measure","detachedTimelineCount":0,"bufferedTypes":"mark,measure,mark","reservedBoundary":"TypeError","missingBoundary":"SyntaxError","markBrand":"TypeError","nowBrand":"TypeError"}"#
+ r#"{"timingNamesAccepted":true,"interfaces":true,"inheritance":true,"mark":"worker-mark:mark:2:0:before:false","measure":"worker-measure:measure:2:3:measure","entryIds":true,"detachedTimelineCount":0,"bufferedTypes":"mark,measure,mark","reservedBoundary":"TypeError","missingBoundary":"SyntaxError","markBrand":"TypeError","nowBrand":"TypeError"}"#
);
}