Changeset 95576 in webkit


Ignore:
Timestamp:
Sep 20, 2011 3:39:38 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Use DEFINE_STATIC_LOCAL to intentionally leak the static RefCountedHFONT object returned from
FontPlatformData::hashTableDeletedFontValue() to avoid global destructor ordering problems.
https://bugs.webkit.org/show_bug.cgi?id=67906

Patch by Marshall Greenblatt <marshall@chromium.org> on 2011-09-20
Reviewed by Adam Barth.

  • platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r95574 r95576  
     12011-09-20  Marshall Greenblatt  <marshall@chromium.org>
     2
     3        Use DEFINE_STATIC_LOCAL to intentionally leak the static RefCountedHFONT object returned from
     4        FontPlatformData::hashTableDeletedFontValue() to avoid global destructor ordering problems.
     5        https://bugs.webkit.org/show_bug.cgi?id=67906
     6
     7        Reviewed by Adam Barth.
     8
     9        * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
     10
    1112011-09-20  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Source/WebCore/platform/graphics/chromium/FontPlatformDataChromiumWin.cpp

    r94278 r95576  
    3939#include "PlatformSupport.h"
    4040#include "SkiaFontWin.h"
     41#include "StdLibExtras.h"
    4142
    4243namespace WebCore {
     
    117118FontPlatformData::RefCountedHFONT* FontPlatformData::hashTableDeletedFontValue()
    118119{
    119     static RefPtr<RefCountedHFONT> deletedValue =
    120         RefCountedHFONT::create(reinterpret_cast<HFONT>(-1));
     120    DEFINE_STATIC_LOCAL(RefPtr<RefCountedHFONT>, deletedValue,
     121                        (RefCountedHFONT::create(reinterpret_cast<HFONT>(-1))));
    121122    return deletedValue.get();
    122123}
Note: See TracChangeset for help on using the changeset viewer.