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

Unified Diff: ceee/ie/plugin/bho/cookie_accountant.cc

Issue 5290011: Add a lock to the cookie accountant to prevent race conditions in patching... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ceee/ie/plugin/bho/cookie_accountant.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ceee/ie/plugin/bho/cookie_accountant.cc
===================================================================
--- ceee/ie/plugin/bho/cookie_accountant.cc (revision 67716)
+++ ceee/ie/plugin/bho/cookie_accountant.cc (working copy)
@@ -222,6 +222,12 @@
}
void CookieAccountant::PatchWininetFunctions() {
+ {
+ AutoLock lock(lock_);
+ if (patching_wininet_functions_)
+ return;
+ patching_wininet_functions_ = true;
+ }
if (!internet_set_cookie_ex_a_patch_.is_patched()) {
DWORD error = internet_set_cookie_ex_a_patch_.Patch(
kMsHtmlModuleName, kWinInetModuleName,
@@ -236,4 +242,8 @@
}
DCHECK(internet_set_cookie_ex_a_patch_.is_patched() ||
internet_set_cookie_ex_w_patch_.is_patched());
+ {
+ AutoLock lock(lock_);
+ patching_wininet_functions_ = false;
+ }
}
« no previous file with comments | « ceee/ie/plugin/bho/cookie_accountant.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698