diff options
| author | Romain Guy <romainguy@google.com> | 2012-04-23 18:22:09 -0700 |
|---|---|---|
| committer | Romain Guy <romainguy@google.com> | 2012-04-23 20:29:31 -0700 |
| commit | ba6be8a62dcdb3ffd210cd36b9af4e3a658eac47 (patch) | |
| tree | 04f9b4d5589333970c91e51af6280a5859b78460 /core/java/android/view/GLES20Canvas.java | |
| parent | 88fffb7a34313d5e94b3974d444d07bd6a4879a4 (diff) | |
Prevent WebView from crashing when detached from the window
Bug #6365056
WebView enqueues a functor in the hardware renderer to handle
animations and this functor is called at a later time by the
hardware renderer. However, the functor was not removed from
the queue when WebView was removed from the window. This could
cause the hardware renderer to attempt to execute an invalid
functor and lead to a crash.
Change-Id: I9d38e80f3fdc5e29d4d0cdfa1e893c251a954508
Diffstat (limited to 'core/java/android/view/GLES20Canvas.java')
| -rw-r--r-- | core/java/android/view/GLES20Canvas.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java index 7736f57bd249..0bb5f9fcdefd 100644 --- a/core/java/android/view/GLES20Canvas.java +++ b/core/java/android/view/GLES20Canvas.java @@ -266,6 +266,20 @@ class GLES20Canvas extends HardwareCanvas { private static native int nInvokeFunctors(int renderer, Rect dirty); + @Override + public void detachFunctor(int functor) { + nDetachFunctor(mRenderer, functor); + } + + private static native void nDetachFunctor(int renderer, int functor); + + @Override + public void attachFunctor(int functor) { + nAttachFunctor(mRenderer, functor); + } + + private static native void nAttachFunctor(int renderer, int functor); + /////////////////////////////////////////////////////////////////////////// // Memory /////////////////////////////////////////////////////////////////////////// |
