diff options
author | Chris Craik <ccraik@google.com> | 2011-12-05 17:26:07 -0800 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2011-12-05 17:29:50 -0800 |
commit | c34cfbd2a0063c85afcf6751478987b8c6b6f7e1 (patch) | |
tree | 8552fa45c0bf6ca1457aac93cd53cd67f3a281d7 /Source/WebCore/platform/graphics | |
parent | 3fb3b3e0e16ce89f589b71ba2cc5942f42f0ac27 (diff) | |
download | external_webkit-c34cfbd2a0063c85afcf6751478987b8c6b6f7e1.zip external_webkit-c34cfbd2a0063c85afcf6751478987b8c6b6f7e1.tar.gz external_webkit-c34cfbd2a0063c85afcf6751478987b8c6b6f7e1.tar.bz2 |
Delete TextureGenerator operations outside the lock
bug:5713701
This fixes a potential deadlock between TextureGenerator and ImagesManager
Change-Id: I57503d3b73aff571629826f2278491232b37cb67
Diffstat (limited to 'Source/WebCore/platform/graphics')
-rw-r--r-- | Source/WebCore/platform/graphics/android/TexturesGenerator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/WebCore/platform/graphics/android/TexturesGenerator.cpp b/Source/WebCore/platform/graphics/android/TexturesGenerator.cpp index 0820688..bccb99b 100644 --- a/Source/WebCore/platform/graphics/android/TexturesGenerator.cpp +++ b/Source/WebCore/platform/graphics/android/TexturesGenerator.cpp @@ -184,11 +184,10 @@ bool TexturesGenerator::threadLoop() m_currentOperation->run(); } + QueuedOperation* oldOperation = m_currentOperation; mRequestedOperationsLock.lock(); - if (m_currentOperation) { - delete m_currentOperation; + if (m_currentOperation) m_currentOperation = 0; - } if (!mRequestedOperations.size()) stop = true; if (m_waitForCompletion) { @@ -197,7 +196,8 @@ bool TexturesGenerator::threadLoop() mRequestedOperationsCond.signal(); } mRequestedOperationsLock.unlock(); - + if (oldOperation) + delete oldOperation; // delete outside lock } XLOG("threadLoop empty"); |