Name Description Size
ActorsChild.cpp Constants **************************************************************************** 119837
ActorsChild.h 25042
ActorsParent.cpp 814524
ActorsParent.h 2281
crashtests 5
FileInfo.cpp static 4499
FileInfo.h 2056
FileManager.h 2994
FileSnapshot.cpp aActorDestroyedNormally 12324
FileSnapshot.h 5089
IDBCursor.cpp 25971
IDBCursor.h 5371
IDBDatabase.cpp 36625
IDBDatabase.h 7664
IDBEvents.cpp 2928
IDBEvents.h 3452
IDBFactory.cpp 27529
IDBFactory.h 7095
IDBFileHandle.cpp aWrapAsDOMRequest 18494
IDBFileHandle.h 6997
IDBFileRequest.cpp 3311
IDBFileRequest.h 2455
IDBIndex.cpp 17527
IDBIndex.h aKeysOnly 6231
IDBKeyRange.cpp 10002
IDBKeyRange.h 4692
IDBMutableFile.cpp 6386
IDBMutableFile.h 2964
IDBObjectStore.cpp 76711
IDBObjectStore.h 11144
IDBRequest.cpp 15262
IDBRequest.h 6423
IDBResult.h 5594
IDBTransaction.cpp 30671
IDBTransaction.h 8967
IndexedDatabase.h 3283
IndexedDatabaseInlines.h 3630
IndexedDatabaseManager.cpp 29775
IndexedDatabaseManager.h 5148
Key.cpp Here's how we encode keys: Basic strategy is the following Numbers: 0x10 n n n n n n n n ("n"s are encoded 64bit float) Dates: 0x20 n n n n n n n n ("n"s are encoded 64bit float) Strings: 0x30 s s s ... 0 ("s"s are encoded unicode bytes) Binaries: 0x40 s s s ... 0 ("s"s are encoded unicode bytes) Arrays: 0x50 i i i ... 0 ("i"s are encoded array items) When encoding floats, 64bit IEEE 754 are almost sortable, except that positive sort lower than negative, and negative sort descending. So we use the following encoding: value < 0 ? (-to64bitInt(value)) : (to64bitInt(value) | 0x8000000000000000) When encoding strings, we use variable-size encoding per the following table Chars 0 - 7E are encoded as 0xxxxxxx with 1 added Chars 7F - (3FFF+7F) are encoded as 10xxxxxx xxxxxxxx with 7F subtracted Chars (3FFF+80) - FFFF are encoded as 11xxxxxx xxxxxxxx xx000000 This ensures that the first byte is never encoded as 0, which means that the string terminator (per basic-strategy table) sorts before any character. The reason that (3FFF+80) - FFFF is encoded "shifted up" 6 bits is to maximize the chance that the last character is 0. See below for why. When encoding binaries, the algorithm is the same to how strings are encoded. Since each octet in binary is in the range of [0-255], it'll take 1 to 2 encoded unicode bytes. When encoding Arrays, we use an additional trick. Rather than adding a byte containing the value 0x50 to indicate type, we instead add 0x50 to the next byte. This is usually the byte containing the type of the first item in the array. So simple examples are ["foo"] 0x80 s s s 0 0 // 0x80 is 0x30 + 0x50 [1, 2] 0x60 n n n n n n n n 1 n n n n n n n n 0 // 0x60 is 0x10 + 0x50 Whe do this iteratively if the first item in the array is also an array [["foo"]] 0xA0 s s s 0 0 0 However, to avoid overflow in the byte, we only do this 3 times. If the first item in an array is an array, and that array also has an array as first item, we simply write out the total value accumulated so far and then follow the "normal" rules. [[["foo"]]] 0xF0 0x30 s s s 0 0 0 0 There is another edge case that can happen though, which is that the array doesn't have a first item to which we can add 0x50 to the type. Instead the next byte would normally be the array terminator (per basic-strategy table) so we simply add the 0x50 there. [[]] 0xA0 0 // 0xA0 is 0x50 + 0x50 + 0 [] 0x50 // 0x50 is 0x50 + 0 [[], "foo"] 0xA0 0x30 s s s 0 0 // 0xA0 is 0x50 + 0x50 + 0 Note that the max-3-times rule kicks in before we get a chance to add to the array terminator [[[]]] 0xF0 0 0 0 // 0xF0 is 0x50 + 0x50 + 0x50 As a final optimization we do a post-encoding step which drops all 0s at the end of the encoded buffer. "foo" // 0x30 s s s 1 // 0x10 bf f0 ["a", "b"] // 0x80 s 0 0x30 s [1, 2] // 0x60 bf f0 0 0 0 0 0 0 0x10 c0 [[]] // 0x80 28633
Key.h 12205
KeyPath.cpp 16529
KeyPath.h 2968
moz.build 2850
nsIIDBPermissionsRequest.idl Interface for IDB permission requests. This is passed as the subject for the permission request observer service notifications. 856
PBackgroundIDBCursor.ipdl 2083
PBackgroundIDBDatabase.ipdl 2300
PBackgroundIDBDatabaseFile.ipdl 481
PBackgroundIDBDatabaseRequest.ipdl 710
PBackgroundIDBFactory.ipdl 1429
PBackgroundIDBFactoryRequest.ipdl 981
PBackgroundIDBRequest.ipdl 3642
PBackgroundIDBSharedTypes.ipdlh 5918
PBackgroundIDBTransaction.ipdl 976
PBackgroundIDBVersionChangeTransaction.ipdl 1711
PBackgroundIndexedDBUtils.ipdl 947
PermissionRequestBase.cpp aExpireTime 6558
PermissionRequestBase.h 2225
ProfilerHelpers.h 14552
ReportInternalError.cpp no IDB in private window 1069
ReportInternalError.h Don't evaluate |res| more than once 2310
ScriptErrorHelper.cpp aSourceLine 6626
ScriptErrorHelper.h nsIScriptError::xxxFlag 1295
SerializationHelpers.h 2930
test 186