Bug 780699 - Prevent possible deadlock by reducing the scope of a synchronized block in GLController. r=ajuma

This commit is contained in:
Kartikaya Gupta 2012-08-08 11:37:46 -04:00
Родитель 3cfaa1db23
Коммит a66ad991d2
1 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -72,11 +72,14 @@ public class GLController {
}
// This function is invoked by JNI
public synchronized void resumeCompositorIfValid() {
if (mSurfaceValid) {
mView.getListener().compositionResumeRequested(mWidth, mHeight);
public void resumeCompositorIfValid() {
synchronized (this) {
if (!mSurfaceValid) {
return;
}
}
mView.getListener().compositionResumeRequested(mWidth, mHeight);
}
// Wait until we are allowed to use EGL functions on the Surface backing
// this window. This function is invoked by JNI