Skip to content

Commit

Permalink
🐛 Fix errors when unloading the browser
Browse files Browse the repository at this point in the history
  • Loading branch information
kierandrewett committed Mar 17, 2024
1 parent 7e1105a commit ac268f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion actors/DotTooltipListenerChild.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class DotTooltipListenerChild extends JSWindowActorChild {
// Check if we're in an active chrome window
if (
!doc ||
doc.ownerGlobal.browsingContext.isContent ||
doc?.ownerGlobal.browsingContext.isContent ||
Services.focus.focusedWindow != win.top
) {
return;
Expand Down
6 changes: 5 additions & 1 deletion components/status/content/browser-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,17 @@ class BrowserStatusPanel extends BrowserContextualMixin(MozHTMLElement) {
* Obtains the current status value
*/
getStatus() {
// Check if we have a contextual tab or browser
// before computing the status text.
if (!this.hostContext.tab || !this.hostContext.browser) return;

for (const statusType of this.STATUS_HIERARCHY) {
// Special case for busy statuses:
// Ensure the document is actually loading,
// otherwise we just skip it.
if (
statusType == "busy" &&
!this.hostContext.browser.webProgress.isLoadingDocument
!this.hostContext.browser.webProgress?.isLoadingDocument
) {
continue;
}
Expand Down

0 comments on commit ac268f6

Please sign in to comment.