⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245269 in webkit


Ignore:
Timestamp:
May 13, 2019, 7:25:56 PM (7 years ago)
Author:
youenn@apple.com
Message:

[Mac] Use realpath for dlopen_preflight
https://bugs.webkit.org/show_bug.cgi?id=197803

Reviewed by Eric Carlson.

  • wtf/cocoa/SoftLinking.h:
Location:
trunk/Source/WTF
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r245264 r245269  
     12019-05-13  Youenn Fablet  <youenn@apple.com>
     2
     3        [Mac] Use realpath for dlopen_preflight
     4        https://bugs.webkit.org/show_bug.cgi?id=197803
     5
     6        Reviewed by Eric Carlson.
     7
     8        * wtf/cocoa/SoftLinking.h:
     9
    1102019-05-13  Yusuke Suzuki  <ysuzuki@apple.com>
    211
  • trunk/Source/WTF/wtf/Platform.h

    r245244 r245269  
    15481548#endif
    15491549
     1550#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101500
     1551#define USE_REALPATH_FOR_DLOPEN_PREFLIGHT 1
     1552#endif
     1553
    15501554#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000) || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED >= 60000) || (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED >= 130000)
    15511555#define HAVE_AVPLAYER_RESOURCE_CONSERVATION_LEVEL 1
  • trunk/Source/WTF/wtf/cocoa/SoftLinking.h

    r241597 r245269  
    2525#pragma once
    2626
    27 #import <wtf/Assertions.h>
    2827#import <dlfcn.h>
    2928#import <objc/runtime.h>
     29#import <wtf/Assertions.h>
     30#import <wtf/FileSystem.h>
    3031
    3132#pragma mark - Soft-link macros for use within a single source file
     
    6465    }
    6566
     67#if USE(REALPATH_FOR_DLOPEN_PREFLIGHT)
     68#define DLOPEN_PREFLIGHT(path) dlopen_preflight(FileSystem::realPath(path##_s).utf8().data())
     69#else
     70#define DLOPEN_PREFLIGHT(path) dlopen_preflight(path)
     71#endif
     72
    6673#define SOFT_LINK_FRAMEWORK_OPTIONAL_PREFLIGHT(framework) \
    6774    static bool framework##LibraryIsAvailable() \
    6875    { \
    69         static bool frameworkLibraryIsAvailable = dlopen_preflight("/System/Library/Frameworks/" #framework ".framework/" #framework); \
     76        static bool frameworkLibraryIsAvailable = DLOPEN_PREFLIGHT("/System/Library/Frameworks/" #framework ".framework/" #framework); \
    7077        return frameworkLibraryIsAvailable; \
    7178    }
Note: See TracChangeset for help on using the changeset viewer.