Skip to content

Commit d38ca63

Browse files
Fix build warnings in WebCore/Modules/indexeddb/server/IDBSerialization.cp
https://bugs.webkit.org/show_bug.cgi?id=165070 Reviewed by Brady Eidson. * Modules/indexeddb/server/IDBSerialization.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@208984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent e995e9d commit d38ca63

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

Source/WebCore/ChangeLog

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2016-11-26 Csaba Osztrogonác <[email protected]>
2+
3+
Fix build warnings in WebCore/Modules/indexeddb/server/IDBSerialization.cp
4+
https://bugs.webkit.org/show_bug.cgi?id=165070
5+
6+
Reviewed by Brady Eidson.
7+
8+
* Modules/indexeddb/server/IDBSerialization.cpp:
9+
110
2016-11-26 Sam Weinig <[email protected]>
211

312
Convert IntersectionObserver over to using RuntimeEnabledFeatures so it can be properly excluded from script

Source/WebCore/Modules/indexeddb/server/IDBSerialization.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ bool deserializeIDBKeyPath(const uint8_t* data, size_t size, Optional<IDBKeyPath
9696

9797
// This is the magic character that begins serialized PropertyLists, and tells us whether
9898
// the key we're looking at is an old-style key.
99+
#if USE(CF)
99100
static const uint8_t LegacySerializedKeyVersion = 'b';
101+
#endif
100102

101103
// FIXME: Linux ports uses KeyedEncoderGlib for their IDBKeys.
102104
// 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:
134136

135137
// FIXME: If the GLib magic character ends up being 0x00, we should consider changing
136138
// this 0x00 so we can support Glib keyed encoding, also.
139+
#if USE(CF)
137140
static const uint8_t SIDBKeyVersion = 0x00;
138141
enum class SIDBKeyType : uint8_t {
139142
Min = 0x00,
@@ -168,6 +171,7 @@ static SIDBKeyType serializedTypeForKeyType(IndexedDB::KeyType type)
168171

169172
RELEASE_ASSERT_NOT_REACHED();
170173
}
174+
#endif
171175

172176
#if CPU(BIG_ENDIAN) || CPU(MIDDLE_ENDIAN) || CPU(NEEDS_ALIGNED_ACCESS)
173177
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
206210
}
207211
#endif
208212

213+
#if USE(CF)
209214
static void writeDouble(Vector<char>& data, double d)
210215
{
211216
writeLittleEndian(data, *reinterpret_cast<uint64_t*>(&d));
@@ -264,6 +269,7 @@ static void encodeKey(Vector<char>& data, const IDBKeyData& key)
264269
break;
265270
}
266271
}
272+
#endif
267273

268274
RefPtr<SharedBuffer> serializeIDBKeyData(const IDBKeyData& key)
269275
{
@@ -281,6 +287,7 @@ RefPtr<SharedBuffer> serializeIDBKeyData(const IDBKeyData& key)
281287

282288
}
283289

290+
#if USE(CF)
284291
static bool decodeKey(const uint8_t*& data, const uint8_t* end, IDBKeyData& result)
285292
{
286293
if (!data || data >= end)
@@ -381,6 +388,7 @@ static bool decodeKey(const uint8_t*& data, const uint8_t* end, IDBKeyData& resu
381388
return false;
382389
}
383390
}
391+
#endif
384392

385393
bool deserializeIDBKeyData(const uint8_t* data, size_t size, IDBKeyData& result)
386394
{

0 commit comments

Comments
 (0)