52 Commits

Author SHA1 Message Date
dbaron%fas.harvard.edu
acb32e9f60 Fix leaks of references to jsdService. r=rginda sr=alecf b=170194
git-svn-id: svn://10.0.0.236/trunk@133150 18797224-902f-48f8-a5cc-f745e15eee43
2002-11-06 12:59:21 +00:00
rginda%netscape.com
175c89a2ea bug 155838, "Infinite loop caused by strange code", r=peterv, sr=brendan, a=roc+moz@cs.cmu.edu
don't leave gDeadScripts pointing at garbage.  May or may not fix the problem at hand, but is an improvement in either case.


git-svn-id: svn://10.0.0.236/trunk@125124 18797224-902f-48f8-a5cc-f745e15eee43
2002-07-12 21:28:29 +00:00
rginda%netscape.com
977eaa489e fix build bustage, NS_IF_RELEASE the raw pointer, not the COM pointer.
git-svn-id: svn://10.0.0.236/trunk@123626 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 22:40:19 +00:00
rginda%netscape.com
de73e0dbca Bug 151803, "Debugger is leaking JSDValues", r=peterv, sr=jst
Stop caching jsdIValues, it doesn't seem to be worth the lookup cost.  This has the side effect of plugging the leak, as described in the bug.
also...
* Convert a few raw pointers to nsCOMPtrs
* Fix a bug where removing the last filter did not null out the list head,
causing a crash the next time filters were used.
* Track live jsdStackFrames, so we can invalidate them all when execution
continues.  Without this, only the top frame is properly invalidated, and any
other frame accessed after a continue will do Bad Things.
* Add some debugging prints to GetInitAtService, which seems to be failing at
random times.


git-svn-id: svn://10.0.0.236/trunk@123613 18797224-902f-48f8-a5cc-f745e15eee43
2002-06-19 21:56:23 +00:00
dougt%netscape.com
d6cc711878 Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756
git-svn-id: svn://10.0.0.236/trunk@121534 18797224-902f-48f8-a5cc-f745e15eee43
2002-05-15 18:55:21 +00:00
rginda%netscape.com
7ca6105a0a - venkman only -
bug 139883, "ErrorHookProc can be tricked into thinking it never finished running", r=peterv
fixes bad early return in jsds_ErrorHookProc
test for correct max params (12, not 8) in CreatePPLineMap
use nsnull instead of 0 for null pointer return value


git-svn-id: svn://10.0.0.236/trunk@120000 18797224-902f-48f8-a5cc-f745e15eee43
2002-04-26 20:57:35 +00:00
dbaron%fas.harvard.edu
772b5b8c58 Convert users of nsAReadable[C]String and nsAWritable[C]String typedefs to [const] nsA[C]String. b=131899 r=scc sr=jag a=asa
git-svn-id: svn://10.0.0.236/trunk@117354 18797224-902f-48f8-a5cc-f745e15eee43
2002-03-24 00:16:18 +00:00
rginda%netscape.com
741acbe78c part of bug 109652, "Venkman needs to profile" r=peterv,r=a=shaver
add profiling support.


git-svn-id: svn://10.0.0.236/trunk@115415 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-27 09:24:14 +00:00
rginda%netscape.com
2baaf83b8f bug 126365, "add options and private support to jsdIContext", sr=jst, r=jband
add jsdIContext::options and ::privateData attributes


git-svn-id: svn://10.0.0.236/trunk@115053 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-20 05:45:57 +00:00
rginda%netscape.com
02aacf2f31 bug 124717, need to wrap JSVAL_NULL for eval result, instead of just returning it unwrapped.
git-svn-id: svn://10.0.0.236/trunk@114681 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-16 10:53:52 +00:00
rginda%netscape.com
5f8367e018 bug 124474, "add native frame support to jsd"
sr=shaver, r=jband
add JSD_IsStackFrameNative, IsStackFrameDebugger, and IsStackFrameConstructing
add similar attributes to jsdIStackFrame
tweak return values in jsds_FilterHook
don't include dummy stack frames in threadstates

bug 110387, "Crash on exiting venkman"
check to see if the debugger was turned off before going through with an unPause.


git-svn-id: svn://10.0.0.236/trunk@114496 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-14 07:57:30 +00:00
rginda%netscape.com
1da965c1f6 bug 121039, "Need a way to unwrap jsdIValues", r=jband, sr=jst
adds jsdIValue::getWrappedValue() and jsdIService::wrapValue() methods to provid
e js scripts a way to convert between jsdIValues and "real" js values.
Also includes fix to not call breakpoint hook while paused, and changes jsdIFilt
er::glob attribute to jsdIFilter::globalObject, to match jsdIContext::globalObject


git-svn-id: svn://10.0.0.236/trunk@113854 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-07 00:59:55 +00:00
jst%netscape.com
a49bb992db Fixing bug 116834. Making element.innerHTML='...<script>...</script>...' not execute the script, this makes mozilla compatible with IE wrt innerHTML and execution of scripts. r=bzbarsky@mit.edu, sr=rpotts@netscape.com
git-svn-id: svn://10.0.0.236/trunk@113684 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 05:53:56 +00:00
rginda%netscape.com
f5f8993e60 changing a string constant, comenting out a DEBUG_rginda
use more descriptive url when compiling prettyprint changes


git-svn-id: svn://10.0.0.236/trunk@113259 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-31 00:37:28 +00:00
sfraser%netscape.com
67a35c1a08 Making the nsModuleComponentInfo data const; bug 74803. r=dp, sr=waterson
git-svn-id: svn://10.0.0.236/trunk@113225 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-30 21:14:20 +00:00
rginda%netscape.com
482526e770 bug 121318, sr=brendan,r=jst, "Venkman should disable the target window when stopped at a breakpoint".
implement the jsdIContext interface.
create only one jsdValue wrapper per unique jsval.
add executionContext property to jsdIStackFrame.
add enumerateContexts to jsdIDebuggerService.
add jsdIContextEnumerator interface.


git-svn-id: svn://10.0.0.236/trunk@113111 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 08:32:23 +00:00
rginda%netscape.com
cec41f9f3b fixing os/2 bustage, false vs PR_FALSE mixup
git-svn-id: svn://10.0.0.236/trunk@113107 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 07:20:59 +00:00
rginda%netscape.com
62e2418433 bug 121178, r=jst,sr=brendan, "jsdIStackFrame::eval signature needs to be changed"
return exception from jsdService::Eval if one occurs.


git-svn-id: svn://10.0.0.236/trunk@113101 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 06:15:58 +00:00
rginda%netscape.com
65e86f32aa bug 121192, sr=brendan,r=jst, "Add proper errorHook and debugHook to jsdIDebuggerService"
adds jsdIDebugHook interface, change the meaning of jsdIErrorHook.
error hook is called when an error occurs, and is given information about the error report.
debug hook is called when/if the error hook returns false, and is given information about the ececution state.


git-svn-id: svn://10.0.0.236/trunk@113100 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-29 05:56:02 +00:00
rginda%netscape.com
4f7eb8c3f2 bug 119865, crash exiting venkman, r=peterv, sr=brendan
use nsCOMPtr to avoid releasing a final reference via jsdScript::Invalidate()


git-svn-id: svn://10.0.0.236/trunk@112686 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 13:17:04 +00:00
jst%netscape.com
b9772d48fe Fixing bug 120899. Changing the NS_WARN_IF_FALSE() macro so that it can't be mis-used in optimized builds. This change makes the macro not usable in expressions that are supposed to be evaluated in release code since the macro now expands to nothing in non-debug builds. Also eliminate NS_VALIDATE which is equally mis-usable. r=dbaron@fas.harvard.edu, sr=brendan@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@112678 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-24 09:20:51 +00:00
rginda%netscape.com
b24274d903 bug 119938, nebiros bustage, r=dbaron
remove useless casts


git-svn-id: svn://10.0.0.236/trunk@112108 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-14 21:59:34 +00:00
beard%netscape.com
23a8b301aa Fix mac bustage: jschar* and PRUnichar* aren't compatible.
git-svn-id: svn://10.0.0.236/trunk@112001 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-12 01:40:15 +00:00
rginda%netscape.com
0d2707afd4 bug 115695, rs=brendan, venkman only
netive changes relating to pretty print support, includes...
* remove jsdIPC interface, replaced with ulong offsets from PC 0.
* add |pcmap| parameter to select between sourcetext/prettyprint linemaps (pcToLine, lineToPc, and isLineExecutable.)
* add |functionSource| property to jsdIScript.
* add |tag| to jsdIScript.
* fixed potential jsdIScript leaks.


git-svn-id: svn://10.0.0.236/trunk@111989 18797224-902f-48f8-a5cc-f745e15eee43
2002-01-12 00:56:35 +00:00
rginda%netscape.com
9dffd404bd bug 99601, add filter support to js/jsd, r=jband sr=brendan
large addition to the jsd_xpc component allows arbitrary filtering of debug hooks by url pattern, line range, and global object.  also adds ability to begin instrumenting jsscripts at app startup.


git-svn-id: svn://10.0.0.236/trunk@106689 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 13:41:32 +00:00
rginda%netscape.com
af63e55a40 bug 103804, "Venkman doesn't like stopping in timeouts", r=jband, sr=shaver
add callback to the enterNestedEventLoop method


git-svn-id: svn://10.0.0.236/trunk@105018 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-10 06:35:46 +00:00
rginda%netscape.com
9e5dd4fe59 bug 102785, r=dp, sr=shaver, a=asa
remove venkman startup listener so we don't have to load the dll at startup.
checking into 0.9.5 branch also.


git-svn-id: svn://10.0.0.236/trunk@104808 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-08 19:44:35 +00:00
jaggernaut%netscape.com
51e0dc7a6c Bug 100476: Convert uses of member functions ToNewUnicode, ToNewCString and ToNewUTF8String to their global versions and remove support from nsCString and nsString. r=dbaron, rs=scc
git-svn-id: svn://10.0.0.236/trunk@104212 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-29 08:28:41 +00:00
rginda%netscape.com
22a97b8a46 - venkman only -
bug 100943, changes needed to build jsd on os/2
patch by Dainis Jonitis, r=mkaply,rginda


git-svn-id: svn://10.0.0.236/trunk@103530 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-22 01:39:24 +00:00
rginda%netscape.com
8c7d55aef9 - venkman only -
init xpconnect on the debugger's default context so that xpconnect can use it when it has to.  r=jband


git-svn-id: svn://10.0.0.236/trunk@102366 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-06 01:34:44 +00:00
rginda%netscape.com
59d192da29 - venkman only -
turn off verbose debugging for me
push a thread event queue for necko before we enter a nested event loop


git-svn-id: svn://10.0.0.236/trunk@102328 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-05 21:29:59 +00:00
rginda%netscape.com
84b8ddf3ae -- not built --
exposing call hook functionality


git-svn-id: svn://10.0.0.236/trunk@102149 18797224-902f-48f8-a5cc-f745e15eee43
2001-09-01 18:03:53 +00:00
rginda%netscape.com
ccde950ed1 - not built -
don't allow gc's during script hooks if CAUTIOUS_SCRIPTHOOK is defined (which it is, by default.)  Should help with stability until we can fix the real problems.
Use JSVAL_ macros instead of JSD_* calls in jsdValue::GetJSType method, avoiding two c++ frames per call.


git-svn-id: svn://10.0.0.236/trunk@101912 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-28 22:02:07 +00:00
rginda%netscape.com
03a2c7e85e - not built -
remove isActive attribute from jsdScript (it's the same thing as isValid)
fix bug in jsdValue::GetDoubleValue()
add jsdService::GC()


git-svn-id: svn://10.0.0.236/trunk@100262 18797224-902f-48f8-a5cc-f745e15eee43
2001-08-03 05:14:21 +00:00
rginda%netscape.com
35911730fa - not built -
remove spaces from non debug definitions of DEBUG_*, bug 89240


git-svn-id: svn://10.0.0.236/trunk@98666 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-05 09:06:24 +00:00
rginda%netscape.com
68b6b75a73 - not built -
Large changes to improve the way we deal with our wrappers around js engine structures.  jsdIScript, jsdIStackFrame, jsdIValue, and jsdIProperty interfaces now inherit from a new interface "jsdIEphemeral".  This interface is used to invalidate the wrapper.  Once the wrapper is invalidated, *most* methods throw NS_ERROR_NOT_AVAILABLE, some interfaces, such as jsdIScript, cache important information so that the wrapper isn't utterly useless once it has been invalidated.  The boolean isValid attribute can be used to see if the wrapper is still valid.

factor debug object counters into some simple macros
add new velid assertion macros for the new ephemeral objects
add utility functions for dealing with PR_CLISTs full of ephemeral objects.
invalidate the jsdIFrame after the execution hook completes
move some c/dtors from jsd_xpc.h over here to avoid exposing debug object counters, and repeating some macros
fix incorrectly set out parameter in getValue::GetDoubleValue


git-svn-id: svn://10.0.0.236/trunk@98576 18797224-902f-48f8-a5cc-f745e15eee43
2001-07-03 22:19:04 +00:00
rginda%netscape.com
07cb8fe673 - not built -
large changes to fix the following bugs:
82684, crash manually clearing breakpoint
*actually* clearing mValid in jsdScript::Invalidate fixed this one.

85636, assertions on quiting venkman
jsdService::Off now disconnects the hooks into JSD, to avoid calling back into js after that.  It also processes any pending script delete events that occurred during the last GC. The code to process the gPendingScripts list has been factored out of the gc callback.  Processing the dead script list allows us to properly finalize all of the jsdIScript object, which seems to clear up the "gc roots exist at shutdown" assertions.  In effect, these changes get rid of *all* of the jsd related assertions on exit.

Added isOn attribute to jsdIService.
Added isValid attribute to jsdIScript.  We now prefetch appropriate properties from the underlying JSDScript, so that it's available after the script is Invalidate()d

moved jsdService constructor to jsd_xpc.h

Save the runtime passed to OnForRuntime so we can use it to clear the GC Gallback in Off().


git-svn-id: svn://10.0.0.236/trunk@98152 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-28 07:46:36 +00:00
waterson%netscape.com
18986ada3f Land STATIC_BUILD_20010612_BRANCH, which supports building mozilla with components statically linked into the executable, as well as 'meta modules' that combine components into uber-DLLs.
git-svn-id: svn://10.0.0.236/trunk@97613 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-20 20:21:49 +00:00
valeski%netscape.com
b75b28be35 r=chak, sr=vidur, a=tor. 82000. removing unused arg from nsICategoryManager.
git-svn-id: svn://10.0.0.236/trunk@96452 18797224-902f-48f8-a5cc-f745e15eee43
2001-06-05 21:25:57 +00:00
rginda%netscape.com
e0f36cbef2 - not built -
add enumerateScripts() method to jsdIDebugger service
don't create a new debugger context if the user trys to call on[ForRuntime]() multiple times


git-svn-id: svn://10.0.0.236/trunk@95587 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-21 07:18:10 +00:00
rginda%netscape.com
7b2d61c2b7 - not built -
add onForRuntime() method to jsdIDebuggerService to let native code turn on the deubgger (on() can only be called from js)
register an app-start observer so we can turn on the debugger at startup if "js.debugger.autostart" pref is true.
r=peterv, bug 81840


git-svn-id: svn://10.0.0.236/trunk@95583 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-21 06:00:12 +00:00
rginda%netscape.com
35cc679664 fix to help senna tinderbox find PRClist
git-svn-id: svn://10.0.0.236/trunk@94973 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-15 07:55:34 +00:00
rginda%netscape.com
bc8594c1fc - not built -
check for valid PC in ClearBreakpoint
Lock script subsystem while clearing all breakpoints


git-svn-id: svn://10.0.0.236/trunk@94823 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-13 21:08:06 +00:00
rginda%netscape.com
6a4907263d - not built -
remove jsdThreadState and jsdContext objects.
consolidate ExecutionHook and BreakpointHook callbacks
remove return value checking from all methods (xpconnect does this for us.)


git-svn-id: svn://10.0.0.236/trunk@93975 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-04 22:14:04 +00:00
rginda%netscape.com
af4204d295 - not built -
validate integrity of jsdScript data to guard against calling into a destroyed script.
queue up script deletes that happen during the JS GC cycle, call them when GC finishes (bug 76979.)
don't NS_IF_ADDREF objects that we get using *::FromPtr()
add jsdScript::Invalidate()


git-svn-id: svn://10.0.0.236/trunk@93560 18797224-902f-48f8-a5cc-f745e15eee43
2001-05-01 21:33:43 +00:00
rginda%netscape.com
bfa6d3acfe - not built -
register for gc callbacks
explicitly create a singleton factory
only call OnScriptLoaded() if |creating| is true


git-svn-id: svn://10.0.0.236/trunk@93089 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 21:54:59 +00:00
rginda%netscape.com
99e6af67fd - not built -
add global service for the breakpoint callback
add breakpoint callback
move c callbacks to top of source
add creatorURL, creatorLine, constructorURL, constructorLine, and value attribut
es to jsdObject
move from pc as a ulong to pc as an object wrapped around a uword
move lineToPc and pcToLine from ThreadState to Script (where it belongs)
add setBreakpoint(), clearBreakpoint(), and clearAllBreakpoints() to jsdScript
relocate jsdService constructor from jsd_xpp.h in order to initialize the global
 service
rename init() to on() on jsdService
add off(), clearAllBreakpoints(), and breakpointHook attribute to jsdService


git-svn-id: svn://10.0.0.236/trunk@93076 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-25 18:20:47 +00:00
rginda%netscape.com
baa9bebcf0 - not built -
add line attribute to jsdStackFrame
add pcToLine and lineToPc methods to jsdStackFrame
remove isFunction attribute from jsdValue (already covered by jsType attribute)
add propertyCount attribute to jsdValue so you can get the property cound without forcing a bunch of property wrappers to be created (as in GetProperties())


git-svn-id: svn://10.0.0.236/trunk@92934 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-23 19:12:56 +00:00
shaver%mozilla.org
2fbf0db9be not built: fix compilation error due to jschar/PRUnichar mismatch
git-svn-id: svn://10.0.0.236/trunk@92877 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-21 15:11:02 +00:00
rginda%netscape.com
52a52299eb - not built -
implement jsdIProperty


git-svn-id: svn://10.0.0.236/trunk@92876 18797224-902f-48f8-a5cc-f745e15eee43
2001-04-21 07:21:27 +00:00