Bug 1842773 - Part 5: Add ArrayBuffer.prototype.{maxByteLength,resizable} getters...
[gecko.git] / dom / base / StructuredCloneTags.h
blob95233c62d7d2260ea270783bb5c08fed0b700635
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef StructuredCloneTags_h__
8 #define StructuredCloneTags_h__
10 #include "js/StructuredClone.h"
12 namespace mozilla::dom {
14 // CHANGING THE ORDER/PLACEMENT OF EXISTING ENUM VALUES MAY BREAK INDEXEDDB.
15 // PROCEED WITH EXTREME CAUTION.
17 // If you are planning to add new tags which could be used by IndexedDB,
18 // consider to use empty slots. See EMPTY_SLOT_x
19 enum StructuredCloneTags : uint32_t {
20 SCTAG_BASE = JS_SCTAG_USER_MIN,
22 // IMPORTANT: Don't change the order of these enum values. You could break
23 // IDB.
24 SCTAG_DOM_BLOB,
25 // IMPORTANT: Don't change the order of these enum values. You could break
26 // IDB.
27 // This tag is obsolete and exists only for backwards compatibility with
28 // existing IndexedDB databases.
29 SCTAG_DOM_FILE_WITHOUT_LASTMODIFIEDDATE,
30 // IMPORTANT: Don't change the order of these enum values. You could break
31 // IDB.
32 SCTAG_DOM_FILELIST,
33 // IMPORTANT: Don't change the order of these enum values. You could break
34 // IDB.
35 SCTAG_DOM_MUTABLEFILE,
36 // IMPORTANT: Don't change the order of these enum values. You could break
37 // IDB.
38 SCTAG_DOM_FILE,
39 // IMPORTANT: Don't change the order of these enum values. You could break
40 // IDB.
41 SCTAG_DOM_WASM_MODULE,
43 // IMPORTANT: Don't change the order of these enum values. You could break
44 // IDB.
45 SCTAG_DOM_IMAGEDATA,
47 SCTAG_DOM_DOMPOINT,
48 SCTAG_DOM_DOMPOINTREADONLY,
50 // IMPORTANT: Don't change the order of these enum values. You could break
51 // IDB.
52 // This tag is for WebCrypto keys
53 SCTAG_DOM_CRYPTOKEY,
55 // IMPORTANT: Don't change the order of these enum values. You could break
56 // IDB.
57 SCTAG_DOM_NULL_PRINCIPAL,
58 // IMPORTANT: Don't change the order of these enum values. You could break
59 // IDB.
60 SCTAG_DOM_SYSTEM_PRINCIPAL,
61 // IMPORTANT: Don't change the order of these enum values. You could break
62 // IDB.
63 SCTAG_DOM_CONTENT_PRINCIPAL,
65 // IMPORTANT: Don't change the order of these enum values. You could break
66 // IDB.
67 SCTAG_DOM_DOMQUAD,
69 // IMPORTANT: Don't change the order of these enum values. You could break
70 // IDB.
71 SCTAG_DOM_RTCCERTIFICATE,
73 // IMPORTANT: Don't change the order of these enum values. You could break
74 // IDB.
75 SCTAG_DOM_DOMRECT,
76 // IMPORTANT: Don't change the order of these enum values. You could break
77 // IDB.
78 SCTAG_DOM_DOMRECTREADONLY,
80 // IMPORTANT: Don't change the order of these enum values. You could break
81 // IDB.
82 SCTAG_DOM_EXPANDED_PRINCIPAL,
84 // IMPORTANT: Don't change the order of these enum values. You could break
85 // IDB.
86 SCTAG_DOM_DOMMATRIX,
88 // IMPORTANT: Don't change the order of these enum values. You could break
89 // IDB.
90 SCTAG_DOM_URLSEARCHPARAMS,
92 // IMPORTANT: Don't change the order of these enum values. You could break
93 // IDB.
94 SCTAG_DOM_DOMMATRIXREADONLY,
96 // IMPORTANT: Don't change the order of these enum values. You could break
97 // IDB.
98 SCTAG_DOM_DOMEXCEPTION,
100 // IMPORTANT: Don't change the order of these enum values. You could break
101 // IDB.
102 EMPTY_SLOT_9,
104 // IMPORTANT: Don't change the order of these enum values. You could break
105 // IDB.
106 SCTAG_DOM_STRUCTUREDCLONETESTER,
108 // IMPORTANT: Don't change the order of these enum values. You could break
109 // IDB.
110 SCTAG_DOM_FILESYSTEMHANDLE,
112 // IMPORTANT: Don't change the order of these enum values. You could break
113 // IDB.
114 SCTAG_DOM_FILESYSTEMFILEHANDLE,
116 // IMPORTANT: Don't change the order of these enum values. You could break
117 // IDB.
118 SCTAG_DOM_FILESYSTEMDIRECTORYHANDLE,
120 // If you are planning to add new tags which could be used by IndexedDB,
121 // consider to use an empty slot. See EMPTY_SLOT_x
123 // Please update the static assertions in StructuredCloneHolder.cpp and in
124 // IDBObjectStore.cpp, method CommonStructuredCloneReadCallback.
126 // --------------------------------------------------------------------------
128 // All the following tags are not written to disk and they are not used by
129 // IndexedDB directly or via
130 // StructuredCloneHolder::{Read,Write}FullySerializableObjects. In theory they
131 // can be 'less' stable.
133 SCTAG_DOM_IMAGEBITMAP,
134 SCTAG_DOM_MAP_MESSAGEPORT,
135 SCTAG_DOM_FORMDATA,
137 // This tag is for OffscreenCanvas.
138 SCTAG_DOM_CANVAS,
140 SCTAG_DOM_DIRECTORY,
142 SCTAG_DOM_INPUTSTREAM,
144 SCTAG_DOM_STRUCTURED_CLONE_HOLDER,
146 SCTAG_DOM_BROWSING_CONTEXT,
148 SCTAG_DOM_CLONED_ERROR_OBJECT,
150 SCTAG_DOM_READABLESTREAM,
152 SCTAG_DOM_WRITABLESTREAM,
154 SCTAG_DOM_TRANSFORMSTREAM,
156 SCTAG_DOM_VIDEOFRAME,
158 SCTAG_DOM_ENCODEDVIDEOCHUNK,
160 // IMPORTANT: If you plan to add an new IDB tag, it _must_ be add before the
161 // "less stable" tags!
164 } // namespace mozilla::dom
166 #endif // StructuredCloneTags_h__