• yhirano's avatar
    Remove lock from SharedMemoryDataConsumerHandle::Context destructor · d9a07cca
    yhirano authored
    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
    
    Review-Url: https://codereview.chromium.org/2391513002
    Cr-Commit-Position: refs/heads/master@{#422614}
    d9a07cca
shared_memory_data_consumer_handle.cc 14.3 KB