From bc4cd3c716ff3ddaf2cf987b1aaaceec85efd537 Mon Sep 17 00:00:00 2001 From: "rginda%netscape.com" Date: Tue, 17 Apr 2001 08:50:41 +0000 Subject: [PATCH] moving xpcom wrapper from extensions/venkman/src/ and idl/ to here. git-svn-id: svn://10.0.0.236/trunk@92539 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/jsd/Makefile.in | 10 +- mozilla/js/jsd/idl/Makefile.in | 47 ++++ mozilla/js/jsd/idl/jsdIDebuggerService.idl | 132 +++++++++ mozilla/js/jsd/idl/makefile.win | 44 +++ mozilla/js/jsd/jsd_xpc.cpp | 308 +++++++++++++++++++++ mozilla/js/jsd/jsd_xpc.h | 169 +++++++++++ 6 files changed, 708 insertions(+), 2 deletions(-) create mode 100644 mozilla/js/jsd/idl/Makefile.in create mode 100644 mozilla/js/jsd/idl/jsdIDebuggerService.idl create mode 100644 mozilla/js/jsd/idl/makefile.win create mode 100644 mozilla/js/jsd/jsd_xpc.cpp create mode 100644 mozilla/js/jsd/jsd_xpc.h diff --git a/mozilla/js/jsd/Makefile.in b/mozilla/js/jsd/Makefile.in index 62aff5cbc20..8e0510caa10 100644 --- a/mozilla/js/jsd/Makefile.in +++ b/mozilla/js/jsd/Makefile.in @@ -31,8 +31,6 @@ include $(DEPTH)/config/autoconf.mk MODULE = jsdebug LIBRARY_NAME = jsd -DIRS += jsdb - REQUIRES = java js EXPORTS = jsdebug.h @@ -55,6 +53,14 @@ CSRCS = \ jsd_val.c \ $(NULL) +ifdef JSD_STANDALONE +DIRS += jsdb +else +DIRS += idl +CPPSRCS = jsd_xpc.cpp +IS_COMPONENT = 1 +endif + ifndef MOZ_JSD CSRCS += jsdstubs.c jsd_java.c diff --git a/mozilla/js/jsd/idl/Makefile.in b/mozilla/js/jsd/idl/Makefile.in new file mode 100644 index 00000000000..aa8e41f7ccf --- /dev/null +++ b/mozilla/js/jsd/idl/Makefile.in @@ -0,0 +1,47 @@ +# +# 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. +# +# The Original Code is mozilla.org code +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation +# Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU Public License (the "GPL"), in which case the +# provisions of the GPL are applicable instead of those above. +# If you wish to allow use of your version of this file only +# under the terms of the GPL and not to allow others to use your +# version of this file under the MPL, indicate your decision by +# deleting the provisions above and replace them with the notice +# and other provisions required by the GPL. If you do not delete +# the provisions above, a recipient may use your version of this +# file under either the MPL or the GPL. +# +# Contributor(s): +# +# + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = jsdservice + +XPIDLSRCS = \ + jsdIDebuggerService.idl \ + $(NULL) + +include $(topsrcdir)/config/rules.mk diff --git a/mozilla/js/jsd/idl/jsdIDebuggerService.idl b/mozilla/js/jsd/idl/jsdIDebuggerService.idl new file mode 100644 index 00000000000..51dc5c2ced1 --- /dev/null +++ b/mozilla/js/jsd/idl/jsdIDebuggerService.idl @@ -0,0 +1,132 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * 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. + * + * The Original Code is mozilla.org code + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation + * Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU Public License (the "GPL"), in which case the + * provisions of the GPL are applicable instead of those above. + * If you wish to allow use of your version of this file only + * under the terms of the GPL and not to allow others to use your + * version of this file under the MPL, indicate your decision by + * deleting the provisions above and replace them with the notice + * and other provisions required by the GPL. If you do not delete + * the provisions above, a recipient may use your version of this + * file under either the MPL or the GPL. + * + * Contributor(s): + * + * + */ + +#include "nsISupports.idl" + +%{ C++ +#include "jsdebug.h" +%} + +[ptr] native JSDContext(JSDContext); +[ptr] native JSDScript(JSDScript); +[ptr] native JSDThreadState(JSDThreadState); + +/* +[scriptable, uuid(e7c8ea2c-1dd1-11b2-9242-f2768e04e92e)] +interface jsdIHandle : nsISupports +{ + [noscript] readonly attribute voidPtr data; +}; +*/ + +[scriptable, uuid(a2dd25a4-1dd1-11b2-bda6-ed525acd4c35)] +interface jsdIContext : nsISupports +{ + [noscript] readonly attribute JSDContext JSDContext; +}; + +[scriptable, uuid(d500e8b8-1dd1-11b2-89a1-cdf55d91cbbd)] +interface jsdIObject : nsISupports +{}; + +[scriptable, uuid(b8816e56-1dd1-11b2-81dc-8ba99a833d9e)] +interface jsdIProperty : nsISupports +{}; + +[scriptable, uuid(a38f65ca-1dd1-11b2-95d5-ff2947e9c920)] +interface jsdIScript : nsISupports +{ + [noscript] readonly attribute JSDScript JSDScript; + + readonly attribute boolean isActive; + readonly attribute wstring fileName; + readonly attribute wstring functionName; + readonly attribute unsigned long baseLineNumber; + readonly attribute unsigned long lineExtent; +}; + +[scriptable, uuid(a47adad2-1dd1-11b2-b9e9-8e67a47beca5)] +interface jsdISourceText : nsISupports +{}; + +[scriptable, uuid(b6d50784-1dd1-11b2-a932-882246c6fe45)] +interface jsdIStackFrameInfo : nsISupports +{}; + +[scriptable, uuid(b6d1c006-1dd1-11b2-b9d8-b4d1ccfb74d8)] +interface jsdIThreadState : nsISupports +{ + [noscript] readonly attribute JSDThreadState JSDThreadState; +}; + +[scriptable, uuid(b7964304-1dd1-11b2-ba20-cf4205772e9d)] +interface jsdIValue : nsISupports +{}; + +[scriptable, uuid(ae89a7e2-1dd1-11b2-8c2f-af82086291a5)] +interface jsdIScriptHook : nsISupports +{ + void onScriptLoaded (in jsdIContext aCx, in jsdIScript aScript, + in boolean aCreating); + +}; + +[scriptable, uuid(9a7b6ad0-1dd1-11b2-a789-fcfae96356a2)] +interface jsdIExecutionHook : nsISupports +{ + const unsigned long RETURN_HOOK_ERROR = 0; + const unsigned long RETURN_CONTINUE = 1; + const unsigned long RETURN_ABORT = 2; + const unsigned long RETURN_RET_WITH_VAL = 3; + const unsigned long RETURN_THROW_WITH_VAL = 4; + const unsigned long RETURN_CONTINUE_THROW = 5; + + unsigned long onExecute (in jsdIContext aCx, + in jsdIThreadState aThreadState, + in unsigned long aType, out nsISupports rval); +}; + +[scriptable, uuid(01be7f9a-1dd2-11b2-9d55-aaf919b27c73)] +interface jsdIDebuggerService : nsISupports +{ + void init (); + + attribute jsdIExecutionHook debugBreakHook; + attribute jsdIExecutionHook debuggerHook; + attribute jsdIExecutionHook interruptHook; + attribute jsdIScriptHook scriptHook; + +}; + diff --git a/mozilla/js/jsd/idl/makefile.win b/mozilla/js/jsd/idl/makefile.win new file mode 100644 index 00000000000..67836232059 --- /dev/null +++ b/mozilla/js/jsd/idl/makefile.win @@ -0,0 +1,44 @@ +# +# 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. +# +# The Original Code is mozilla.org code +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation +# Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU Public License (the "GPL"), in which case the +# provisions of the GPL are applicable instead of those above. +# If you wish to allow use of your version of this file only +# under the terms of the GPL and not to allow others to use your +# version of this file under the MPL, indicate your decision by +# deleting the provisions above and replace them with the notice +# and other provisions required by the GPL. If you do not delete +# the provisions above, a recipient may use your version of this +# file under either the MPL or the GPL. +# +# Contributor(s): +# +# + +DEPTH = ..\..\.. + +include <$(DEPTH)/config/config.mak> + +MODULE = jsdservice + +XPIDLSRCS = \ + jsdIDebuggerService.idl \ + $(NULL) + +include <$(DEPTH)/config/rules.mk> diff --git a/mozilla/js/jsd/jsd_xpc.cpp b/mozilla/js/jsd/jsd_xpc.cpp new file mode 100644 index 00000000000..41b72f465e6 --- /dev/null +++ b/mozilla/js/jsd/jsd_xpc.cpp @@ -0,0 +1,308 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * 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. + * + * The Original Code is mozilla.org code + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation + * Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU Public License (the "GPL"), in which case the + * provisions of the GPL are applicable instead of those above. + * If you wish to allow use of your version of this file only + * under the terms of the GPL and not to allow others to use your + * version of this file under the MPL, indicate your decision by + * deleting the provisions above and replace them with the notice + * and other provisions required by the GPL. If you do not delete + * the provisions above, a recipient may use your version of this + * file under either the MPL or the GPL. + * + * Contributor(s): + * + */ + +#include "jsd_xpc.h" + +#include "nsIXPConnect.h" +#include "nsIGenericFactory.h" +#include "nsIServiceManager.h" +#include "nsString.h" +#include "jsdebug.h" +#include "prmem.h" + +const char jsdServiceContractID[] = "@mozilla.org/js/jsd/debugger-service;1"; + +/******************************************************************************* + * reflected jsd data structures + *******************************************************************************/ + +NS_IMPL_THREADSAFE_ISUPPORTS1(jsdContext, jsdIContext); + +NS_IMETHODIMP +jsdContext::GetJSDContext(JSDContext **_rval) +{ + if (!_rval) + return NS_ERROR_NULL_POINTER; + + *_rval = mCx; + return NS_OK; +} + +NS_IMPL_THREADSAFE_ISUPPORTS1(jsdScript, jsdIScript); + +NS_IMETHODIMP +jsdScript::GetJSDScript(JSDScript **_rval) +{ + if (!_rval) + return NS_ERROR_NULL_POINTER; + + *_rval = mScript; + return NS_OK; +} + +NS_IMETHODIMP +jsdScript::GetIsActive(PRBool *_rval) +{ + if (!_rval) + return NS_ERROR_NULL_POINTER; + + *_rval = JSD_IsActiveScript(mCx, mScript); + return NS_OK; +} + +NS_IMETHODIMP +jsdScript::GetFileName(PRUnichar **_rval) +{ + if (!_rval) + return NS_ERROR_NULL_POINTER; + + *_rval = nsCString(JSD_GetScriptFilename(mCx, mScript)).ToNewUnicode(); + return NS_OK; +} + +NS_IMETHODIMP +jsdScript::GetFunctionName(PRUnichar **_rval) +{ + if (!_rval) + return NS_ERROR_NULL_POINTER; + + *_rval = nsCString(JSD_GetScriptFunctionName(mCx, mScript)).ToNewUnicode(); + return NS_OK; +} + +NS_IMETHODIMP +jsdScript::GetBaseLineNumber(PRUint32 *_rval) +{ + if (!_rval) + return NS_ERROR_NULL_POINTER; + + *_rval = JSD_GetScriptBaseLineNumber(mCx, mScript); + return NS_OK; +} + +NS_IMETHODIMP +jsdScript::GetLineExtent(PRUint32 *_rval) +{ + if (!_rval) + return NS_ERROR_NULL_POINTER; + + *_rval = JSD_GetScriptLineExtent(mCx, mScript); + return NS_OK; +} + +NS_IMPL_THREADSAFE_ISUPPORTS1(jsdThreadState, jsdIThreadState); + +NS_IMETHODIMP +jsdThreadState::GetJSDThreadState(JSDThreadState **_rval) +{ + if (!_rval) + return NS_ERROR_NULL_POINTER; + + *_rval = mThreadState; + return NS_OK; +} + +/****************************************************************************** + * debugger service implementation + ******************************************************************************/ +NS_IMPL_THREADSAFE_ISUPPORTS1(jsdService, jsdIDebuggerService); + +static void +jsds_SetContextProc (JSDContext* jsdc, void* user) +{ + printf ("jsds_SetContextProc: called.\n"); +} + +static PRUint32 +jsds_ExecutionHookProc (JSDContext* jsdc, JSDThreadState* jsdthreadstate, + uintN type, void* callerdata, jsval* rval) +{ + NS_PRECONDITION (callerdata, "no callerdata for jsds_ExecutionHookProc."); + + jsdIExecutionHook *hook = NS_STATIC_CAST(jsdIExecutionHook *, callerdata); + nsISupports *is_rv = 0; + + PRUint32 hook_rv = JSD_HOOK_RETURN_CONTINUE; + + hook->OnExecute (jsdContext::FromPtr(jsdc), + jsdThreadState::FromPtr(jsdthreadstate), + type, &is_rv, &hook_rv); + return hook_rv; +} + +static void +jsds_ScriptHookProc (JSDContext* jsdc, JSDScript* jsdscript, JSBool creating, + void* callerdata) +{ + if (!callerdata) + return; + + jsdIScriptHook *hook = NS_STATIC_CAST(jsdIScriptHook *, callerdata); + hook->OnScriptLoaded (jsdContext::FromPtr(jsdc), + jsdScript::FromPtr(jsdc, jsdscript), + creating ? PR_TRUE : PR_FALSE); +} + +NS_IMETHODIMP +jsdService::Init (void) +{ + nsresult rv; + + /* get JS things from the CallContext */ + nsCOMPtr xpc = do_GetService(nsIXPConnect::GetCID()); + if (!xpc) return NS_ERROR_FAILURE; + + nsCOMPtr cc; + rv = xpc->GetCurrentNativeCallContext(getter_AddRefs(cc)); + if (NS_FAILED(rv)) return NS_ERROR_FAILURE; + + JSContext *cx; + rv = cc->GetJSContext (&cx); + if (NS_FAILED(rv)) return NS_ERROR_FAILURE; + + mJSrt = JS_GetRuntime (cx); + JSD_UserCallbacks jsd_uc; + jsd_uc.size = sizeof(JSD_UserCallbacks); + jsd_uc.setContext = jsds_SetContextProc; + + mJSDcx = JSD_DebuggerOnForUser (mJSrt, &jsd_uc, NULL); + + return NS_OK; +} + +/* hook attribute get/set functions */ + +NS_IMETHODIMP +jsdService::SetDebugBreakHook (jsdIExecutionHook *aHook) +{ + mDebugBreakHook = aHook; + if (aHook) + JSD_SetDebugBreakHook (mJSDcx, jsds_ExecutionHookProc, + NS_STATIC_CAST(void *, aHook)); + else + JSD_ClearDebugBreakHook (mJSDcx); + + return NS_OK; +} + +NS_IMETHODIMP +jsdService::GetDebugBreakHook (jsdIExecutionHook **aHook) +{ + if (!aHook) + return NS_ERROR_NULL_POINTER; + + *aHook = mDebugBreakHook; + NS_IF_ADDREF(*aHook); + + return NS_OK; +} + +NS_IMETHODIMP +jsdService::SetDebuggerHook (jsdIExecutionHook *aHook) +{ + mDebuggerHook = aHook; + if (aHook) + JSD_SetDebuggerHook (mJSDcx, jsds_ExecutionHookProc, + NS_STATIC_CAST(void *, aHook)); + else + JSD_ClearDebuggerHook (mJSDcx); + + return NS_OK; +} + +NS_IMETHODIMP +jsdService::GetDebuggerHook (jsdIExecutionHook **aHook) +{ + if (!aHook) + return NS_ERROR_NULL_POINTER; + + *aHook = mDebuggerHook; + NS_IF_ADDREF(*aHook); + + return NS_OK; +} + +NS_IMETHODIMP +jsdService::SetInterruptHook (jsdIExecutionHook *aHook) +{ + mInterruptHook = aHook; + if (aHook) + JSD_SetInterruptHook (mJSDcx, jsds_ExecutionHookProc, + NS_STATIC_CAST(void *, aHook)); + else + JSD_ClearInterruptHook (mJSDcx); + + return NS_OK; +} + +NS_IMETHODIMP +jsdService::GetInterruptHook (jsdIExecutionHook **aHook) +{ + if (!aHook) + return NS_ERROR_NULL_POINTER; + + *aHook = mInterruptHook; + NS_IF_ADDREF(*aHook); + + return NS_OK; +} + +NS_IMETHODIMP +jsdService::SetScriptHook (jsdIScriptHook *aHook) +{ + mScriptHook = aHook; + return NS_OK; +} + +NS_IMETHODIMP +jsdService::GetScriptHook (jsdIScriptHook **aHook) +{ + if (!aHook) + return NS_ERROR_NULL_POINTER; + + *aHook = mScriptHook; + NS_IF_ADDREF(*aHook); + + return NS_OK; +} + +NS_GENERIC_FACTORY_CONSTRUCTOR(jsdService); + +static nsModuleComponentInfo components[] = { + { "JSDService", JSDSERVICE_CID, + jsdServiceContractID, + jsdServiceConstructor}, +}; + +NS_IMPL_NSGETMODULE("JavaScript Debugger", components); diff --git a/mozilla/js/jsd/jsd_xpc.h b/mozilla/js/jsd/jsd_xpc.h new file mode 100644 index 00000000000..34aa09b69a3 --- /dev/null +++ b/mozilla/js/jsd/jsd_xpc.h @@ -0,0 +1,169 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * 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. + * + * The Original Code is mozilla.org code + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation + * Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. + * + * Alternatively, the contents of this file may be used under the + * terms of the GNU Public License (the "GPL"), in which case the + * provisions of the GPL are applicable instead of those above. + * If you wish to allow use of your version of this file only + * under the terms of the GPL and not to allow others to use your + * version of this file under the MPL, indicate your decision by + * deleting the provisions above and replace them with the notice + * and other provisions required by the GPL. If you do not delete + * the provisions above, a recipient may use your version of this + * file under either the MPL or the GPL. + * + * Contributor(s): + * + * + */ + +#ifndef JSDSERVICE_H___ +#define JSDSERVICE_H___ + +#include "jsdIDebuggerService.h" +#include "jsdebug.h" +#include "nsCOMPtr.h" + +/******************************************************************************* + * reflected jsd data structures + *******************************************************************************/ + +class jsdThreadState : public jsdIThreadState +{ + public: + NS_DECL_ISUPPORTS + NS_DECL_JSDITHREADSTATE + + /* you'll normally use use FromPtr() instead of directly constructing one */ + jsdThreadState (JSDThreadState *aThreadState) : mThreadState(aThreadState) + { + NS_INIT_ISUPPORTS(); + } + + /* XXX keep track of these somehow, so we don't create new wrapper if we've + * got one already */ + static jsdIThreadState *FromPtr (JSDThreadState *aThreadState) + { + jsdIThreadState *rv = new jsdThreadState (aThreadState); + NS_IF_ADDREF(rv); + return rv; + } + + private: + jsdThreadState(); /* no implementation */ + jsdThreadState(const jsdThreadState&); /* no implementation */ + + JSDThreadState *mThreadState; +}; + +class jsdContext : public jsdIContext +{ + public: + NS_DECL_ISUPPORTS + NS_DECL_JSDICONTEXT + + /* you'll normally use use FromPtr() instead of directly constructing one */ + jsdContext (JSDContext *aCx) : mCx(aCx) + { + NS_INIT_ISUPPORTS(); + printf ("++++++ jsdContext: %i\n", mRefCnt); + } + + /* XXX keep track of these somehow, so we don't create new wrapper if we've + * got one already */ + static jsdIContext *FromPtr (JSDContext *aCx) + { + jsdIContext *rv = new jsdContext (aCx); + NS_IF_ADDREF(rv); + return rv; + } + + virtual ~jsdContext() { printf ("------ ~jsdContext: %i\n", mRefCnt); } + private: + jsdContext(); /* no implementation */ + jsdContext(const jsdContext&); /* no implementation */ + + JSDContext *mCx; +}; + +class jsdScript : public jsdIScript +{ + public: + NS_DECL_ISUPPORTS + NS_DECL_JSDISCRIPT + + /* you'll normally use use FromPtr() instead of directly constructing one */ + jsdScript (JSDContext *aCx, JSDScript *aScript) : mCx(aCx), mScript(aScript) + { + NS_INIT_ISUPPORTS(); + } + + /* XXX keep track of these somehow, so we don't create new wrapper if we've + * got one already */ + static jsdIScript *FromPtr (JSDContext *aCx, JSDScript *aScript) + { + jsdIScript *rv = new jsdScript (aCx, aScript); + NS_IF_ADDREF(rv); + return rv; + } + + private: + jsdScript(); /* no implementation */ + jsdScript (const jsdScript&); /* no implementation */ + + JSDContext *mCx; + JSDScript *mScript; +}; + +/****************************************************************************** + * debugger service + ******************************************************************************/ + +#define JSDSERVICE_CID \ +{ /* f1299dc2-1dd1-11b2-a347-ee6b7660e048 */ \ + 0xf1299dc2, \ + 0x1dd1, \ + 0x11b2, \ + {0xa3, 0x47, 0xee, 0x6b, 0x76, 0x60, 0xe0, 0x48} \ +} + +class jsdService : public jsdIDebuggerService +{ + public: + NS_DECL_ISUPPORTS + NS_DECL_JSDIDEBUGGERSERVICE + + jsdService() : mJSrt(0), mJSDcx(0), mDebugBreakHook(0), mDebuggerHook(0), + mInterruptHook(0), mScriptHook(0) + { + NS_INIT_ISUPPORTS(); + } + virtual ~jsdService() { } + + private: + JSRuntime *mJSrt; + JSDContext *mJSDcx; + nsCOMPtr mDebugBreakHook; + nsCOMPtr mDebuggerHook; + nsCOMPtr mInterruptHook; + nsCOMPtr mScriptHook; +}; + +#endif /* JSDSERVICE_H___ */ +