+108
-8
lines changedFilter options
+108
-8
lines changed Original file line number Diff line number Diff line change
@@ -32,7 +32,19 @@
32
32
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 */
38
50
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
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
3
21
Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture.
Original file line number Diff line number Diff line change
@@ -37,7 +37,15 @@
37
37
#import <wtf/Assertions.h>
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)
43
51
#import <wtf/ios/WebCoreThread.h>
Original file line number Diff line number Diff line change
@@ -31,7 +31,13 @@
31
31
#import <dispatch/dispatch.h>
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;
37
43
OBJC_CLASS NSString;
Original file line number Diff line number Diff line change
@@ -32,11 +32,38 @@
32
32
#import <wtf/Assertions.h>
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
42
69
namespace Inspector {
@@ -96,12 +123,12 @@
96
123
if (m_connection) {
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
}
107
134
@@ -170,7 +197,7 @@
170
197
if (!xpcDictionary)
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);
176
203
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
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
3
19
BPLATFORM(IOS) always evaluates to false
Original file line number Diff line number Diff line change
@@ -38,4 +38,8 @@
38
38
#define BPLATFORM_IOS 1
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
Original file line number Diff line number Diff line change
@@ -26,11 +26,21 @@
26
26
#ifndef PerThread_h
27
27
#define PerThread_h
28
28
29
+
#include "BPlatform.h"
29
30
#include "Inline.h"
30
31
#include <mutex>
31
32
#include <pthread.h>
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
36
46
namespace bmalloc {
@@ -53,8 +63,7 @@ class Cache;
53
63
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.
60
69
@@ -90,7 +99,7 @@ template<typename T> __thread void* PerThreadStorage<T>::object;
90
99
template<typename T> pthread_key_t PerThreadStorage<T>::key;
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>
96
105
INLINE T* PerThread<T>::getFastCase()
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4