-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
shell: Remove workaround for Chrome crash #21074
base: main
Are you sure you want to change the base?
shell: Remove workaround for Chrome crash #21074
Conversation
And rewrite much of the state handling to make it easier to understand. Specifically, the old Index and MachineIndex classes and their complicated interactions have been replaced with a hopefully much more straightforward ShellState class. However, the existing React components such as CockpitHosts and TopNav have not been significantly touched. The API for launching the HostModal dialogs has been changed to make it more suitable for a later rewrite with Dialogs.run() ala pkg/lib/cockpit-connect-ssh.
Something unknown has changed during the rewrite of the shell and the crash isn't triggered anymore. Was it ever real? Or was it just a dream?
5e94aa4
to
0ae6019
Compare
frame: f, | ||
active, | ||
selected: active, | ||
displayName: f.host === "localhost" ? "/" + f.path : f.host + ":/" + f.path, |
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.
This added line is not executed by any test.
if (machine.restarting) { | ||
title = _("The machine is rebooting"); | ||
message = ""; | ||
} else if (connecting) { |
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.
These 4 added lines are not executed by any test.
if (frame.ready && iframe.getAttribute("data-ready") == null) | ||
iframe.setAttribute("data-ready", "1"); | ||
else if (!frame.ready && iframe.getAttribute("data-ready")) | ||
iframe.removeAttribute("data-ready"); |
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.
This added line is not executed by any test.
if (frame.loaded && iframe.getAttribute("data-loaded") == null) | ||
iframe.setAttribute("data-loaded", "1"); | ||
else if (!frame.loaded && iframe.getAttribute("data-loaded")) | ||
iframe.removeAttribute("data-loaded"); |
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.
This added line is not executed by any test.
style === "auto") || | ||
style === "dark") { |
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.
These 2 added lines are not executed by any test.
self.search = function(prop, value) { | ||
for (const x in self.items) { | ||
if (self.items[x][prop] === value) | ||
return self.items[x]; |
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.
These 4 added lines are not executed by any test.
function component_checksum(machine, path) { | ||
const parts = path.split("/"); | ||
const pkg = parts[0]; | ||
if (machine.manifests && machine.manifests[pkg] && machine.manifests[pkg][".checksum"]) | ||
return "$" + machine.manifests[pkg][".checksum"]; |
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.
These 5 added lines are not executed by any test.
export function compute_frame_url(machine, path) { | ||
let base, checksum; | ||
if (machine.manifests && machine.manifests[".checksum"]) | ||
checksum = "$" + machine.manifests[".checksum"]; |
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.
This added line is not executed by any test.
if (checksum && checksum == component_checksum(machine, path)) { | ||
if (machine.connection_string === "localhost") | ||
base = ".."; |
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.
These 3 added lines are not executed by any test.
if (machine.connection_string === "localhost") | ||
base = ".."; | ||
else | ||
base = "../../" + checksum; |
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.
This added line is not executed by any test.
Something unknown has changed during the rewrite of the shell and the
crash isn't triggered anymore. Was it ever real? Or was it just a
dream?
This could be part of #21012 if it turns out be robust.