@@ -96,7 +96,9 @@ bool deserializeIDBKeyPath(const uint8_t* data, size_t size, Optional<IDBKeyPath
96
96
97
97
// This is the magic character that begins serialized PropertyLists, and tells us whether
98
98
// the key we're looking at is an old-style key.
99
+ #if USE(CF)
99
100
static const uint8_t LegacySerializedKeyVersion = ' b' ;
101
+ #endif
100
102
101
103
// FIXME: Linux ports uses KeyedEncoderGlib for their IDBKeys.
102
104
// When a Glib maintainer comes along to enable the new serialization they'll need to
@@ -134,6 +136,7 @@ Type specific serialization formats are as follows for each of the types:
134
136
135
137
// FIXME: If the GLib magic character ends up being 0x00, we should consider changing
136
138
// this 0x00 so we can support Glib keyed encoding, also.
139
+ #if USE(CF)
137
140
static const uint8_t SIDBKeyVersion = 0x00 ;
138
141
enum class SIDBKeyType : uint8_t {
139
142
Min = 0x00 ,
@@ -168,6 +171,7 @@ static SIDBKeyType serializedTypeForKeyType(IndexedDB::KeyType type)
168
171
169
172
RELEASE_ASSERT_NOT_REACHED ();
170
173
}
174
+ #endif
171
175
172
176
#if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN) || CPU(NEEDS_ALIGNED_ACCESS)
173
177
template <typename T> static void writeLittleEndian (Vector<char >& buffer, T value)
@@ -206,6 +210,7 @@ template <typename T> static bool readLittleEndian(const uint8_t*& ptr, const ui
206
210
}
207
211
#endif
208
212
213
+ #if USE(CF)
209
214
static void writeDouble (Vector<char >& data, double d)
210
215
{
211
216
writeLittleEndian (data, *reinterpret_cast <uint64_t *>(&d));
@@ -264,6 +269,7 @@ static void encodeKey(Vector<char>& data, const IDBKeyData& key)
264
269
break ;
265
270
}
266
271
}
272
+ #endif
267
273
268
274
RefPtr<SharedBuffer> serializeIDBKeyData (const IDBKeyData& key)
269
275
{
@@ -281,6 +287,7 @@ RefPtr<SharedBuffer> serializeIDBKeyData(const IDBKeyData& key)
281
287
282
288
}
283
289
290
+ #if USE(CF)
284
291
static bool decodeKey (const uint8_t *& data, const uint8_t * end, IDBKeyData& result)
285
292
{
286
293
if (!data || data >= end)
@@ -381,6 +388,7 @@ static bool decodeKey(const uint8_t*& data, const uint8_t* end, IDBKeyData& resu
381
388
return false ;
382
389
}
383
390
}
391
+ #endif
384
392
385
393
bool deserializeIDBKeyData (const uint8_t * data, size_t size, IDBKeyData& result)
386
394
{
0 commit comments