Bug 1152921 - Always initialize platform-specific booleans in PrintData before sending over IPC. r=mconley

This fixes the crash in Linux debug builds bringing up the print dialog,
though there's still a crash when closing it.
This commit is contained in:
L. David Baron 2015-04-16 19:27:01 -07:00
parent aa594422c8
commit 3fe01f7f67

View File

@ -223,6 +223,18 @@ nsPrintOptions::SerializeToPrintData(nsIPrintSettings* aSettings,
aSettings->GetIsInitializedFromPrefs(&data->isInitializedFromPrefs());
aSettings->GetPersistMarginBoxSettings(&data->persistMarginBoxSettings());
// Initialize the platform-specific values that don't
// default-initialize, so that we don't send uninitialized data over
// IPC (which leads to valgrind warnings, and, for bools, fatal
// assertions).
// data->driverName() default-initializes
// data->deviceName() default-initializes
data->isFramesetDocument() = false;
data->isFramesetFrameSelected() = false;
data->isIFrameSelected() = false;
data->isRangeSelection() = false;
// data->GTKPrintSettings() default-initializes
return NS_OK;
}