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

Issue 8550009: Provide DllMain, and hook to support TLS callbacks. (Closed)

Created:
9 years, 1 month ago by jar (doing other things)
Modified:
9 years ago
CC:
chromium-reviews, brettw-cc_chromium.org, cpu1, ramant (doing other things), eroman
Visibility:
Public.

Description

Provide windows notifictaion of thread termination Provide an automatic fallback scan of the linker list of notifcation callbacks via DllMain. This fallback is ONLY used if there are no notifications coming via the linker list. This allows all existing code to continue working as it does today, and provides thread teardown notifcatino on XP even though we use the LoadLibrary call. It is a minimal change, suitable for pushing to other channels (beta? stable?). r=cpu BUG=103209 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=113321

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 15

Patch Set 7 : '' #

Total comments: 4

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Total comments: 6

Patch Set 22 : '' #

Patch Set 23 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -6 lines) Patch
M base/base.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
A base/win/dllmain.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +131 lines, -0 lines 0 comments Download
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/chrome_dll.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
jar (doing other things)
Ricardo, This CL has not yet been compiled, but it should make clear what I ...
9 years, 1 month ago (2011-11-20 23:56:55 UTC) #1
jar (doing other things)
I added a little cleverness in this version. I try to not provide duplicate calls ...
9 years, 1 month ago (2011-11-21 09:48:35 UTC) #2
jar (doing other things)
9 years ago (2011-11-30 01:06:36 UTC) #3
jar (doing other things)
This is the new version, using Dllmain() to get notifications, and pass them along to ...
9 years ago (2011-11-30 01:09:19 UTC) #4
rvargas (doing something else)
I like it overall. Looking at the IFDEF to use TLS callbacks, it occurred to ...
9 years ago (2011-11-30 04:00:23 UTC) #5
rvargas (doing something else)
http://codereview.chromium.org/8550009/diff/14001/base/threading/thread_local_storage.h File base/threading/thread_local_storage.h (right): http://codereview.chromium.org/8550009/diff/14001/base/threading/thread_local_storage.h#newcode78 base/threading/thread_local_storage.h:78: static void **Initialize(); We could also move this to ...
9 years ago (2011-11-30 04:01:49 UTC) #6
jar (doing other things)
Changes per comments by rvargas http://codereview.chromium.org/8550009/diff/14001/base/threading/thread_local_storage.h File base/threading/thread_local_storage.h (right): http://codereview.chromium.org/8550009/diff/14001/base/threading/thread_local_storage.h#newcode78 base/threading/thread_local_storage.h:78: static void **Initialize(); On ...
9 years ago (2011-11-30 07:31:30 UTC) #7
rvargas (doing something else)
Even though I said the new file should go inside chrome/app, we have a problem ...
9 years ago (2011-11-30 18:48:41 UTC) #8
jar (doing other things)
Changes per comments by rvargas. http://codereview.chromium.org/8550009/diff/17002/base/threading/thread_local_storage_win.cc File base/threading/thread_local_storage_win.cc (right): http://codereview.chromium.org/8550009/diff/17002/base/threading/thread_local_storage_win.cc#newcode88 base/threading/thread_local_storage_win.cc:88: } // namespace anonymous ...
9 years ago (2011-11-30 19:22:00 UTC) #9
jar (doing other things)
Moved DllMain into content. jam@ please approve as owner for content
9 years ago (2011-11-30 23:36:50 UTC) #10
rvargas (doing something else)
We still have a problem with the unit tests (they will leak, and base_unittests will ...
9 years ago (2011-12-01 00:58:51 UTC) #11
jar (doing other things)
Given that we need (at least half of) the dllmain file in base to run ...
9 years ago (2011-12-01 02:23:32 UTC) #12
jam
I haven't read all the messages above (sorry, overloaded). but looking at the latest code, ...
9 years ago (2011-12-01 04:03:50 UTC) #13
rvargas (doing something else)
John: It makes sense to invert the default value to match the common case. Just ...
9 years ago (2011-12-01 19:36:42 UTC) #14
rvargas (doing something else)
Here's my sympathy lgtm, but I'm afraid I'm not going to see the end of ...
9 years ago (2011-12-01 22:05:13 UTC) #15
jam
On 2011/12/01 19:36:42, rvargas wrote: > John: It makes sense to invert the default value ...
9 years ago (2011-12-01 23:44:27 UTC) #16
jar (doing other things)
I flipped the sense of the define (with a new name). The default will provide ...
9 years ago (2011-12-02 00:12:52 UTC) #17
jam
On 2011/12/02 00:12:52, jar wrote: > I flipped the sense of the define (with a ...
9 years ago (2011-12-02 02:34:32 UTC) #18
jar (doing other things)
I argued with Ricardo in favor of using both, and automatically (dynamically) allowing which ever ...
9 years ago (2011-12-02 06:14:30 UTC) #19
jam
On Thu, Dec 1, 2011 at 10:14 PM, Jim Roskind <jar@chromium.org> wrote: > I argued ...
9 years ago (2011-12-02 16:42:52 UTC) #20
jar (doing other things)
I'm in agreement with jam's assertion. The user of the code is best served by ...
9 years ago (2011-12-03 22:42:47 UTC) #21
jar (doing other things)
cpu: Please take a look.
9 years ago (2011-12-06 00:52:33 UTC) #22
cpu_(ooo_6.6-7.5)
lgtm http://codereview.chromium.org/8550009/diff/50001/base/win/dllmain.cc File base/win/dllmain.cc (right): http://codereview.chromium.org/8550009/diff/50001/base/win/dllmain.cc#newcode33 base/win/dllmain.cc:33: static void NTAPI on_callback(HINSTANCE h, DWORD dwReason, PVOID ...
9 years ago (2011-12-06 19:15:50 UTC) #23
jar (doing other things)
Changes made per comments by cpu http://codereview.chromium.org/8550009/diff/50001/base/win/dllmain.cc File base/win/dllmain.cc (right): http://codereview.chromium.org/8550009/diff/50001/base/win/dllmain.cc#newcode33 base/win/dllmain.cc:33: static void NTAPI ...
9 years ago (2011-12-06 19:56:26 UTC) #24
commit-bot: I haz the power
9 years ago (2011-12-06 23:47:47 UTC) #25

Powered by Google App Engine
This is Rietveld 408576698