xpcom/components/nsIFactory.idl

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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.

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

mercurial