gecko-dev/js/xpconnect/idl/nsIJSRuntimeService.idl

61 строка
2.4 KiB
Plaintext
Исходник Обычный вид История

2001-09-20 04:02:59 +04:00
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1999-09-04 23:25:15 +04:00
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
1999-09-04 23:25:15 +04:00
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
1999-09-04 23:25:15 +04:00
*
2001-09-20 04:02:59 +04:00
* The Original Code is Mozilla Communicator client code, released
* March 31, 1998.
Lots of xpconnect bug fixes... - fix bug 12954 "should throw when setting non-settable props". - fix bug 13418 "xpconnect needs to be threadsafe". I think I filled in the cracks. Tests would be nice :) - fix bug 22802 "[MLK] XPConnect Leaks". - fix bug 24119 "[MLK] Reminder about cleaning up maps". - fix bug 24453 "xpconnect needs default security manager". I also changed the code in DOM and caps to just install a default secman and not install a secman for each JSContext. - fix bug 24687 "xpconect should avoid resolve performance suckage". Added (modified) patch from shaver to create my JSObjects with the global object as the temporary proto to avoid losing lookup. - hack for bug 24688 "runtime errors in wrapped JS are not made obvious" Added a debug only printf. We still need a JSErrorConsole service for this. - fix bug 16130 "createInstanace and getService can create wrappers around wrappers" Fixing this one really entailed changing the semantics of nsIXPConnect::wrapNative and nsIXPConnect::wrapJS to use common code in xpcconvert that deals with existing wrappers and DOM objects (with their own schemes for wrapping and unwrapping). So, I changed the callers because the params changed slightly and some callers were doing more work than necessary given the new semantics. - Continued in the crusade to replace manaual refcounting with nsCOMPtrs whenever touching old code. - Added myself as first contributor to xpconnect files (vanity prevails!) - Added new copyright header on some files that were missing it. - Added some API comments. - Converted nsXPCWrappedJS to implement nsIXPConnectWrappedJS via MI rather than the old loser scheme of the nsIXPConnectWrappedJSMethods tearoff object. - added DumpJSStack as globals to xpconnect and DOM dlls to be callable from debuggers. I have ideas on how to improve and expand this support soon. r=mccabe
2000-01-26 11:38:10 +03:00
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1999
* the Initial Developer. All Rights Reserved.
Lots of xpconnect bug fixes... - fix bug 12954 "should throw when setting non-settable props". - fix bug 13418 "xpconnect needs to be threadsafe". I think I filled in the cracks. Tests would be nice :) - fix bug 22802 "[MLK] XPConnect Leaks". - fix bug 24119 "[MLK] Reminder about cleaning up maps". - fix bug 24453 "xpconnect needs default security manager". I also changed the code in DOM and caps to just install a default secman and not install a secman for each JSContext. - fix bug 24687 "xpconect should avoid resolve performance suckage". Added (modified) patch from shaver to create my JSObjects with the global object as the temporary proto to avoid losing lookup. - hack for bug 24688 "runtime errors in wrapped JS are not made obvious" Added a debug only printf. We still need a JSErrorConsole service for this. - fix bug 16130 "createInstanace and getService can create wrappers around wrappers" Fixing this one really entailed changing the semantics of nsIXPConnect::wrapNative and nsIXPConnect::wrapJS to use common code in xpcconvert that deals with existing wrappers and DOM objects (with their own schemes for wrapping and unwrapping). So, I changed the callers because the params changed slightly and some callers were doing more work than necessary given the new semantics. - Continued in the crusade to replace manaual refcounting with nsCOMPtrs whenever touching old code. - Added myself as first contributor to xpconnect files (vanity prevails!) - Added new copyright header on some files that were missing it. - Added some API comments. - Converted nsXPCWrappedJS to implement nsIXPConnectWrappedJS via MI rather than the old loser scheme of the nsIXPConnectWrappedJSMethods tearoff object. - added DumpJSStack as globals to xpconnect and DOM dlls to be callable from debuggers. I have ideas on how to improve and expand this support soon. r=mccabe
2000-01-26 11:38:10 +03:00
*
* Contributor(s):
Lots of xpconnect bug fixes... - fix bug 12954 "should throw when setting non-settable props". - fix bug 13418 "xpconnect needs to be threadsafe". I think I filled in the cracks. Tests would be nice :) - fix bug 22802 "[MLK] XPConnect Leaks". - fix bug 24119 "[MLK] Reminder about cleaning up maps". - fix bug 24453 "xpconnect needs default security manager". I also changed the code in DOM and caps to just install a default secman and not install a secman for each JSContext. - fix bug 24687 "xpconect should avoid resolve performance suckage". Added (modified) patch from shaver to create my JSObjects with the global object as the temporary proto to avoid losing lookup. - hack for bug 24688 "runtime errors in wrapped JS are not made obvious" Added a debug only printf. We still need a JSErrorConsole service for this. - fix bug 16130 "createInstanace and getService can create wrappers around wrappers" Fixing this one really entailed changing the semantics of nsIXPConnect::wrapNative and nsIXPConnect::wrapJS to use common code in xpcconvert that deals with existing wrappers and DOM objects (with their own schemes for wrapping and unwrapping). So, I changed the callers because the params changed slightly and some callers were doing more work than necessary given the new semantics. - Continued in the crusade to replace manaual refcounting with nsCOMPtrs whenever touching old code. - Added myself as first contributor to xpconnect files (vanity prevails!) - Added new copyright header on some files that were missing it. - Added some API comments. - Converted nsXPCWrappedJS to implement nsIXPConnectWrappedJS via MI rather than the old loser scheme of the nsIXPConnectWrappedJSMethods tearoff object. - added DumpJSStack as globals to xpconnect and DOM dlls to be callable from debuggers. I have ideas on how to improve and expand this support soon. r=mccabe
2000-01-26 11:38:10 +03:00
* John Bandhauer <jband@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
1999-09-04 23:25:15 +04:00
#include "nsISupports.idl"
[ptr] native JSRuntime(JSRuntime);
native JSGCCallback(JSGCCallback);
interface nsIXPCScriptable;
1999-09-04 23:25:15 +04:00
[uuid(364bcec3-7034-4a4e-bff5-b3f796ca9771)]
1999-09-04 23:25:15 +04:00
interface nsIJSRuntimeService : nsISupports
{
readonly attribute JSRuntime runtime;
readonly attribute nsIXPCScriptable backstagePass;
/**
* Register additional GC callback which will run after the
* standard XPConnect callback.
*/
[noscript, notxpcom] void registerGCCallback(in JSGCCallback func);
[noscript, notxpcom] void unregisterGCCallback(in JSGCCallback func);
1999-09-04 23:25:15 +04:00
};