Bug 1874684 - Part 6: Limit day length calculations to safe integers. r=mgaudet
[gecko.git] / dom / storage / PBackgroundSessionStorageCache.ipdl
blob35f06f43ec987e76084f73b9b4f1e72815d293ac
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 include protocol PBackground;
6 include protocol PBackgroundSessionStorageManager;
7 include PBackgroundSharedTypes;
9 namespace mozilla {
10 namespace dom {
12 struct SSSetItemInfo
14   nsString key;
15   nsString value;
18 struct SSRemoveItemInfo
20   nsString key;
23 struct SSClearInfo
27 /**
28  * Union of SessionStorage mutation types.
29  */
30 union SSWriteInfo
32   SSSetItemInfo;
33   SSRemoveItemInfo;
34   SSClearInfo;
37 struct SSCacheCopy {
38   nsCString originKey;
39   PrincipalInfo principalInfo;
40   SSSetItemInfo[] data;
43 [ChildImpl=virtual, ParentImpl=virtual]
44 sync protocol PBackgroundSessionStorageCache
46  manager PBackgroundSessionStorageManager;
48  parent:
49   async DeleteMe();
51   /**
52     * Copy SessionStorageCache from the parent process to the content process.
53     * See SessionStorageManager documentation for more details.
54     *
55     * This needs to be synchronous because SessionStorage's semantics are
56     * synchronous. Note that the BackgroundSessionStorageManager in the
57     * PBackground parent already has the answers to this request immediately
58     * available without needing to consult any other threads or perform any I/O.
59     */
60   sync Load()
61        returns (SSSetItemInfo[] aData);
63   /**
64    * Send changes for SessionStorageCache from a content process to the parent
65    * process so that the data in the parent can be updated to be in sync with
66    * the content. See SessionStorageManager documentation for more details.
67    */
68   async Checkpoint(SSWriteInfo[] aWriteInfos);
70  child:
71    async __delete__();
74 } // namespace dom
75 } // namespace mozilla