Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Issue 6037019: Fixed a crash with some HP printer drivers (when invoking PTGetPrintCapabilit... (Closed)

Created:
9 years, 11 months ago by sanjeevr
Modified:
9 years, 7 months ago
Reviewers:
ananta
CC:
chromium-reviews
Visibility:
Public.

Description

Fixed a crash with some HP printer drivers (when invoking PTGetPrintCapabilities on them). Detailed story: Calls to XPS APIs typically require the XPS provider to be opened with PTOpenProvider. PTOpenProvider calls CoInitializeEx with COINIT_MULTITHREADED. We have seen certain buggy HP printer driver DLLs that call CoInitializeEx with COINIT_APARTMENTTHREADED in the context of PTGetPrintCapabilities. This call fails but the printer driver calls CoUninitialize anyway. This results in the apartment being torn down too early and the msxml DLL being unloaded which in turn causes code in unidrvui.dll to have a dangling pointer to an XML document which causes a crash. To protect ourselves from such drivers we make sure we always have an extra CoInitialize (calls to CoInitialize/CoUninitialize are refcounted). BUG=None TEST=Test Cloud Print Proxy on Windows with HP Photosmart 7960 series printers. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=70754

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -3 lines) Patch
M chrome/service/cloud_print/print_system_win.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M printing/backend/print_backend_win.cc View 1 chunk +2 lines, -1 line 0 comments Download
M printing/backend/win_helper.h View 1 chunk +12 lines, -0 lines 0 comments Download
M printing/backend/win_helper.cc View 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
sanjeevr
9 years, 11 months ago (2011-01-07 04:41:34 UTC) #1
ananta
9 years, 11 months ago (2011-01-07 04:52:28 UTC) #2
LGTM

Powered by Google App Engine
This is Rietveld 408576698