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

Issue 1343873002: Check for CloseHandle failures even when not debugging (Closed)

Created:
5 years, 3 months ago by brucedawson
Modified:
5 years, 3 months ago
CC:
chromium-reviews, scottmg
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Check for CloseHandle failures even when not debugging Bug 524267 was a handle closing failure that only showed up when running renderer processes under a debugger at startup, so it was not discovered for a while. This change checks for handle closing failures always so that subsequent bugs of this type will be detected immediately. A DCHECK is used rather than a CHECK because this checks all in-process calls to CloseHandle and will therefore trigger on any buggy third-party DLL injections and we don't want that happening on customer machines. Checking at individual call sites would necessarily give only partial coverage because there are hundreds of CloseHandle call sites. R=grt@chromium.org BUG=524267

Patch Set 1 #

Total comments: 2

Patch Set 2 : DPCHECK instead of DCHECK #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M chrome/app/close_handle_hook_win.cc View 1 1 chunk +7 lines, -1 line 1 comment Download

Messages

Total messages: 11 (1 generated)
brucedawson
Whadya think? I think that with this change we can mark the bug as fixed.
5 years, 3 months ago (2015-09-14 21:45:36 UTC) #1
brucedawson
I noticed a Chrome shutdown crash captured by WER in urlmon!CRegZone::CRegZoneCache::~CRegZoneCache where it calls CloseHandle. ...
5 years, 3 months ago (2015-09-15 00:17:27 UTC) #2
brucedawson
Update: That urlmon shutdown crash was from before I added the NULL check to the ...
5 years, 3 months ago (2015-09-15 00:23:04 UTC) #3
grt (UTC plus 2)
This LGTM since it's a DCHECK, but I'd like rvargas to have a chance to ...
5 years, 3 months ago (2015-09-15 14:08:07 UTC) #5
brucedawson
https://codereview.chromium.org/1343873002/diff/1/chrome/app/close_handle_hook_win.cc File chrome/app/close_handle_hook_win.cc (right): https://codereview.chromium.org/1343873002/diff/1/chrome/app/close_handle_hook_win.cc#newcode45 chrome/app/close_handle_hook_win.cc:45: DCHECK(result || handle == NULL || handle == INVALID_HANDLE_VALUE); ...
5 years, 3 months ago (2015-09-15 16:49:27 UTC) #6
rvargas (doing something else)
https://codereview.chromium.org/1343873002/diff/20001/chrome/app/close_handle_hook_win.cc File chrome/app/close_handle_hook_win.cc (right): https://codereview.chromium.org/1343873002/diff/20001/chrome/app/close_handle_hook_win.cc#newcode45 chrome/app/close_handle_hook_win.cc:45: DPCHECK(result || handle == NULL || handle == INVALID_HANDLE_VALUE); ...
5 years, 3 months ago (2015-09-15 18:08:04 UTC) #7
brucedawson
urlmon.dll is Microsoft's code so we can't fix it. There is also room for disagreement ...
5 years, 3 months ago (2015-09-15 18:33:27 UTC) #8
rvargas (doing something else)
On 2015/09/15 18:33:27, brucedawson wrote: > urlmon.dll is Microsoft's code so we can't fix it. ...
5 years, 3 months ago (2015-09-15 19:21:20 UTC) #9
brucedawson
Okay, sounds reasonable. I'll put together a CL to check some of our explicit CloseHandle ...
5 years, 3 months ago (2015-09-15 20:56:48 UTC) #10
brucedawson
5 years, 3 months ago (2015-09-17 04:33:46 UTC) #11
This was replaced by https://codereview.chromium.org/1350493002.
I'm closing this CL now.

Powered by Google App Engine
This is Rietveld 408576698