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

Issue 7013059: Fix base::internal::WeakReferenceOwner races. (Closed)

Created:
9 years, 7 months ago by willchan no longer on Chromium
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., brettw-cc_chromium.org
Visibility:
Public.

Description

Fix base::internal::WeakReferenceOwner races. base::WeakPtr is thread unsafe, in that its getters must all be called on the same thread. However, we want it to be deletable on different threads. Therefore, we need some locks. BUG=82509 TEST=none

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -2 lines) Patch
M base/memory/weak_ptr.h View 3 chunks +6 lines, -0 lines 0 comments Download
M base/memory/weak_ptr.cc View 1 chunk +1 line, -0 lines 0 comments Download
M base/memory/weak_ptr_unittest.cc View 3 chunks +17 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
willchan no longer on Chromium
9 years, 7 months ago (2011-05-13 22:22:38 UTC) #1
willchan no longer on Chromium
9 years, 7 months ago (2011-05-15 21:13:26 UTC) #2
I'm scrapping this changelist. It's broken. We're already in the destructor of
Flag, so the lock will prevent data races, but it might cause the pointer to
point to an already destructed object. A different fix is needed.

Powered by Google App Engine
This is Rietveld 408576698