Changeset 85070 in webkit


Ignore:
Timestamp:
Apr 27, 2011 11:52:09 AM (13 years ago)
Author:
psolanki@apple.com
Message:

Part of WebCore should use CFNetwork-based loader on Mac
https://bugs.webkit.org/show_bug.cgi?id=51836

Reviewed by Antti Koivisto.

  • Configurations/WebCore.xcconfig: Add location of CFNetwork.framework.
  • platform/mac/SoftLinking.h:
  • platform/network/cf/CookieJarCFNet.cpp: Soft-link in CFNetwork functions on Mac.
Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r85069 r85070  
     12011-04-27  Pratik Solanki  <psolanki@apple.com>
     2
     3        Reviewed by Antti Koivisto.
     4
     5        Part of WebCore should use CFNetwork-based loader on Mac
     6        https://bugs.webkit.org/show_bug.cgi?id=51836
     7
     8        * Configurations/WebCore.xcconfig: Add location of CFNetwork.framework.
     9        * platform/mac/SoftLinking.h:
     10        * platform/network/cf/CookieJarCFNet.cpp: Soft-link in CFNetwork functions on Mac.
     11
    1122011-04-27  Nikolas Zimmermann  <nzimmermann@rim.com>
    213
  • trunk/Source/WebCore/Configurations/WebCore.xcconfig

    r85037 r85070  
    4242FRAMEWORK_SEARCH_PATHS_iphoneos_Production = $(PRODUCTION_FRAMEWORKS_DIR);
    4343FRAMEWORK_SEARCH_PATHS_iphonesimulator = $(FRAMEWORK_SEARCH_PATHS_iphoneos_$(CONFIGURATION));
    44 FRAMEWORK_SEARCH_PATHS_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(FRAMEWORK_SEARCH_PATHS);
     44FRAMEWORK_SEARCH_PATHS_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks $(FRAMEWORK_SEARCH_PATHS);
    4545
    4646HEADER_SEARCH_PATHS = ForwardingHeaders icu /usr/include/libxslt /usr/include/libxml2 $(SQLITE3_HEADER_SEARCH_PATHS) "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore" "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
  • trunk/Source/WebCore/platform/mac/SoftLinking.h

    r37941 r85070  
    4646    }
    4747
     48#define SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA(framework) \
     49    static void* framework##Library() \
     50    { \
     51        static void* frameworkLibrary = dlopen("/System/Library/Frameworks/CoreServices.framework/Frameworks/" #framework ".framework/" #framework, RTLD_NOW); \
     52        ASSERT(frameworkLibrary); \
     53        return frameworkLibrary; \
     54    }
     55
    4856#define SOFT_LINK(framework, functionName, resultType, parameterDeclarations, parameterNames) \
    4957    static resultType init##functionName parameterDeclarations; \
     
    6068    {\
    6169        return softLink##functionName parameterNames; \
     70    }
     71
     72/* callingConvention is unused on Mac but is here to keep the macro prototype the same between Mac and Windows. */
     73#define SOFT_LINK_OPTIONAL(framework, functionName, resultType, callingConvention, parameterDeclarations) \
     74    typedef resultType (*functionName##PtrType) parameterDeclarations; \
     75    \
     76    static functionName##PtrType functionName##Ptr() \
     77    { \
     78        static functionName##PtrType ptr = reinterpret_cast<functionName##PtrType>(dlsym(framework##Library(), #functionName)); \
     79        return ptr; \
    6280    }
    6381
  • trunk/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp

    r79729 r85070  
    3838#include <CFNetwork/CFHTTPCookiesPriv.h>
    3939#include <CoreFoundation/CoreFoundation.h>
     40
     41#if PLATFORM(WIN)
    4042#include <WebKitSystemInterface/WebKitSystemInterface.h>
    4143#include <windows.h>
     44#endif
    4245
    4346namespace WebCore {
     
    4649static const CFStringRef s_cookieCF = CFSTR("Cookie");
    4750
     51#if PLATFORM(WIN)
    4852#ifdef DEBUG_ALL
    4953SOFT_LINK_DEBUG_LIBRARY(CFNetwork)
    5054#else
    5155SOFT_LINK_LIBRARY(CFNetwork)
     56#endif
     57#else
     58SOFT_LINK_FRAMEWORK_IN_CORESERVICES_UMBRELLA(CFNetwork)
    5259#endif
    5360
Note: See TracChangeset for help on using the changeset viewer.