Changeset 147911 in webkit


Ignore:
Timestamp:
Apr 8, 2013 6:11:06 AM (11 years ago)
Author:
rakuco@webkit.org
Message:

[EFL] REGRESSION(r147743): Use the correct `operator new' override in RenderThemeEfl.
https://bugs.webkit.org/show_bug.cgi?id=114166

Reviewed by Alexis Menard.

r147743 disabled GLOBAL_FAST_MALLOC_NEW on the EFL port, but this has
caused some pixel tests in WK1 to crash.

The problem stems from RenderThemeEfl::applyEdjeRTLState() directly
calling `operator new(size_t)' for some allocations.
RefCounted<RenderTheme>, on its turn, has a WTF_MAKE_FAST_ALLOCATED
call which adds some `operator new' overrides to the class. Our direct
calls in applyEdjeRTLState() made the scope resolution rules choose the
WTF_MAKE_FAST_ALLOCATED version (which uses FastMalloc's allocator),
while WTF::deleteOwnedPtr() calls the global `operator delete' (which
uses the system's free() implementation).

  • platform/efl/RenderThemeEfl.cpp:

(WebCore::RenderThemeEfl::applyEdjeRTLState): Explicitly choose the
global `operator new' when calling it.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r147893 r147911  
     12013-04-08  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
     2
     3        [EFL] REGRESSION(r147743): Use the correct `operator new' override in RenderThemeEfl.
     4        https://bugs.webkit.org/show_bug.cgi?id=114166
     5
     6        Reviewed by Alexis Menard.
     7
     8        r147743 disabled GLOBAL_FAST_MALLOC_NEW on the EFL port, but this has
     9        caused some pixel tests in WK1 to crash.
     10
     11        The problem stems from RenderThemeEfl::applyEdjeRTLState() directly
     12        calling `operator new(size_t)' for some allocations.
     13        RefCounted<RenderTheme>, on its turn, has a WTF_MAKE_FAST_ALLOCATED
     14        call which adds some `operator new' overrides to the class. Our direct
     15        calls in applyEdjeRTLState() made the scope resolution rules choose the
     16        WTF_MAKE_FAST_ALLOCATED version (which uses FastMalloc's allocator),
     17        while WTF::deleteOwnedPtr() calls the global `operator delete' (which
     18        uses the system's free() implementation).
     19
     20        * platform/efl/RenderThemeEfl.cpp:
     21        (WebCore::RenderThemeEfl::applyEdjeRTLState): Explicitly choose the
     22        global `operator new' when calling it.
     23
    1242013-04-07  Benjamin Poulain  <benjamin@webkit.org>
    225
  • trunk/Source/WebCore/platform/efl/RenderThemeEfl.cpp

    r147607 r147911  
    331331        double valueRange = input->maximum() - input->minimum();
    332332
    333         OwnPtr<Edje_Message_Float_Set> msg = adoptPtr(static_cast<Edje_Message_Float_Set*>(operator new (sizeof(Edje_Message_Float_Set) + sizeof(double))));
     333        OwnPtr<Edje_Message_Float_Set> msg = adoptPtr(static_cast<Edje_Message_Float_Set*>(::operator new (sizeof(Edje_Message_Float_Set) + sizeof(double))));
    334334        msg->count = 2;
    335335
     
    352352        double value = renderProgress->position();
    353353
    354         OwnPtr<Edje_Message_Float_Set> msg = adoptPtr(static_cast<Edje_Message_Float_Set*>(operator new (sizeof(Edje_Message_Float_Set) + sizeof(double))));
     354        OwnPtr<Edje_Message_Float_Set> msg = adoptPtr(static_cast<Edje_Message_Float_Set*>(::operator new (sizeof(Edje_Message_Float_Set) + sizeof(double))));
    355355        msg->count = 2;
    356356
Note: See TracChangeset for help on using the changeset viewer.