Changeset 172532 in webkit
- Timestamp:
- Aug 13, 2014, 12:43:25 PM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSBase.h
r165676 r172532 33 33 #ifdef __OBJC__ 34 34 #import <Foundation/Foundation.h> 35 36 #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE 37 #if __has_include(<Foundation/NSMapTablePriv.h>) 38 #import <Foundation/NSMapTablePriv.h> 39 #else 40 extern "C" { 41 void *NSMapGet(NSMapTable *, const void *key); 42 void NSMapInsert(NSMapTable *, const void *key, const void *value); 43 void NSMapRemove(NSMapTable *, const void *key); 44 } 35 45 #endif 46 #endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE 47 #endif // __OBJC__ 36 48 37 49 /* JavaScript engine interface */ -
trunk/Source/JavaScriptCore/ChangeLog
r172503 r172532 1 2014-08-13 Daniel Bates <dabates@apple.com> 2 3 [iOS] Make JavaScriptCore and bmalloc build with the public SDK 4 https://bugs.webkit.org/show_bug.cgi?id=135848 5 6 Reviewed by Geoffrey Garen. 7 8 * API/JSBase.h: Declare NSMap functions with external linkage when building for iOS without the 9 header <Foundation/NSMapTablePriv.h>. 10 * inspector/remote/RemoteInspector.mm: Define XPC functions with external linkage when building 11 without the system header <xpc/xpc.h>. 12 * inspector/remote/RemoteInspectorXPCConnection.h: Define xpc_connection_t and xpc_object_t when building 13 without the system header <xpc/xpc.h>. 14 * inspector/remote/RemoteInspectorXPCConnection.mm: Declare XPC functions with external linkage when 15 building without without the system header <xpc/xpc.h>. 16 (Inspector::RemoteInspectorXPCConnection::closeOnQueue): Fix code style; use nullptr instead of NULL. 17 (Inspector::RemoteInspectorXPCConnection::sendMessage): Ditto. 18 1 19 2014-08-12 Peyton Randolph <prandolph@apple.com> 2 20 -
trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm
r170903 r172532 38 38 #import <wtf/NeverDestroyed.h> 39 39 #import <wtf/text/WTFString.h> 40 41 #if __has_include(<xpc/xpc.h>) 40 42 #import <xpc/xpc.h> 43 #else 44 extern "C" { 45 xpc_connection_t xpc_connection_create_mach_service(const char* name, dispatch_queue_t, uint64_t flags); 46 void xpc_release(xpc_object_t); 47 } 48 #endif 41 49 42 50 #if PLATFORM(IOS) -
trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.h
r166982 r172532 32 32 #import <mutex> 33 33 #import <wtf/ThreadSafeRefCounted.h> 34 35 #if __has_include(<xpc/xpc.h>) 34 36 #import <xpc/xpc.h> 37 #else 38 typedef void* xpc_connection_t; 39 typedef void* xpc_object_t; 40 #endif 35 41 36 42 OBJC_CLASS NSDictionary; -
trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorXPCConnection.mm
r166982 r172532 33 33 #import <wtf/Ref.h> 34 34 35 #if !__has_include(<xpc/xpc.h>) 36 extern "C" { 37 typedef void (^xpc_handler_t)(xpc_object_t); 38 void xpc_connection_cancel(xpc_connection_t); 39 void xpc_connection_resume(xpc_connection_t); 40 void xpc_connection_send_message(xpc_connection_t, xpc_object_t message); 41 void xpc_connection_set_event_handler(xpc_connection_t, xpc_handler_t); 42 void xpc_connection_set_target_queue(xpc_connection_t, dispatch_queue_t); 43 44 xpc_object_t xpc_retain(xpc_object_t); 45 void xpc_release(xpc_object_t); 46 47 typedef void* xpc_type_t; 48 xpc_type_t xpc_get_type(xpc_object_t); 49 50 void* XPC_ERROR_CONNECTION_INVALID; 51 void* XPC_TYPE_DICTIONARY; 52 void* XPC_TYPE_ERROR; 53 54 xpc_object_t xpc_dictionary_create(const char* const* keys, const xpc_object_t* values, size_t count); 55 xpc_object_t xpc_dictionary_get_value(xpc_object_t, const char* key); 56 void xpc_dictionary_set_value(xpc_object_t, const char* key, xpc_object_t value); 57 } 58 #endif 59 35 60 #if __has_include(<CoreFoundation/CFXPCBridge.h>) 36 61 #import <CoreFoundation/CFXPCBridge.h> 37 62 #else 38 extern "C" xpc_object_t _CFXPCCreateXPCMessageWithCFObject(CFTypeRef); 39 extern "C" CFTypeRef _CFXPCCreateCFObjectFromXPCMessage(xpc_object_t); 63 extern "C" { 64 xpc_object_t _CFXPCCreateXPCMessageWithCFObject(CFTypeRef); 65 CFTypeRef _CFXPCCreateCFObjectFromXPCMessage(xpc_object_t); 66 } 40 67 #endif 41 68 … … 97 124 xpc_connection_cancel(m_connection); 98 125 xpc_release(m_connection); 99 m_connection = NULL;126 m_connection = nullptr; 100 127 } 101 128 102 129 if (m_queue) { 103 130 dispatch_release(m_queue); 104 m_queue = NULL;131 m_queue = nullptr; 105 132 } 106 133 } … … 171 198 return; 172 199 173 xpc_object_t msg = xpc_dictionary_create( NULL, NULL, 0);200 xpc_object_t msg = xpc_dictionary_create(nullptr, nullptr, 0); 174 201 xpc_dictionary_set_value(msg, RemoteInspectorXPCConnectionSerializedMessageKey, xpcDictionary); 175 202 xpc_release(xpcDictionary); -
trunk/Source/bmalloc/ChangeLog
r172510 r172532 1 2014-08-13 Daniel Bates <dabates@apple.com> 2 3 [iOS] Make JavaScriptCore and bmalloc build with the public SDK 4 https://bugs.webkit.org/show_bug.cgi?id=135848 5 6 Reviewed by Geoffrey Garen. 7 8 * bmalloc/BPlatform.h: Added macro BPLATFORM_IOS_SIMULATOR, which evaluates to true 9 when building for the iOS Simulator. 10 * bmalloc/PerThread.h: Use pthread_machdep.h code path when building for iOS Simulator 11 using the public SDK. 12 (_pthread_setspecific_direct): Added; only defined when building for the iOS Simulator 13 using the public SDK. 14 (_pthread_getspecific_direct): Added; only defined when building for the iOS Simulator 15 using the public SDK. 16 1 17 2014-08-12 Daniel Bates <dabates@apple.com> 2 18 -
trunk/Source/bmalloc/bmalloc/BPlatform.h
r172510 r172532 39 39 #endif 40 40 41 #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR 42 #define BPLATFORM_IOS_SIMULATOR 1 43 #endif 44 41 45 #endif // BPlatform_h -
trunk/Source/bmalloc/bmalloc/PerThread.h
r166956 r172532 27 27 #define PerThread_h 28 28 29 #include "BPlatform.h" 29 30 #include "Inline.h" 30 31 #include <mutex> … … 32 33 #if defined(__has_include) && __has_include(<System/pthread_machdep.h>) 33 34 #include <System/pthread_machdep.h> 35 #elif BPLATFORM(IOS_SIMULATOR) 36 // FIXME: We shouldn't hardcode this constant as it can become out-of-date with the macro define of the same 37 // name in System/pthread_machdep.h. Instead, we should make PerThread work without C++ thread local storage. 38 // See <https://bugs.webkit.org/show_bug.cgi?id=135895> for more details. 39 const pthread_key_t __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 = 90; 40 41 INLINE int _pthread_setspecific_direct(pthread_key_t key, const void* value) { return pthread_setspecific(key, value); } 42 INLINE void* _pthread_getspecific_direct(pthread_key_t key) { return pthread_getspecific(key); } 43 extern "C" int pthread_key_init_np(int, void (*destructor)(void*)); 34 44 #endif 35 45 … … 54 64 template<typename T> struct PerThreadStorage; 55 65 56 #if defined(__has_include) && __has_include(<System/pthread_machdep.h>) 57 66 #if (defined(__has_include) && __has_include(<System/pthread_machdep.h>)) || BPLATFORM(IOS_SIMULATOR) 58 67 // For now, we only support PerThread<Cache>. We can expand to other types by 59 68 // using more keys. … … 91 100 template<typename T> std::once_flag PerThreadStorage<T>::onceFlag; 92 101 93 #endif // defined(__has_include) && __has_include(<System/pthread_machdep.h>)102 #endif // (defined(__has_include) && __has_include(<System/pthread_machdep.h>)) || BPLATFORM(IOS_SIMULATOR) 94 103 95 104 template<typename T>
Note:
See TracChangeset
for help on using the changeset viewer.