Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 636ce004 authored by John Reck's avatar John Reck
Browse files

Prevent SET_SCROLL_OFFSET spam from clogging tubes

 Bug: 3393571
 Limit the event queue to a single pending SET_SCROLL_OFFSET. The
 problem on slashdot.org was that the event thread was being flooded
 with SET_SCROLL_OFFSET messages faster than it could process them,
 causing the handler to get jammed up.

Change-Id: Ia4a90a030959d0b3769067791089cdb261ae403a
parent 3c89f6d1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2506,6 +2506,7 @@ public class WebView extends AbsoluteLayout
        // Rect.equals() checks for null input.
        if (!rect.equals(mLastVisibleRectSent)) {
            Point pos = new Point(rect.left, rect.top);
            mWebViewCore.removeMessages(EventHub.SET_SCROLL_OFFSET);
            mWebViewCore.sendMessage(EventHub.SET_SCROLL_OFFSET,
                    nativeMoveGeneration(), mUserScroll ? 1 : 0, pos);
            mLastVisibleRectSent = rect;