js/xpconnect/idl/nsIJSRuntimeService.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 JSRuntime(JSRuntime);
    10 [ptr] native JSContext(JSContext);
    11 native xpcGCCallback(xpcGCCallback);
    12 native xpcContextCallback(xpcContextCallback);
    14 %{C++
    16 #include "jsapi.h"  // for JSGCStatus
    18 typedef void
    19 (* xpcGCCallback)(JSGCStatus status);
    21 typedef bool
    22 (* xpcContextCallback)(JSContext* cx, unsigned operation);
    24 %}
    26 interface nsIBackstagePass;
    28 [uuid( 2ac111f2-e492-488e-85df-353c453e98f3)]
    29 interface nsIJSRuntimeService : nsISupports
    30 {
    31     readonly attribute JSRuntime        runtime;
    33     /**
    34      * Register additional GC callback which will run after the
    35      * standard XPConnect callback.
    36      */
    37     [noscript, notxpcom] void registerGCCallback(in xpcGCCallback func);
    38     [noscript, notxpcom] void unregisterGCCallback(in xpcGCCallback func);
    40     /**
    41      * Register additional context callback which will run after the
    42      * standard XPConnect callback.
    43      */
    44     [noscript, notxpcom] void registerContextCallback(in xpcContextCallback func);
    45     [noscript, notxpcom] void unregisterContextCallback(in xpcContextCallback func);
    46 };

mercurial