mirror of
https://github.com/lexmount/moli.git
synced 2026-11-18 16:08:37 +00:00
fix(performance): inherit navigation timing from resource entries
This commit is contained in:
@@ -1397,15 +1397,3 @@ fn performance_navigation_timing_to_json_callback<'s>(
|
||||
}
|
||||
rv.set(output.into());
|
||||
}
|
||||
|
||||
fn object_json_snapshot<'s>(
|
||||
scope: &mut v8::PinScope<'s, '_>,
|
||||
source: v8::Local<'s, v8::Object>,
|
||||
keys: &[&str],
|
||||
) -> v8::Local<'s, v8::Object> {
|
||||
let output = ObjectLiteralDeclaration::bind(scope);
|
||||
for key in keys {
|
||||
output.copy_string_property(scope, source, key);
|
||||
}
|
||||
output.into_object()
|
||||
}
|
||||
|
||||
@@ -70,7 +70,8 @@ fn navigation_timing_json_reads_native_inherited_state_after_freezing_and_lifecy
|
||||
const read = (prototype, key) =>
|
||||
Object.getOwnPropertyDescriptor(prototype, key).get.call(navigationEntry);
|
||||
return JSON.stringify({
|
||||
identity: ['name', 'entryType', 'startTime'].every(key =>
|
||||
identity: ['id', 'navigationId'].every(key => typeof json[key] === 'number')
|
||||
&& ['name', 'entryType', 'startTime', 'id', 'navigationId'].every(key =>
|
||||
json[key] === initialNavigationSnapshot[key]
|
||||
&& base[key] === json[key] && resource[key] === json[key]
|
||||
&& read(PerformanceEntry.prototype, key) === json[key]),
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
'fetchStart', 'domainLookupStart', 'domainLookupEnd', 'connectStart', 'connectEnd', 'secureConnectionStart',
|
||||
'requestStart', 'responseStart', 'responseEnd', 'transferSize', 'encodedBodySize', 'decodedBodySize',
|
||||
'renderBlockingStatus', 'responseStatus'];
|
||||
// contentType is covered by the Rust regression; the reference browser
|
||||
// does not expose it yet.
|
||||
// contentType and the new entry identity fields are covered by the Rust
|
||||
// regression: the Chromium reference does not expose them yet.
|
||||
const navigationNames = ['unloadEventStart', 'unloadEventEnd', 'domInteractive', 'domContentLoadedEventStart',
|
||||
'domContentLoadedEventEnd', 'domComplete', 'loadEventStart', 'loadEventEnd', 'type', 'redirectCount'];
|
||||
const allNames = [...baseNames, ...resourceNames, ...navigationNames];
|
||||
|
||||
Reference in New Issue
Block a user