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

Issue 10021067: Merge 132283 - Fix a crash if GetPrinterCapsAndDefaults returns after the calling printer is delete… (Closed)

Created:
8 years, 8 months ago by Albert Bodenhamer
Modified:
8 years, 8 months ago
Reviewers:
Albert Bodenhamer
CC:
chromium-reviews
Visibility:
Public.

Description

Merge 132283 - Fix a crash if GetPrinterCapsAndDefaults returns after the calling printer is deleted. There was a crash when disconnecting from a machine via Windows RDP. RDP injects client machine printers into the host machine. GetPrinterCapsAndDefaults blocks on these printers. When the user disconnects, the printer is deleted and then GetPrinterCapsAndDefaults returns. The failure handler fires and attempts to access the now-freed PrinterJobHandler that was passed with the callback resulting in a crash. The solution is to pass a WeakPtr to the callback so that if the PrinterJobHandler is destroyed the callback wont fire. BUG=122996 TEST=Verify bug. Review URL: http://codereview.chromium.org/10079017 TBR=abodenha@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=132832

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -3 lines) Patch
M chrome/service/cloud_print/printer_job_handler.h View 3 chunks +3 lines, -1 line 0 comments Download
M chrome/service/cloud_print/printer_job_handler.cc View 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Albert Bodenhamer
8 years, 8 months ago (2012-04-18 18:47:55 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698