Closed
Bug 1604071
Opened 6 years ago
Closed 6 years ago
Dead assignment in nsPrintDialogServiceGTK::Show
Categories
(Core :: Printing: Setup, enhancement)
Core
Printing: Setup
Tracking
()
RESOLVED
FIXED
mozilla73
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: alexhenrie24, Assigned: alexhenrie24)
Details
Attachments
(1 file)
nsPrintDialogServiceGTK::Show currently looks like this:
nsresult rv = fpPrintPortal->PreparePrintRequest(gtkParent);
NS_ENSURE_SUCCESS(rv, rv);
// This blocks until nsFlatpakPrintPortal::FinishPrintDialog is called
GtkPrintOperationResult printDialogResult = fpPrintPortal->GetResult();
rv = NS_OK;
switch (printDialogResult) {
case GTK_PRINT_OPERATION_RESULT_APPLY: {
nsCOMPtr<nsIObserverService> os =
mozilla::services::GetObserverService();
NS_ENSURE_STATE(os);
// Observer waits until notified that the file with the content
// to print has been written.
rv = os->AddObserver(fpPrintPortal, "print-to-file-finished", false);
NS_ENSURE_SUCCESS(rv, rv);
break;
}
case GTK_PRINT_OPERATION_RESULT_CANCEL:
rv = NS_ERROR_ABORT;
break;
default:
NS_WARNING("Unexpected response");
rv = NS_ERROR_ABORT;
}
return rv;
Setting rv to the constant NS_OK is pointless because rv was already set just before that and will be set again in the switch statement that immediately follows.
Assignee | ||
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Assignee: nobody → alexhenrie24
Status: NEW → ASSIGNED
Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6946b0325267
Remove dead assignment from nsPrintDialogServiceGTK::Show. r=stransky
Comment 3•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox73:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
Updated•5 years ago
|
Type: defect → enhancement
You need to log in
before you can comment on or make changes to this bug.
Description
•