reload: Catch exceptions aborting pending AJAX requests.

It's probably a bug that this throws exceptions sometimes, but it's
not consistently reproducible (or maybe, browser dependent?), and it
isn't really a problem to fail to abort some requests as part of the
page reload process; the abort was just there to make sure as little
as possible is happening so we can garbage-collect effectively.
This commit is contained in:
Tim Abbott
2017-01-17 17:09:27 -08:00
parent e7c9a5087c
commit c082564c66

View File

@@ -145,7 +145,12 @@ function cleanup_before_reload() {
$('*').off(); $('*').off();
// Abort all pending ajax requests` // Abort all pending ajax requests`
try {
channel.abort_all(); channel.abort_all();
} catch (ex) {
// This seems to throw exceptions for no apparent reason sometimes
blueslip.debug("Error aborting XHR requests on reload; ignoring");
}
// Free all the DOM in the main_div // Free all the DOM in the main_div
$("#main_div").empty(); $("#main_div").empty();