Changeset 89748 in webkit


Ignore:
Timestamp:
Jun 25, 2011 2:20:22 PM (13 years ago)
Author:
jer.noble@apple.com
Message:

2011-06-25 Jer Noble <jer.noble@apple.com>

Reviewed by Maciej Stachowiak.

SOFT_LINK_POINTER_OPTIONAL isn't optional.
https://bugs.webkit.org/show_bug.cgi?id=63378

Continuation of r89718. SOFT_LINK_POINTER_OPTIONAL should check the value returned by dlsym before dereferencing it.

  • platform/mac/SoftLinking.h:
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r89745 r89748  
     12011-06-25  Jer Noble  <jer.noble@apple.com>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        SOFT_LINK_POINTER_OPTIONAL isn't optional.
     6        https://bugs.webkit.org/show_bug.cgi?id=63378
     7
     8        Continuation of r89718.  SOFT_LINK_POINTER_OPTIONAL should check the value returned by dlsym before dereferencing it.
     9
     10        * platform/mac/SoftLinking.h:
     11
    1122011-06-25  Rob Buis  <rbuis@rim.com>
    213
  • trunk/Source/WebCore/platform/mac/SoftLinking.h

    r89718 r89748  
    138138    { \
    139139        void** pointer = static_cast<void**>(dlsym(framework##Library(), #name)); \
    140         pointer##name = static_cast<type>(*pointer); \
     140        if (pointer) \
     141            pointer##name = static_cast<type>(*pointer); \
    141142        get##name = name##Function; \
    142143        return pointer##name; \
Note: See TracChangeset for help on using the changeset viewer.