Changeset 128431 in webkit


Ignore:
Timestamp:
Sep 13, 2012, 2:11:04 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] REGRESSION (r128274): fast/overflow/overflow-height-float-not-removed-crash.html
https://bugs.webkit.org/show_bug.cgi?id=96619

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-09-13
Reviewed by Kenneth Rohde Christiansen.

ThemePartCacheEntry::create() can return '0' if creation fails, this was not checked
while Theme Part cache populating. A NULL pointer was dereferenced then causing crash.

Test: fast/overflow/overflow-height-float-not-removed-crash.html.

  • platform/efl/RenderThemeEfl.cpp:

(WebCore::RenderThemeEfl::getThemePartFromCache):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r128428 r128431  
     12012-09-13  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
     2
     3        [EFL] REGRESSION (r128274): fast/overflow/overflow-height-float-not-removed-crash.html
     4        https://bugs.webkit.org/show_bug.cgi?id=96619
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        ThemePartCacheEntry::create() can return '0' if creation fails, this was not checked
     9        while Theme Part cache populating. A NULL pointer was dereferenced then causing crash.
     10
     11        Test: fast/overflow/overflow-height-float-not-removed-crash.html.
     12
     13        * platform/efl/RenderThemeEfl.cpp:
     14        (WebCore::RenderThemeEfl::getThemePartFromCache):
     15
    1162012-09-13  Filip Pizlo  <fpizlo@apple.com>
    217
  • trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp

    r128311 r128431  
    279279    for (size_t i = 0; it != end; i++, it++) {
    280280        ThemePartCacheEntry* entry = *it;
     281        ASSERT(entry);
    281282        if (entry->size == size) {
    282283            if (entry->type == type)
     
    288289    if (m_partCache.size() < RENDER_THEME_EFL_PART_CACHE_MAX) {
    289290        ThemePartCacheEntry* entry = ThemePartCacheEntry::create(themePath(), type, size);
    290         m_partCache.prepend(entry);
     291        if (entry) // Can be '0', if creation fails. Do not store it in this case.
     292            m_partCache.prepend(entry);
    291293        return entry;
    292294    }
     
    297299    if (lastWithRequestedSize != notFound && lastWithRequestedSize != 1) {
    298300        ThemePartCacheEntry* entry = m_partCache.at(lastWithRequestedSize);
     301        ASSERT(entry);
    299302        entry->reuse(themePath(), type);
    300303        m_partCache.remove(lastWithRequestedSize);
     
    304307
    305308    ThemePartCacheEntry* entry = m_partCache.last();
     309    ASSERT(entry);
    306310    entry->reuse(themePath(), type, size);
    307311    m_partCache.removeLast();
Note: See TracChangeset for help on using the changeset viewer.