Changeset 53480 in webkit


Ignore:
Timestamp:
Jan 19, 2010 12:19:12 PM (14 years ago)
Author:
senorblanco@chromium.org
Message:

Fix for crash on large TransparencyWin allocation. The fix is
to leave m_layerValid false when the allocPixels of
OwnedBuffers::m_referenceBitmap fails. Then TransparencyWin won't
attempt to use it.

Reviewed by Dimitri Glazkov.

Will be covered by a new unit test in Chromium's test_shell_tests (when
this is rolled into Chromium).

https://bugs.webkit.org/show_bug.cgi?id=33844

  • platform/graphics/chromium/TransparencyWin.cpp:

(WebCore::TransparencyWin::initializeNewContext):
Early return when m_referenceBitmap or its pixels is NULL, leaving
m_layerValid false.

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53478 r53480  
     12010-01-19  Stephen White  <senorblanco@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Fix for crash on large TransparencyWin allocation.  The fix is
     6        to leave m_layerValid false when the allocPixels of
     7        OwnedBuffers::m_referenceBitmap fails.  Then TransparencyWin won't
     8        attempt to use it.
     9
     10        Will be covered by a new unit test in Chromium's test_shell_tests (when
     11        this is rolled into Chromium).
     12
     13        https://bugs.webkit.org/show_bug.cgi?id=33844
     14
     15        * platform/graphics/chromium/TransparencyWin.cpp:
     16        (WebCore::TransparencyWin::initializeNewContext):
     17        Early return when m_referenceBitmap or its pixels is NULL, leaving
     18        m_layerValid false.
     19
    1202010-01-19  Eric Carlson  <eric.carlson@apple.com>
    221
  • trunk/WebCore/platform/graphics/chromium/TransparencyWin.cpp

    r50781 r53480  
    372372
    373373        m_drawContext = m_layerBuffer->context();
    374         if (needReferenceBitmap)
     374        if (needReferenceBitmap) {
    375375            m_referenceBitmap = m_ownedBuffers->referenceBitmap();
     376            if (!m_referenceBitmap || !m_referenceBitmap->getPixels())
     377                return;
     378        }
    376379        m_validLayer = true;
    377380        return;
Note: See TracChangeset for help on using the changeset viewer.