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

Issue 10079017: Fix a crash of GetPrinterCapsAndDefaults returns after the calling printer is deleted. (Closed)

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

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=132283

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -2 lines) Patch
M chrome/service/cloud_print/printer_job_handler.h View 2 chunks +2 lines, -0 lines 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: 4 (0 generated)
Albert Bodenhamer
8 years, 8 months ago (2012-04-13 20:52:32 UTC) #1
gene
lgtm
8 years, 8 months ago (2012-04-13 21:02:50 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/abodenha@chromium.org/10079017/1
8 years, 8 months ago (2012-04-13 21:07:25 UTC) #3
commit-bot: I haz the power
8 years, 8 months ago (2012-04-13 22:35:11 UTC) #4
Change committed as 132283

Powered by Google App Engine
This is Rietveld 408576698