Repository navigation
fix(browser): Check for clock drift on page lifecycle events #25091
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,8 +162,17 @@ export class BrowserClient extends Client<BrowserClientOptions> { | |
| }); | ||
| } | ||
| }); | ||
|
|
||
| // `freeze` and `resume` are only fired by Chromium browsers. Other browsers never fire them, so these listeners | ||
| // are no-ops there. | ||
| WINDOW.document.addEventListener('freeze', () => timestampInSeconds()); | ||
| WINDOW.document.addEventListener('resume', () => timestampInSeconds()); | ||
| } | ||
|
|
||
| // Pages restored from the back/forward cache were paused while they were cached. | ||
| WINDOW.addEventListener?.('pagehide', () => timestampInSeconds()); | ||
| WINDOW.addEventListener?.('pageshow', () => timestampInSeconds()); | ||
|
|
||
| if (userInfo) { | ||
| this.on('beforeSendSession', addAutoIpAddressToSession); | ||
| } | ||
|
Comment on lines
170
to
178
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: New event listeners for Suggested FixImplement a cleanup mechanism in the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. l: Should be easy to cleanup, no? |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.