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

Side by Side Diff: base/win/dllmain.cc

Issue 8964002: Revert 114229 - Revert 113748 - Provide windows notifictaion of thread termination (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/base.gyp ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Windows doesn't support pthread_key_create's destr_function, and in fact 5 // Windows doesn't support pthread_key_create's destr_function, and in fact
6 // it's a bit tricky to get code to run when a thread exits. This is 6 // it's a bit tricky to get code to run when a thread exits. This is
7 // cargo-cult magic from http://www.codeproject.com/threads/tls.asp. 7 // cargo-cult magic from http://www.codeproject.com/threads/tls.asp.
8 // We are trying to be compatible with both a LoadLibrary style invocation, as 8 // We are trying to be compatible with both a LoadLibrary style invocation, as
9 // well as static linking. This code only needs to be included if we use 9 // well as static linking. This code only needs to be included if we use
10 // LoadLibrary, but it hooks into the "standard" set of TLS callbacks that are 10 // LoadLibrary, but it hooks into the "standard" set of TLS callbacks that are
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // call all items. 116 // call all items.
117 // If we are called, it means that some other system is scanning the callbacks 117 // If we are called, it means that some other system is scanning the callbacks
118 // and we don't need to do so in DllMain(). 118 // and we don't need to do so in DllMain().
119 linker_notifications_are_active = true; 119 linker_notifications_are_active = true;
120 // Note: If some other routine some how plays this same game... we could both 120 // Note: If some other routine some how plays this same game... we could both
121 // decide not to do the scanning <sigh>, but this trick should suppress 121 // decide not to do the scanning <sigh>, but this trick should suppress
122 // duplicate calls on Vista, where the runtime takes care of the callbacks, 122 // duplicate calls on Vista, where the runtime takes care of the callbacks,
123 // and allow us to do the callbacks on XP, where we are currently devoid of 123 // and allow us to do the callbacks on XP, where we are currently devoid of
124 // callbacks (due to an explicit LoadLibrary call). 124 // callbacks (due to an explicit LoadLibrary call).
125 } 125 }
OLDNEW
« no previous file with comments | « base/base.gyp ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698