dom/base/nsIScriptChannel.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: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     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  * An interface representing a channel which will have to execute some sort of
    10  * program provided via its URI to compute the data it should return.
    11  *
    12  * If a channel implements this interface, the execution of the program in
    13  * question will be restricted in the following ways:
    14  *
    15  * - If the channel does not have an owner principal, the program will not be
    16  *   executed at all, no matter what.  This is necessary because in this
    17  *   circumstance we have no way to tell whether script execution is allowed at
    18  *   all for the originating security context of this channel. 
    19  * - If the channel has an owner principal, how it is executed is controlled by
    20  *   this interface.  However if the owner principal does not subsume the
    21  *   principal of the environment in which the program is to be executed the
    22  *   execution will be forced to happen in a sandbox.
    23  */
    24 [scriptable, uuid(33234b99-9588-4c7d-9da6-86b8b7cba565)]
    25 interface nsIScriptChannel : nsISupports
    26 {
    27   /**
    28    * Possible ways of executing the program.
    29    */
    31   /**
    32    * Don't execute at all.
    33    */
    34   const unsigned long NO_EXECUTION = 0;
    36   /**
    37    * Execute in a sandbox, no matter how the various principals involved are
    38    * related to each other.
    39    */
    40   const unsigned long EXECUTE_IN_SANDBOX = 1;
    42   /**
    43    * Execute against the target environment if the principals allow it.
    44    */
    45   const unsigned long EXECUTE_NORMAL = 2;
    47   /**
    48    * Whether and how the program represented by this channel is to be executed.
    49    * The default value if this property has never been set on this channel MUST
    50    * be either EXECUTE_IN_SANDBOX or NO_EXECUTION.
    51    *
    52    * @throws NS_ERROR_INVALID_ARG when set to an unrecognized value.
    53    */
    54   attribute unsigned long executionPolicy;
    56   /**
    57    * Control whether the program should be executed synchronosly when
    58    * the channel's AsyncOpen method is called or whether it should be
    59    * executed asynchronously.  In both cases, any data that the
    60    * channel returns will be returned asynchronously; the only thing
    61    * this property affects is when the program executes.
    62    *
    63    * The default value of this property is TRUE.
    64    *
    65    * Setting this property after asyncOpen has been called on the
    66    * channel has no effect.
    67    */
    68   attribute boolean executeAsync;   
    69 };

mercurial