Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | /** |
michael@0 | 9 | * A class factory allows the creation of nsISupports derived |
michael@0 | 10 | * components without specifying a concrete base class. |
michael@0 | 11 | */ |
michael@0 | 12 | |
michael@0 | 13 | [scriptable, object, uuid(00000001-0000-0000-c000-000000000046)] |
michael@0 | 14 | interface nsIFactory : nsISupports { |
michael@0 | 15 | /** |
michael@0 | 16 | * Creates an instance of a component. |
michael@0 | 17 | * |
michael@0 | 18 | * @param aOuter Pointer to a component that wishes to be aggregated |
michael@0 | 19 | * in the resulting instance. This will be nullptr if no |
michael@0 | 20 | * aggregation is requested. |
michael@0 | 21 | * @param iid The IID of the interface being requested in |
michael@0 | 22 | * the component which is being currently created. |
michael@0 | 23 | * @param result [out] Pointer to the newly created instance, if successful. |
michael@0 | 24 | * @throws NS_NOINTERFACE - Interface not accessible. |
michael@0 | 25 | * @throws NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but the |
michael@0 | 26 | * component is not aggregatable. |
michael@0 | 27 | * NS_ERROR* - Method failure. |
michael@0 | 28 | */ |
michael@0 | 29 | void createInstance(in nsISupports aOuter, in nsIIDRef iid, |
michael@0 | 30 | [retval, iid_is(iid)] out nsQIResult result); |
michael@0 | 31 | |
michael@0 | 32 | /** |
michael@0 | 33 | * LockFactory provides the client a way to keep the component |
michael@0 | 34 | * in memory until it is finished with it. The client can call |
michael@0 | 35 | * LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE) |
michael@0 | 36 | * to release the factory. |
michael@0 | 37 | * |
michael@0 | 38 | * @param lock - Must be PR_TRUE or PR_FALSE |
michael@0 | 39 | * @throws NS_ERROR* - Method failure. |
michael@0 | 40 | */ |
michael@0 | 41 | void lockFactory(in boolean lock); |
michael@0 | 42 | }; |