js/xpconnect/idl/nsIXPCSecurityManager.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsISupports.idl"
     9 [ptr] native nsAXPCNativeCallContextPtr(nsAXPCNativeCallContext);
    11 %{ C++
    12 #include "jspubtd.h"
    14 class nsAXPCNativeCallContext;
    15 %}
    17 interface nsIClassInfo;
    19 [ptr] native JSContextPtr(JSContext);
    20 [ptr] native JSObjectPtr(JSObject);
    21 [ptr] native JSStackFramePtr(JSStackFrame);
    23 [uuid(d4d21714-116b-4851-a785-098c5dfea523)]
    24 interface nsIXPCSecurityManager : nsISupports
    25 {
    26     /**
    27     * For each of these hooks returning NS_OK means 'let the action continue'.
    28     * Returning an error code means 'veto the action'. XPConnect will return
    29     * false to the js engine if the action is vetoed. The implementor of this
    30     * interface is responsible for setting a JS exception into the JSContext
    31     * if that is appropriate.
    32     */
    34     void CanCreateWrapper(in JSContextPtr aJSContext,
    35                           in nsIIDRef aIID,
    36                           in nsISupports aObj,
    37                           in nsIClassInfo aClassInfo);
    39     void CanCreateInstance(in JSContextPtr aJSContext,
    40                            in nsCIDRef aCID);
    42     void CanGetService(in JSContextPtr aJSContext,
    43                        in nsCIDRef aCID);
    44 };

mercurial