Changeset 128935 in webkit


Ignore:
Timestamp:
Sep 18, 2012 3:00:19 PM (12 years ago)
Author:
andersca@apple.com
Message:

Division by zero crash in BackingStore::scroll
https://bugs.webkit.org/show_bug.cgi?id=97046
<rdar://problem/11722564>

Reviewed by Dan Bernstein.

It appears that DrawingAreaImpl::scroll can be called with an empty scroll rect. Do nothing
if that's the case. Also, assert that the scrolling rect in BackingStoreMac is never empty.

  • UIProcess/mac/BackingStoreMac.mm:

(WebKit::BackingStore::scroll):

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::scroll):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r128914 r128935  
     12012-09-18  Anders Carlsson  <andersca@apple.com>
     2
     3        Division by zero crash in BackingStore::scroll
     4        https://bugs.webkit.org/show_bug.cgi?id=97046
     5        <rdar://problem/11722564>
     6
     7        Reviewed by Dan Bernstein.
     8
     9        It appears that DrawingAreaImpl::scroll can be called with an empty scroll rect. Do nothing
     10        if that's the case. Also, assert that the scrolling rect in BackingStoreMac is never empty.
     11
     12        * UIProcess/mac/BackingStoreMac.mm:
     13        (WebKit::BackingStore::scroll):
     14        * WebProcess/WebPage/DrawingAreaImpl.cpp:
     15        (WebKit::DrawingAreaImpl::scroll):
     16
    1172012-09-18  Bo Liu  <boliu@chromium.org>
    218
  • trunk/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm

    r117698 r128935  
    215215        return;
    216216
     217    ASSERT(!scrollRect.isEmpty());
     218
    217219    if (!m_scrolledRect.isEmpty() && m_scrolledRect != scrollRect)
    218220        resetScrolledRect();
  • trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp

    r128678 r128935  
    118118        return;
    119119
     120    if (scrollRect.isEmpty())
     121        return;
     122
    120123    if (!m_scrollRect.isEmpty() && scrollRect != m_scrollRect) {
    121124        unsigned scrollArea = scrollRect.width() * scrollRect.height();
Note: See TracChangeset for help on using the changeset viewer.