Skip to content
Snippets Groups Projects
Commit 7ee2fe8a authored by jar@chromium.org's avatar jar@chromium.org
Browse files

Fix typo in recursion detection logic

When releasing the lock, I incorrectly set the thread owner for the lock
to the current thread, rather than resetting it to zero.  The result is that
some number of stacks were not being recorded into the stack map (because
the recursion blocking logic aborted the attempt to gather the lock).

If I ever do a recursive acquisition (i.e., my logic is faulty), then
an assertion will fire in the Acquire() for the lock.  This in turn
guarantees that when I Release() the lock, it was not a (windows
allowed) recursive acquisition of the lock, and hence the
thread owning the lock should indeed be zeroed.

r=mbelshe
Review URL: http://codereview.chromium.org/443009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33140 0039d316-1c4b-4281-b951-d872f2087c98
parent 4091a1b6
No related merge requests found
......@@ -84,7 +84,7 @@ class CallStack {
}
static void UnlockDbgHelp() {
active_thread_id_ = GetCurrentThreadId();
active_thread_id_ = 0;
dbghelp_lock_.Release();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment