OSDN Git Service

Fix deadlock in SF.
authorMathias Agopian <mathias@google.com>
Fri, 17 Aug 2012 22:06:02 +0000 (15:06 -0700)
committerMathias Agopian <mathias@google.com>
Sat, 18 Aug 2012 01:48:56 +0000 (18:48 -0700)
commit10125f00a50d3edd05deef9fcd2d368cf2766683
tree9c7a89d1fc421b2516b5662b9c57ea2af349ea5c
parent2c7eb92b6394427bfe81962668d46194959bc722
Fix deadlock in SF.

problem was that we were acquiring a strong reference
on Connection object with a lock held, when those
got out of scope (lock still held) their dtor
could be called if all other refs had dropped,
the dtor would acquire the lock again to
remove the Connection from the main list. boom.

we rearange the code so this doesn't happen.

Bug: 6942208

Change-Id: I0a0ebabce2842d29d60d645b64aac2f26640e59b
services/surfaceflinger/EventThread.cpp
services/surfaceflinger/EventThread.h