Handle renderer process not starting at all

This commit is contained in:
Florian Bruhin 2017-02-13 11:23:29 +01:00
parent 2b76cca2b2
commit 3de2bfb277
3 changed files with 6 additions and 1 deletions

View File

@ -78,7 +78,8 @@ TerminationStatus = usertypes.enum('TerminationStatus', [
'normal',
'abnormal', # non-zero exit status
'crashed', # e.g. segfault
'killed'
'killed',
'unknown',
])

View File

@ -693,6 +693,8 @@ class WebEngineTab(browsertab.AbstractTab):
browsertab.TerminationStatus.crashed,
QWebEnginePage.KilledTerminationStatus:
browsertab.TerminationStatus.killed,
-1:
browsertab.TerminationStatus.unknown,
}
self.renderer_process_terminated.emit(status_map[status], exitcode)

View File

@ -677,6 +677,8 @@ class TabbedBrowser(tabwidget.TabWidget):
message.error("Renderer process crashed")
elif status == browsertab.TerminationStatus.killed:
message.error("Renderer process was killed")
elif status == browsertab.TerminationStatus.unknown:
message.error("Renderer process did not start")
else:
raise ValueError("Invalid status {}".format(status))