From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- netwerk/cache2/nsICachePurgeLock.idl | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 netwerk/cache2/nsICachePurgeLock.idl (limited to 'netwerk/cache2/nsICachePurgeLock.idl') diff --git a/netwerk/cache2/nsICachePurgeLock.idl b/netwerk/cache2/nsICachePurgeLock.idl new file mode 100644 index 0000000000..fcd4b4afee --- /dev/null +++ b/netwerk/cache2/nsICachePurgeLock.idl @@ -0,0 +1,33 @@ +/* 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 "nsISupports.idl" + +/** + * This object is a wrapper of MultiInstanceLock. + * It's intended to be used to ensure exclusive access to folders being + * deleted by the purgeHTTPCache background task. + */ +[scriptable,uuid(8abb21e3-c6a0-4b4d-9333-cc0d72f2c23b)] +interface nsICachePurgeLock : nsISupports { + /** + * Initializes the lock using the profile name and the current process's + * path. + * Will throw if a lock was already acquired successfully. + */ + void lock(in AUTF8String profileName); + + /** + * Returns true if another instance also holds the lock. + * Throws if called before lock was called, or after unlock was called. + */ + bool isOtherInstanceRunning(); + + /** + * Releases the lock. + * This object may be locked again, potentially using a different path + * after unlocking. + */ + void unlock(); +}; -- cgit v1.2.3