gecko-dev/dom/storage/PBackgroundLocalStorageCache.ipdl
Jan Varga 5f8daf01d9 Bug 1462162 - Filter local storage cache synchronization messages based on origin; r=asuth
This patch adds a new IPDL protocol PBackgroundLocalStorageCache. It is used by LocalStorageCache object to broadcast changes in local storage cache to other content processes. Each origin has its own PBackgroundLocalStorageCache, so now we can notify content processes that actually have a local storage cache for given origin. This greatly improves performance and reduces memory footprint especialy when local storage changes carry big strings and/or happen very quickly (before this patch all child processes were blindly notified).
2018-07-14 08:34:14 +02:00

42 lines
1.1 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include PBackgroundSharedTypes;
namespace mozilla {
namespace dom {
async protocol PBackgroundLocalStorageCache
{
manager PBackground;
parent:
async DeleteMe();
async Notify(nsString documentURI,
nsString key,
nsString oldValue,
nsString newValue);
child:
// The principalInfo and privateBrowsingId could instead be retained by the
// LocalStorageCacheChild/LocalStorageCache instead of being re-transmitted.
// However, these changes are a temporary optimization intended for uplift,
// and this constant factor overhead is very small compared to the upside of
// filtering.
async Observe(PrincipalInfo principalInfo,
uint32_t privateBrowsingId,
nsString documentURI,
nsString key,
nsString oldValue,
nsString newValue);
async __delete__();
};
} // namespace dom
} // namespace mozilla