js/xpconnect/idl/nsIJSRuntimeService.idl

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:2fd80b3cfed5
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/. */
6
7 #include "nsISupports.idl"
8
9 [ptr] native JSRuntime(JSRuntime);
10 [ptr] native JSContext(JSContext);
11 native xpcGCCallback(xpcGCCallback);
12 native xpcContextCallback(xpcContextCallback);
13
14 %{C++
15
16 #include "jsapi.h" // for JSGCStatus
17
18 typedef void
19 (* xpcGCCallback)(JSGCStatus status);
20
21 typedef bool
22 (* xpcContextCallback)(JSContext* cx, unsigned operation);
23
24 %}
25
26 interface nsIBackstagePass;
27
28 [uuid( 2ac111f2-e492-488e-85df-353c453e98f3)]
29 interface nsIJSRuntimeService : nsISupports
30 {
31 readonly attribute JSRuntime runtime;
32
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);
39
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