Skip to content

core: use performance.now in isolation #14685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 20, 2023
Merged

Conversation

adamraine
Copy link
Member

Fixes #14303
Related #14003

@adamraine adamraine requested a review from a team as a code owner January 17, 2023 19:47
@adamraine adamraine requested review from brendankenny and removed request for a team January 17, 2023 19:47
@@ -260,7 +261,7 @@ function waitForCPUIdle(session, waitForCPUQuiet) {
const executionContext = new ExecutionContext(session);
/** @type {Promise<void>} */
const promise = new Promise((resolve, reject) => {
executionContext.evaluate(registerPerformanceObserverInPage, {args: []})
executionContext.evaluate(registerPerformanceObserverInPage, {args: [], useIsolation: true})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! I don't have any intuition for PerformanceObserver behavior in an isolated context. What happens?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my testing, it works the same. We still get the longtask events.

@adamraine adamraine merged commit c4910fd into main Jan 20, 2023
@adamraine adamraine deleted the performance-now-isolation branch January 20, 2023 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting error "The page did not paint any content" but working on page load outside of lighthouse
4 participants