2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
[ptr] native JSRuntime(JSRuntime);
|
2013-08-03 16:55:39 -07:00
|
|
|
[ptr] native JSContext(JSContext);
|
2013-07-09 07:28:15 -07:00
|
|
|
native xpcGCCallback(xpcGCCallback);
|
2013-08-03 16:55:39 -07:00
|
|
|
native xpcContextCallback(xpcContextCallback);
|
2013-07-09 07:28:15 -07:00
|
|
|
|
|
|
|
%{C++
|
|
|
|
|
2013-08-17 15:50:18 -07:00
|
|
|
#include "jsapi.h" // for JSGCStatus
|
|
|
|
|
2013-07-09 07:28:15 -07:00
|
|
|
typedef void
|
|
|
|
(* xpcGCCallback)(JSGCStatus status);
|
|
|
|
|
2013-08-03 16:55:39 -07:00
|
|
|
typedef bool
|
|
|
|
(* xpcContextCallback)(JSContext* cx, unsigned operation);
|
|
|
|
|
2013-07-09 07:28:15 -07:00
|
|
|
%}
|
2009-11-17 11:51:46 -08:00
|
|
|
|
2013-04-04 02:27:38 -07:00
|
|
|
interface nsIBackstagePass;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-08-03 16:55:39 -07:00
|
|
|
[uuid( 2ac111f2-e492-488e-85df-353c453e98f3)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIJSRuntimeService : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute JSRuntime runtime;
|
2009-11-17 11:51:46 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Register additional GC callback which will run after the
|
|
|
|
* standard XPConnect callback.
|
|
|
|
*/
|
2013-07-09 07:28:15 -07:00
|
|
|
[noscript, notxpcom] void registerGCCallback(in xpcGCCallback func);
|
|
|
|
[noscript, notxpcom] void unregisterGCCallback(in xpcGCCallback func);
|
2013-08-03 16:55:39 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Register additional context callback which will run after the
|
|
|
|
* standard XPConnect callback.
|
|
|
|
*/
|
|
|
|
[noscript, notxpcom] void registerContextCallback(in xpcContextCallback func);
|
|
|
|
[noscript, notxpcom] void unregisterContextCallback(in xpcContextCallback func);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|