js/xpconnect/idl/nsIXPCSecurityManager.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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