-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
core(driver): attach to worker targets #14212
Conversation
These are two disparate changes, can you split this off? |
Split out #14217 |
This comment was marked as resolved.
This comment was marked as resolved.
const target = await newSession.sendCommand('Target.getTargetInfo').catch(() => null); | ||
const targetType = target?.targetInfo?.type; | ||
const hasValidTargetType = targetType === 'page' || targetType === 'iframe'; | ||
const {targetInfo} = await newSession.sendCommand('Target.getTargetInfo'); |
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.
Before M110 this command would throw an error on worker targets. With this patch we would require a Chrome version >=M110 which is the current stable.
Resuming a worker that is not waiting on the debugger will resume the worker even if there is another worker session still waiting on the debugger. This CL is a workaround to prevent DevTools from prematurely resuming worker targets. This was causing issues for Lighthouse listening to network requests: GoogleChrome/lighthouse#14212 Bug: 1423096 Change-Id: I757f4fd3ee0969ea33e1acc95e1190c99146a023 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4326967 Commit-Queue: Adam Raine <asraine@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Reviewed-by: Simon Zünd <szuend@chromium.org>
243088e
to
a7c76d7
Compare
@@ -65,7 +65,7 @@ class ScriptElements extends BaseGatherer { | |||
|
|||
const scriptRecords = networkRecords | |||
.filter(record => record.resourceType === NetworkRequest.TYPES.Script) | |||
.filter(record => !record.isOutOfProcessIframe); | |||
.filter(record => record.sessionTargetType === 'page'); |
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.
There are several places isOutOfProcessIframe
is used where it could make more sense to use a sessionTargetType === 'page'
now that we have worker requests as well. This is just the only place that caused a test failure.
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.
Update: I changed the other usages of isOutOfProcessIframe
too. We don't use isOutOfProcessIframe
anywhere now.
Closes #14211
Worker requests will appear in
network-requests
andtotal-byte-weight
but are excluded from the page dependency graph used for lantern simulation.