private void ForceDocumentCompleted()
{
Cleanup();
while (_pending.Count > 0)
{
var task = _pending[0];
_pending.RemoveAt(0);
// If the file doesn't exist, calling _current.Browser.Navigate() results in the program
// silently stopping on Linux. This should never happen with the check made above for
// superceded navigation requests before posting a pending navigation, but a race could
// occur between the old file being deleted, the next pending request being handled, and
// the new file being sent as a navigation requesting. So we have this check as a backstop.
// (I always believe in both belts and suspenders, don't you?) This is part of the fix
// for https://jira.sil.org/browse/BL-863.
if (!task.Url.StartsWith("http://") && !RobustFile.Exists(task.Url))
{
Debug.Assert(false, String.Format(@"DEBUG: NavigationIsolator.ForceDocumentCompleted(): new file to display (""{0}"") does not exist!??", task.Url));
continue;
}
StartTask(task);
return;
}
}