lighthouse 10.0.2-dev.20230315 → 10.0.2-dev.20230316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -506,14 +506,22 @@ class TraceProcessor {
|
|
|
506
506
|
const pidToTid = new Map();
|
|
507
507
|
|
|
508
508
|
for (const pid of new Set(mainFramePids)) {
|
|
509
|
-
|
|
510
|
-
const threadNameEvt = keyEvents.find(e =>
|
|
509
|
+
const threadEvents = keyEvents.filter(e =>
|
|
511
510
|
e.cat === '__metadata' &&
|
|
512
511
|
e.pid === pid &&
|
|
513
512
|
e.ph === 'M' &&
|
|
514
|
-
e.name === 'thread_name'
|
|
515
|
-
e.args.name === 'CrRendererMain'
|
|
513
|
+
e.name === 'thread_name'
|
|
516
514
|
);
|
|
515
|
+
|
|
516
|
+
// While renderer tids are generally predictable, we'll doublecheck it
|
|
517
|
+
let threadNameEvt = threadEvents.find(e => e.args.name === 'CrRendererMain');
|
|
518
|
+
|
|
519
|
+
// `CrRendererMain` can be missing if chrome is launched with the `--single-process` flag.
|
|
520
|
+
// In this case, page tasks will be run in the browser thread.
|
|
521
|
+
if (!threadNameEvt) {
|
|
522
|
+
threadNameEvt = threadEvents.find(e => e.args.name === 'CrBrowserMain');
|
|
523
|
+
}
|
|
524
|
+
|
|
517
525
|
const tid = threadNameEvt?.tid;
|
|
518
526
|
|
|
519
527
|
if (!tid) {
|
package/package.json
CHANGED