Bug 1662938: Notify RemotePrintJobParent's listeners of the error when we fail to initialize the print. r=jwatt

Differential Revision: https://phabricator.services.mozilla.com/D89490
This commit is contained in:
Bob Owen 2020-09-08 20:50:02 +00:00
Родитель c0b3b8be6a
Коммит 1cd21daff6
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -37,6 +37,8 @@ mozilla::ipc::IPCResult RemotePrintJobParent::RecvInitializePrint(
InitializePrintDevice(aDocumentTitle, aPrintToFile, aStartPage, aEndPage);
if (NS_FAILED(rv)) {
Unused << SendPrintInitializationResult(rv, FileDescriptor());
// Let any listeners know about the failure before we delete.
Unused << RecvStatusChange(rv);
Unused << Send__delete__(this);
return IPC_OK();
}
@ -46,6 +48,8 @@ mozilla::ipc::IPCResult RemotePrintJobParent::RecvInitializePrint(
rv = PrepareNextPageFD(&fd);
if (NS_FAILED(rv)) {
Unused << SendPrintInitializationResult(rv, FileDescriptor());
// Let any listeners know about the failure before we delete.
Unused << RecvStatusChange(rv);
Unused << Send__delete__(this);
return IPC_OK();
}