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

Issue 75133004: Close duplicated handle on windows. (Closed)

Created:
7 years, 1 month ago by dsinclair
Modified:
6 years, 11 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

Close duplicated handle on windows. When setting up the ThreadIdNameManager we need to make a duplicate of the thread handle on Windows. That handle is currently be leaked as pointed out by Dr.Memory. This CL closes the handle after the ThreadIdNameManager has removed the relevant entry. BUG=315203 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243330

Patch Set 1 : #

Total comments: 4

Patch Set 2 : #

Total comments: 9

Patch Set 3 : Rebase to master #

Patch Set 4 : #

Patch Set 5 : Rebase to master. #

Total comments: 4

Patch Set 6 : #

Total comments: 4

Patch Set 7 : Rebase to master #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -18 lines) Patch
M base/threading/platform_thread_win.cc View 1 2 3 4 5 6 7 8 2 chunks +25 lines, -18 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
dsinclair
jam, zhaoqin, PTAL. I'm still trying to figure out if the telemetry failures are flakes, ...
7 years ago (2013-11-26 19:53:49 UTC) #1
zhaoqin
It seems DuplicateHandle is redundant. You only need use it if you want to close ...
7 years ago (2013-11-26 20:35:56 UTC) #2
jam
I'm not an owner in base, I suggest brettw
7 years ago (2013-11-27 00:21:04 UTC) #3
dsinclair
https://codereview.chromium.org/75133004/diff/190001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/190001/base/threading/platform_thread_win.cc#newcode85 base/threading/platform_thread_win.cc:85: NULL, On 2013/11/26 20:35:56, zhaoqin wrote: > This NULL ...
7 years ago (2013-11-28 15:51:14 UTC) #4
zhaoqin
I am not sure if this is the right place to call close_handle. I would ...
7 years ago (2013-11-28 16:07:33 UTC) #5
dsinclair
https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc#newcode80 base/threading/platform_thread_win.cc:80: CloseHandle(platform_handle); On 2013/11/28 16:07:33, zhaoqin wrote: > Actually I ...
7 years ago (2013-11-28 16:13:40 UTC) #6
zhaoqin
should CloseHandle be called in ThreadIdNameManager::RemoveName https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc#newcode80 base/threading/platform_thread_win.cc:80: CloseHandle(platform_handle); On 2013/11/28 ...
7 years ago (2013-11-28 16:25:40 UTC) #7
dsinclair
https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc#newcode80 base/threading/platform_thread_win.cc:80: CloseHandle(platform_handle); On 2013/11/28 16:25:41, zhaoqin wrote: > On 2013/11/28 ...
7 years ago (2013-11-28 16:31:06 UTC) #8
zhaoqin
> I don't think so, ThreadIdNameManager doesn't know the handle should be closed. > It ...
7 years ago (2013-11-28 17:24:16 UTC) #9
zhaoqin
> I don't think so, ThreadIdNameManager doesn't know the handle should be closed. > It ...
7 years ago (2013-11-28 17:24:17 UTC) #10
dsinclair
jar, PTAL for base OWNERS.
7 years ago (2013-11-28 17:37:49 UTC) #11
jar (doing other things)
This is pretty Windows specific, so I'd like Ricardo's LGTM as well. This does look ...
7 years ago (2013-11-28 19:01:22 UTC) #12
zhaoqin
On 2013/11/28 19:01:22, jar wrote: > This is pretty Windows specific, so I'd like Ricardo's ...
7 years ago (2013-11-28 19:06:59 UTC) #13
rvargas (doing something else)
https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc#newcode58 base/threading/platform_thread_win.cc:58: * thread name mapping. */ Use c++ style comments ...
7 years ago (2013-12-02 20:19:36 UTC) #14
dsinclair
https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/230001/base/threading/platform_thread_win.cc#newcode58 base/threading/platform_thread_win.cc:58: * thread name mapping. */ On 2013/12/02 20:19:37, rvargas ...
7 years ago (2013-12-10 21:08:19 UTC) #15
jar (doing other things)
I opted out of base reviewing... so you'll need to get a current owner.
7 years ago (2013-12-12 07:18:21 UTC) #16
dsinclair
brettw for base/OWNERS.
7 years ago (2013-12-12 15:20:05 UTC) #17
brettw
lgtm https://codereview.chromium.org/75133004/diff/310001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/310001/base/threading/platform_thread_win.cc#newcode61 base/threading/platform_thread_win.cc:61: GetCurrentProcess(), This indentation is a bit weird. I'd ...
7 years ago (2013-12-12 21:58:28 UTC) #18
dsinclair
rvargas, PTAL. https://codereview.chromium.org/75133004/diff/310001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/310001/base/threading/platform_thread_win.cc#newcode61 base/threading/platform_thread_win.cc:61: GetCurrentProcess(), On 2013/12/12 21:58:29, brettw wrote: > ...
7 years ago (2013-12-13 15:44:28 UTC) #19
rvargas (doing something else)
https://codereview.chromium.org/75133004/diff/320001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/320001/base/threading/platform_thread_win.cc#newcode67 base/threading/platform_thread_win.cc:67: NOTREACHED(); This is a nop on release builds so ...
7 years ago (2013-12-14 02:29:54 UTC) #20
dsinclair
https://codereview.chromium.org/75133004/diff/320001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/320001/base/threading/platform_thread_win.cc#newcode67 base/threading/platform_thread_win.cc:67: NOTREACHED(); On 2013/12/14 02:29:55, rvargas wrote: > This is ...
6 years, 11 months ago (2014-01-06 21:30:40 UTC) #21
rvargas (doing something else)
lgtm after the nit. https://codereview.chromium.org/75133004/diff/390001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/390001/base/threading/platform_thread_win.cc#newcode60 base/threading/platform_thread_win.cc:60: BOOL didDup = DuplicateHandle(GetCurrentProcess(), nit: ...
6 years, 11 months ago (2014-01-07 01:15:38 UTC) #22
dsinclair
https://codereview.chromium.org/75133004/diff/390001/base/threading/platform_thread_win.cc File base/threading/platform_thread_win.cc (right): https://codereview.chromium.org/75133004/diff/390001/base/threading/platform_thread_win.cc#newcode60 base/threading/platform_thread_win.cc:60: BOOL didDup = DuplicateHandle(GetCurrentProcess(), On 2014/01/07 01:15:39, rvargas wrote: ...
6 years, 11 months ago (2014-01-07 15:36:35 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dsinclair@chromium.org/75133004/440001
6 years, 11 months ago (2014-01-07 15:36:54 UTC) #24
commit-bot: I haz the power
6 years, 11 months ago (2014-01-07 18:02:02 UTC) #25
Message was sent while issue was closed.
Change committed as 243330

Powered by Google App Engine
This is Rietveld 408576698