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"
15 // CHANGING THE ORDER/PLACEMENT OF EXISTING ENUM VALUES MAY BREAK INDEXEDDB.
16 // PROCEED WITH EXTREME CAUTION.
17 enum StructuredCloneTags
{
18 SCTAG_BASE
= JS_SCTAG_USER_MIN
,
22 // This tag is obsolete and exists only for backwards compatibility with
23 // existing IndexedDB databases.
24 SCTAG_DOM_FILE_WITHOUT_LASTMODIFIEDDATE
,
27 SCTAG_DOM_MUTABLEFILE
,
32 // New IDB tags go here!
34 // These tags are used for both main thread and workers.
36 SCTAG_DOM_MAP_MESSAGEPORT
,
40 // This tag is for WebCrypto keys
41 SCTAG_DOM_WEBCRYPTO_KEY
,
43 SCTAG_DOM_NULL_PRINCIPAL
,
44 SCTAG_DOM_SYSTEM_PRINCIPAL
,
45 SCTAG_DOM_CONTENT_PRINCIPAL
,
47 SCTAG_DOM_IMAGEBITMAP
,
49 SCTAG_DOM_RTC_CERTIFICATE
,
53 // This tag is for OffscreenCanvas.
56 SCTAG_DOM_EXPANDED_PRINCIPAL
,
60 // This tag is used by both main thread and workers.
61 SCTAG_DOM_URLSEARCHPARAMS
,
63 SCTAG_DOM_INPUTSTREAM
,
65 SCTAG_DOM_STRUCTURED_CLONE_HOLDER
,
67 // When adding a new tag for IDB, please don't add it to the end of the list!
68 // Tags that are supported by IDB must not ever change. See the static assert
69 // in IDBObjectStore.cpp, method CommonStructuredCloneReadCallback.
70 // Adding to the end of the list would make removing of other tags harder in
75 SCTAG_DOM_STRUCTURED_CLONE_TESTER
,
77 // Principal written out by worker threads when serializing objects. When
78 // reading on the main thread this principal will be converted to a normal
79 // principal object using nsJSPrincipals::AutoSetActiveWorkerPrincipal.
80 SCTAG_DOM_WORKER_PRINCIPAL
84 } // namespace mozilla
86 #endif // StructuredCloneTags_h__