-
Notifications
You must be signed in to change notification settings - Fork 9.6k
core(fr): minor renames… cdpSession, defaultSession, requestfinished #14097
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
Conversation
| class ProtocolSession { | ||
| /** | ||
| * @param {LH.Puppeteer.CDPSession} session | ||
| * @param {LH.Puppeteer.CDPSession} cdpSession |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe pptrSession?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be on board with pptrSession if this was external facing, but constructing these should (hopefully) always be internal. I'm +1 to cdpSession to match the class name in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I'm happy with both. Let's change it in the future if we keep referring to it as the pptr session.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
driver feels like there was a plan with _session and defaultSession, but I'm not sure what it could be, and it'll benefit the most from when legacy can be deleted, so LGTM to keep it simple in the meanwhile. Big fan of the cdpSession rename :)
| class ProtocolSession { | ||
| /** | ||
| * @param {LH.Puppeteer.CDPSession} session | ||
| * @param {LH.Puppeteer.CDPSession} cdpSession |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be on board with pptrSession if this was external facing, but constructing these should (hopefully) always be internal. I'm +1 to cdpSession to match the class name in that case.
Co-authored-by: Brendan Kenny <[email protected]>
I think the plan had something to do with creating multiple sessions, but yeah I'm fine with removing the weird |
|
(tag removed just because tests failing / I merged some PRs touching same files) |
requestloadedbut it fires from all thefinishedhandlers.. (also from the loadingfailed) path. so i'm renaming itrequestfinishedto be more accuratethis._sessionis that pptr instance but in everywhere else its ourFRProtocolSession, so this just clarifies that._sessionAND_defaultSession. I can't really tell why the duplicated_sessionhas existed, but it doesnt need to.none of these should change behavior in any way
the motivation here is improved understandability for #14093 and #14078. i think the wins here are worth the minor churn