| Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
|
| diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
|
| index d6a1da05ad2c6cb996ae5e893fce7dab52190d32..a66528581508d6e30f9f33cfaeee7f28d38144d3 100644
|
| --- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
|
| +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
|
| @@ -1187,10 +1187,11 @@ bool PluginInstance::PrintPDFOutput(PP_Resource print_output,
|
| if (metafile)
|
| ret = metafile->InitFromData(buffer->mapped_buffer(), buffer->size());
|
| #elif defined(OS_MACOSX)
|
| - scoped_ptr<printing::NativeMetafile> metafile(
|
| - printing::NativeMetafileFactory::Create());
|
| // Create a PDF metafile and render from there into the passed in context.
|
| - if (metafile->InitFromData(buffer->mapped_buffer(), buffer->size())) {
|
| + scoped_ptr<printing::NativeMetafile> metafile(
|
| + printing::NativeMetafileFactory::CreateFromData(buffer->mapped_buffer(),
|
| + buffer->size()));
|
| + if (metafile.get() != NULL) {
|
| // Flip the transform.
|
| CGContextSaveGState(canvas);
|
| CGContextTranslateCTM(canvas, 0,
|
|
|