Changeset 76914 in webkit


Ignore:
Timestamp:
Jan 27, 2011 8:26:02 PM (13 years ago)
Author:
enne@google.com
Message:

2011-01-27 Adrienne Walker <enne@google.com>

Reviewed by Kenneth Russell.

[chromium] Add CRASH calls to further debug tiled compositor memcpy crash.
https://bugs.webkit.org/show_bug.cgi?id=52379

Test: LayoutTests/compositing (to verify these weren't triggered)

  • platform/graphics/chromium/LayerTilerChromium.cpp: (WebCore::LayerTilerChromium::invalidateRect): (WebCore::LayerTilerChromium::update):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r76913 r76914  
     12011-01-27  Adrienne Walker  <enne@google.com>
     2
     3        Reviewed by Kenneth Russell.
     4
     5        [chromium] Add CRASH calls to further debug tiled compositor memcpy crash.
     6        https://bugs.webkit.org/show_bug.cgi?id=52379
     7
     8        Test: LayoutTests/compositing (to verify these weren't triggered)
     9
     10        * platform/graphics/chromium/LayerTilerChromium.cpp:
     11        (WebCore::LayerTilerChromium::invalidateRect):
     12        (WebCore::LayerTilerChromium::update):
     13
    1142011-01-27  Alexander Pavlov  <apavlov@chromium.org>
    215
  • trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp

    r76864 r76914  
    209209            bound.intersect(layerRect);
    210210            tile->m_dirtyLayerRect.unite(bound);
     211            if (!tileLayerRect(i, j).contains(tile->m_dirtyLayerRect))
     212                CRASH();
    211213        }
    212214    }
     
    273275    const SkBitmap& bitmap = canvas->getDevice()->accessBitmap(false);
    274276    ASSERT(bitmap.width() == paintRect.width() && bitmap.height() == paintRect.height());
     277    if (bitmap.width() != paintRect.width() || bitmap.height() != paintRect.height())
     278        CRASH();
    275279    uint8_t* paintPixels = static_cast<uint8_t*>(bitmap.getPixels());
     280    if (!paintPixels)
     281        CRASH();
    276282#elif PLATFORM(CG)
    277283    Vector<uint8_t> canvasPixels;
     
    307313        for (int i = left; i <= right; ++i) {
    308314            Tile* tile = m_tiles[tileIndex(i, j)].get();
     315            if (!tile)
     316                CRASH();
    309317            if (!tile->dirty())
    310318                continue;
     
    325333            // Calculate tile-space rectangle to upload into.
    326334            IntRect destRect(IntPoint(sourceRect.x() - anchor.x(), sourceRect.y() - anchor.y()), sourceRect.size());
    327             ASSERT(destRect.x() >= 0);
    328             ASSERT(destRect.y() >= 0);
     335            if (destRect.x() < 0)
     336                CRASH();
     337            if (destRect.y() < 0)
     338                CRASH();
    329339
    330340            // Offset from paint rectangle to this tile's dirty rectangle.
    331341            IntPoint paintOffset(sourceRect.x() - paintRect.x(), sourceRect.y() - paintRect.y());
    332             ASSERT(paintOffset.x() >= 0);
    333             ASSERT(paintOffset.y() >= 0);
     342            if (paintOffset.x() < 0)
     343                CRASH();
     344            if (paintOffset.y() < 0)
     345                CRASH();
     346            if (paintOffset.x() + destRect.width() > paintRect.width())
     347                CRASH();
     348            if (paintOffset.y() + destRect.height() > paintRect.height())
     349                CRASH();
    334350
    335351            uint8_t* pixelSource;
Note: See TracChangeset for help on using the changeset viewer.