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

Issue 2391513002: Remove lock from SharedMemoryDataConsumerHandle::Context destructor (Closed)

Created:
4 years, 2 months ago by yhirano
Modified:
4 years, 2 months ago
Reviewers:
hiroshige, jam
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove lock from SharedMemoryDataConsumerHandle::Context destructor SharedMemoryDataConsumerHandle::Context posts tasks while its lock_ locked. That means a lock held by the TaskRunner will be locked after |lock_| is locked. On the other hand, the Context may be destructed in the middle of TaskRunner destruction, which means we cannot lock |lock_| in the Context destruction. Otherwise, a lock-order-inversion problem will be introduced. This CL stops locking |lock_| in the destructor. It is safe because no one accesses to Content's member variables without a valid scoped_refptr to the Context. BUG=651747 Committed: https://crrev.com/d9a07ccafb34327cc194631d354395245f65a52b Cr-Commit-Position: refs/heads/master@{#422614}

Patch Set 1 : fix #

Patch Set 2 : fix #

Patch Set 3 : fix #

Patch Set 4 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -32 lines) Patch
M content/child/shared_memory_data_consumer_handle.cc View 1 2 3 4 chunks +5 lines, -23 lines 0 comments Download
M content/child/shared_memory_data_consumer_handle_unittest.cc View 1 2 2 chunks +17 lines, -9 lines 0 comments Download

Messages

Total messages: 36 (28 generated)
yhirano
4 years, 2 months ago (2016-10-03 08:48:37 UTC) #20
hiroshige
lgtm with a comment to CL description: Could you add explanation why removing the lock ...
4 years, 2 months ago (2016-10-03 11:09:25 UTC) #25
yhirano
On 2016/10/03 11:09:25, hiroshige wrote: > lgtm with a comment to CL description: > Could ...
4 years, 2 months ago (2016-10-03 11:37:22 UTC) #27
yhirano
+jam@ for OWNER review.
4 years, 2 months ago (2016-10-03 11:37:41 UTC) #29
jam
lgtm
4 years, 2 months ago (2016-10-03 17:41:32 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2391513002/40002
4 years, 2 months ago (2016-10-04 00:00:45 UTC) #32
commit-bot: I haz the power
Committed patchset #4 (id:40002)
4 years, 2 months ago (2016-10-04 00:10:36 UTC) #34
commit-bot: I haz the power
4 years, 2 months ago (2016-10-04 00:13:09 UTC) #36
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/d9a07ccafb34327cc194631d354395245f65a52b
Cr-Commit-Position: refs/heads/master@{#422614}

Powered by Google App Engine
This is Rietveld 408576698