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/HardwareCanvas.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/HardwareCanvas.java')
| -rw-r--r-- | core/java/android/view/HardwareCanvas.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/view/HardwareCanvas.java b/core/java/android/view/HardwareCanvas.java index 2f4cd361c8a6..ee2dd5928f2c 100644 --- a/core/java/android/view/HardwareCanvas.java +++ b/core/java/android/view/HardwareCanvas.java @@ -107,4 +107,26 @@ public abstract class HardwareCanvas extends Canvas { public int invokeFunctors(Rect dirty) { return DisplayList.STATUS_DONE; } + + /** + * Detaches the specified functor from the current functor execution queue. + * + * @param functor The native functor to remove from the execution queue. + * + * @see #invokeFunctors(android.graphics.Rect) + * @see #callDrawGLFunction(int) + * @see #detachFunctor(int) + */ + abstract void detachFunctor(int functor); + + /** + * Attaches the specified functor to the current functor execution queue. + * + * @param functor The native functor to add to the execution queue. + * + * @see #invokeFunctors(android.graphics.Rect) + * @see #callDrawGLFunction(int) + * @see #detachFunctor(int) + */ + abstract void attachFunctor(int functor); } |
