From 10c6da3a4c19eb83ad23dddea223c86f4cf02b5f Mon Sep 17 00:00:00 2001 From: "rginda%netscape.com" Date: Wed, 25 Apr 2001 18:22:49 +0000 Subject: [PATCH] - not built - move from pc as a ulong to pc as an object wrapped around a uword relocate jsdService constructor to jsd_xpp.cpp in order to initialize the global service git-svn-id: svn://10.0.0.236/trunk@93077 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/jsd/jsd_xpc.h | 45 ++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/mozilla/js/jsd/jsd_xpc.h b/mozilla/js/jsd/jsd_xpc.h index 359d8020b29..c1a596f0ea3 100644 --- a/mozilla/js/jsd/jsd_xpc.h +++ b/mozilla/js/jsd/jsd_xpc.h @@ -85,6 +85,35 @@ class jsdContext : public jsdIContext JSDContext *mCx; }; +class jsdPC : public jsdIPC +{ + public: + NS_DECL_ISUPPORTS + NS_DECL_JSDIPC + + /* you'll normally use use FromPtr() instead of directly constructing one */ + jsdPC (jsuword aPC) : mPC(aPC) + { + NS_INIT_ISUPPORTS(); + } + + static jsdIPC *FromPtr (jsuword aPC) + { + if (!aPC) + return 0; + + jsdIPC *rv = new jsdPC (aPC); + NS_IF_ADDREF(rv); + return rv; + } + + private: + jsdPC(); /* no implementation */ + jsdPC(const jsdPC&); /* no implementation */ + + jsuword mPC; +}; + class jsdObject : public jsdIObject { public: @@ -113,10 +142,11 @@ class jsdObject : public jsdIObject jsdObject(); /* no implementation */ jsdObject(const jsdObject&); /* no implementation */ - JSDContext *mCx; - JSDObject *mObject; + JSDContext *mCx; + JSDObject *mObject; }; + class jsdProperty : public jsdIProperty { public: @@ -322,17 +352,14 @@ class jsdService : public jsdIDebuggerService NS_DECL_ISUPPORTS NS_DECL_JSDIDEBUGGERSERVICE - jsdService() : mNestedLoopLevel(0), mJSrt(0), mJSDcx(0), mDebugBreakHook(0), - mDebuggerHook(0), mInterruptHook(0), mScriptHook(0) - { - NS_INIT_ISUPPORTS(); - } + jsdService(); virtual ~jsdService() { } private: + PRBool mOn; PRUint32 mNestedLoopLevel; - JSRuntime *mJSrt; - JSDContext *mJSDcx; + JSDContext *mCx; + nsCOMPtr mBreakpointHook; nsCOMPtr mDebugBreakHook; nsCOMPtr mDebuggerHook; nsCOMPtr mInterruptHook;