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

Issue 9121046: Cleanup in ProcessSingleton. (Closed)

Created:
8 years, 11 months ago by Jói
Modified:
8 years, 10 months ago
CC:
chromium-reviews, amit, robertshield, brettw-cc_chromium.org
Visibility:
Public.

Description

Cleanup in ProcessSingleton. These originated as candidate fixes for issue 111361, but the true fix is cpu@'s r119830. a) Unify code to retrieve HMODULE based on address in base::GetModuleFromAddress. (cpu@'s r119830 already has the fix to use the DLL's HMODULE 119830 rather than the EXE's HINSTANCE) b) Try harder to unregister the window class, by trying it first in ProcessSingleton::Cleanup, which gets called before the fast shutdown path calls ExitProcess(). Also, use correct HMODULE to unregister. c) Avoid any possibility of a race to create the message window when the Create() method is called from NotifyOtherProcessOrCreate() or from outside the class by moving the implementation of Create(), which was always called from the constructor, into the constructor and making Create() just return true or false based on the success of the work already done. BUG=111361 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=121480

Patch Set 1 #

Total comments: 8

Patch Set 2 : Update post Carlos' change. Address review comments. Add unit test. #

Patch Set 3 : Merge to LKGR. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -48 lines) Patch
M base/process_util.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M base/process_util_unittest.cc View 1 1 chunk +19 lines, -0 lines 0 comments Download
M base/process_util_win.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/browser/process_singleton_win.cc View 1 3 chunks +42 lines, -38 lines 0 comments Download
M chrome_frame/buggy_bho_handling.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome_frame/utils.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome_frame/utils.cc View 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Jói
Ben: Main reviewer, for familiarity with with ProcessSingleton on Windows. Evan, Robert: base/OWNERS and chrome_frame/OWNERS ...
8 years, 11 months ago (2012-01-27 13:44:49 UTC) #1
grt (UTC plus 2)
BUG=111361 rather than 111363?
8 years, 11 months ago (2012-01-27 14:20:15 UTC) #2
Jói
Yes, thanks for catching that Greg. Updated the description to have the correct bug number. ...
8 years, 11 months ago (2012-01-27 15:26:32 UTC) #3
Ben Goodger (Google)
I'm actually not that familiar with ProcessSingleton. Perhaps I moved it at some point and ...
8 years, 11 months ago (2012-01-27 16:16:42 UTC) #4
Evan Martin
http://codereview.chromium.org/9121046/diff/1/base/process_util.h File base/process_util.h (right): http://codereview.chromium.org/9121046/diff/1/base/process_util.h#newcode144 base/process_util.h:144: // @returns the module handle to which an address ...
8 years, 11 months ago (2012-01-27 16:17:40 UTC) #5
robertshield
lgtm http://codereview.chromium.org/9121046/diff/1/base/process_util_win.cc File base/process_util_win.cc (right): http://codereview.chromium.org/9121046/diff/1/base/process_util_win.cc#newcode180 base/process_util_win.cc:180: return reinterpret_cast<HMODULE>(info.AllocationBase); I know you took this from ...
8 years, 11 months ago (2012-01-27 16:26:44 UTC) #6
cpu_(ooo_6.6-7.5)
lgtm You need a new, albeit very test for the new function you added to ...
8 years, 11 months ago (2012-01-27 19:31:50 UTC) #7
cpu_(ooo_6.6-7.5)
I meant: You need a new, albeit very *simple* unit test for the new function ...
8 years, 11 months ago (2012-01-27 19:32:51 UTC) #8
cpu_(ooo_6.6-7.5)
stop the presses I think I know what is going on. It is none of ...
8 years, 11 months ago (2012-01-28 21:20:18 UTC) #9
Jói
> See if you can spot the error with this hint: GWLP_USERDATA Nice catch :) ...
8 years, 10 months ago (2012-01-31 15:06:47 UTC) #10
Jói
cpu: PTAL, I forgot to ping this review last week. Cheers, Jói On 2012/01/31 15:06:47, ...
8 years, 10 months ago (2012-02-09 16:02:50 UTC) #11
cpu_(ooo_6.6-7.5)
lgtm
8 years, 10 months ago (2012-02-09 22:00:50 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9121046/22001
8 years, 10 months ago (2012-02-10 07:00:46 UTC) #13
commit-bot: I haz the power
Presubmit check for 9121046-22001 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 10 months ago (2012-02-10 07:00:51 UTC) #14
Jói
Evan: Need your LGTM for base/OWNERS. Cheers, Jói http://codereview.chromium.org/9121046/diff/1/base/process_util.h File base/process_util.h (right): http://codereview.chromium.org/9121046/diff/1/base/process_util.h#newcode144 base/process_util.h:144: // ...
8 years, 10 months ago (2012-02-10 09:11:57 UTC) #15
Evan Martin
base lgtm
8 years, 10 months ago (2012-02-10 17:02:06 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joi@chromium.org/9121046/22001
8 years, 10 months ago (2012-02-10 17:25:10 UTC) #17
commit-bot: I haz the power
8 years, 10 months ago (2012-02-10 18:46:00 UTC) #18
Change committed as 121480

Powered by Google App Engine
This is Rietveld 408576698