Commit 4e5ec621 authored by thestig@chromium.org's avatar thestig@chromium.org

ppapi: Work around a compiler bug where the PPP_Printing_Dev struct is not zeroed out.

BUG=83761
TEST=Print preview always work on Mac

Review URL: http://codereview.chromium.org/7031044

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86676 0039d316-1c4b-4281-b951-d872f2087c98
parent 09e56ec4
......@@ -427,8 +427,12 @@ class PluginInstance : public base::RefCounted<PluginInstance> {
PPP_Printing_Dev_Combined(const PPP_Printing_Dev_0_3& old_if)
: PPP_Printing_Dev(), // NOTE: The parens are important, to zero-
// initialize the struct.
// Except older version of g++ doesn't!
// So do it explicitly in the ctor.
QuerySupportedFormats_0_3(old_if.QuerySupportedFormats),
Begin_0_3(old_if.Begin) {
QuerySupportedFormats = NULL;
Begin = NULL;
PrintPages = old_if.PrintPages;
End = old_if.End;
}
......@@ -439,7 +443,6 @@ class PluginInstance : public base::RefCounted<PluginInstance> {
// The 0.3 version of 'Begin'.
int32_t (*Begin_0_3)(PP_Instance instance,
const struct PP_PrintSettings_Dev_0_3* print_settings);
};
scoped_ptr<PPP_Printing_Dev_Combined> plugin_print_interface_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment