content/base/public/nsIScriptLoaderObserver.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: C++; 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 interface nsIScriptElement;
     9 interface nsIURI;
    11 [scriptable, uuid(7b787204-76fb-4764-96f1-fb7a666db4f4)]
    12 interface nsIScriptLoaderObserver : nsISupports {
    14   /**
    15    * The script is available for evaluation. For inline scripts, this
    16    * method will be called synchronously. For externally loaded scripts,
    17    * this method will be called when the load completes.
    18    *
    19    * @param aResult A result code representing the result of loading
    20    *        a script. If this is a failure code, script evaluation
    21    *        will not occur.
    22    * @param aElement The element being processed.
    23    * @param aIsInline Is this an inline script or externally loaded?
    24    * @param aURI What is the URI of the script (the document URI if
    25    *        it is inline).
    26    * @param aLineNo At what line does the script appear (generally 1
    27    *        if it is a loaded script).
    28    */
    29   void scriptAvailable(in nsresult aResult, 
    30                        in nsIScriptElement aElement,
    31                        in boolean aIsInline,
    32                        in nsIURI aURI,
    33                        in int32_t aLineNo);
    35   /**
    36    * The script has been evaluated.
    37    *
    38    * @param aResult A result code representing the success or failure of
    39    *        the script evaluation.
    40    * @param aElement The element being processed.
    41    * @param aIsInline Is this an inline script or externally loaded?
    42    */
    43   void scriptEvaluated(in nsresult aResult, 
    44                        in nsIScriptElement aElement,
    45                        in boolean aIsInline);
    47 };

mercurial