Skip to content

Commit 94e8beb

Browse files
paulirishDevtools-frontend LUCI CQ
authored andcommitted
RPP: Launch portable trace popup immediately without query params
The popup launch was delayed for unknown reasons [0] and removing this delay appears to improve likelihood that the postMessage communication is successful. [0]: https://crrev.com/c/5837910/comment/637fd530_8b55ad4e/ Bug: 444526423 Change-Id: I7dd422e5e97e39d7ae32ae131fba0c77801d746f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6940957 Commit-Queue: Connor Clark <cjamcl@chromium.org> Auto-Submit: Paul Irish <paulirish@chromium.org> Reviewed-by: Connor Clark <cjamcl@chromium.org>
1 parent c820ae1 commit 94e8beb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

front_end/core/sdk/RehydratingConnection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export class RehydratingConnection implements ProtocolClient.InspectorBackend.Co
8383
this.#rehydratingWindow.addEventListener('message', this.#onReceiveHostWindowPayloadBound);
8484
if (!this.#rehydratingWindow.opener) {
8585
this.#onConnectionLost(i18nString(UIStrings.noHostWindow));
86+
return;
8687
}
8788
this.#rehydratingWindow.opener.postMessage({type: 'REHYDRATING_WINDOW_READY'});
8889
}

front_end/panels/timeline/TimelinePanel.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,9 +1608,7 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
16081608

16091609
const content = await Common.Gzip.fileToString(file);
16101610
if (content.includes('enhancedTraceVersion')) {
1611-
await window.scheduler.postTask(() => {
1612-
this.#launchRehydratedSession(content);
1613-
}, {priority: 'background'});
1611+
this.#launchRehydratedSession(content);
16141612
} else {
16151613
this.loader = TimelineLoader.loadFromParsedJsonFile(JSON.parse(content), this);
16161614
this.prepareToLoadTimeline();
@@ -1624,6 +1622,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
16241622
const url = new URL(window.location.href);
16251623
const pathToEntrypoint = url.pathname.slice(0, url.pathname.lastIndexOf('/'));
16261624
url.pathname = `${pathToEntrypoint}/rehydrated_devtools_app.html`;
1625+
// The standalone devtools shouldn't retain any existing query params.
1626+
url.search = '';
16271627
pathToLaunch = url.toString();
16281628

16291629
// Clarifying the window the code is referring to

0 commit comments

Comments
 (0)