-
Notifications
You must be signed in to change notification settings - Fork 9
Enterprise: Handle browser crash #291
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
base: enterprise-main
Are you sure you want to change the base?
Conversation
6f4ba5c to
343de12
Compare
| ); | ||
| if (this.abnormalExitCounter < this.abnormalExitLimit) { | ||
| // Cookies would be out of private browsing anyway at that point. | ||
| // TODO: Assume they have not expired and just restart things or |
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.
I don't see why we care about them being valid at this particular point compared to anywhere else.
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.
I was thinking of the case where we would handle a crash after long running period, but maybe we should just try to refresh token there and handle it this way ?
| Services.cpmm.sendAsyncMessage( | ||
| "FeltParent:FirefoxAbnormalExit", | ||
| {} | ||
| this.abnormalExitCounter += 1; |
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.
We don't ever seem to reset this. I think it makes sense to consider the last crash timing. If we crash say twice in 2 weeks (and Felt isn't restarted), it's probably not worth escalating. However if we crash twice immediately in succession, that's another matter.
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.
Good point, I'll change it
| this._win = Services.ww.openWindow( | ||
| null, | ||
| "chrome://felt/content/felt.xhtml", | ||
| `chrome://felt/content/felt.xhtml${queryString}`, |
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.
Needs encodeURIComponent
| }); | ||
|
|
||
| if (window.location.search) { | ||
| const params = Array.from(new URL(window.location).searchParams); |
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.
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/get
const errorClass = new URLSearchParams(window.location.search).get("error");
UX is open to discussion.