Forgot to initialize the arg to false, and th js code needs to finsih PP in the catch if an error is passed back.

Bug 157129 r=carlen sr=waterson a=asa
This commit is contained in:
rods%netscape.com 2002-07-15 11:44:42 +00:00
parent b4cbaefe10
commit 2c95359558
3 changed files with 8 additions and 2 deletions

View File

@ -76,7 +76,6 @@ NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindowInternal *parent,
nsIObserver *openDialogObserver,
PRBool *notifyOnOpen)
{
*notifyOnOpen = PR_TRUE;
m_observer = openDialogObserver;
nsresult rv = NS_ERROR_FAILURE;
@ -111,6 +110,9 @@ NS_IMETHODIMP nsPrintProgress::OpenProgressDialog(nsIDOMWindowInternal *parent,
NS_LITERAL_STRING("_blank"),
NS_LITERAL_STRING("chrome,titlebar,dependent,centerscreen"),
array, getter_AddRefs(newWindow));
if (NS_SUCCEEDED(rv)) {
*notifyOnOpen = PR_TRUE;
}
}
return rv;

View File

@ -278,6 +278,8 @@ nsPrintingPromptService::ShowProgress(nsIDOMWindow* parent,
NS_ENSURE_ARG(printProgressParams);
NS_ENSURE_ARG(notifyOnOpen);
*notifyOnOpen = PR_FALSE;
// If running on OS X, the printing manager displays a nice progress dialog
// so we don't need to do this. Keeping this code here in order to support
// running TARGET_CARBON builds on OS 9.

View File

@ -267,7 +267,9 @@ function BrowserPrintPreview()
if (!notifyOnOpen.value.valueOf() || gWebProgress.value == null) {
FinishPrintPreview();
}
} catch (e) {}
} catch (e) {
FinishPrintPreview();
}
}
}