91 Commits

Author SHA1 Message Date
dveditz%cruzio.com
9722e8e709 bug 440982 only get script hook if we're going to call it, to avoid possible calls back into script under JS_GC's notification. r/sr=brendan, a=dveditz
git-svn-id: svn://10.0.0.236/trunk@257586 18797224-902f-48f8-a5cc-f745e15eee43
2009-06-25 21:14:03 +00:00
igor%mir2.org
088bbf6cb0 [bug 423874] backing out as a simpler patch would do the job with less code.
git-svn-id: svn://10.0.0.236/trunk@248816 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-29 10:34:31 +00:00
igor%mir2.org
99df75fa8a bug=423874 r=brendan a1.9b5=dsicore
Allocating native functions together with JSObject


git-svn-id: svn://10.0.0.236/trunk@248353 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-21 08:19:27 +00:00
timeless%mozdev.org
4b89f5e047 Bug 421303 Crash [@ jsds_ScriptHookProc]
r=caillon a=dsicore

If we reach ~jsdService, that means our client doesn't care about us, so we can
(and should) drop all references to any callbacks (if they cared, they'd have
kept us alive!*).

I think jsdService::Off should clear all the hooks, the strange magic of not
clearing it isn't really a great idea. So for Off, we'll now clear the
ScriptHook too (consumers who use off should really drop any references they
have to our objects...). I'm still on the fence on this point, I suspect we can
actually move it from ::Off to ~jsdService (it must be cleared at some point,
otherwise if jsd_xpc's library manages to get unloaded, the function pointer
would be invalid, which would be *BAD*).

jsds_NotifyPendingDeadScripts needs to clear gDeadScripts whether or not
there's a service or hooks, so it does. Because it's a static callback and
because of the scary way GC works, I'd rather ensure (deathgrip) that jsds is
available (and consistent!) for the duration of the function call. The code
already handles the lack of a hook, so there's no reason to do magical
returns....

The real problem which mayhemer found was that jsdService::Off was returning
early (failure) because gGCStatus wasn't JSGC_END when called from ~jsdService
from JS_GC from the cyclecollector, so we make sure that ~jsdService forces
::Off to act as if it is JSGC_END (after ensuring that there are no callbacks
available).

* a pure javascript (xpcom component, not DOM hosted!) version of a jsdService
consumer means that jsdService will need to talk to the CycleCollector
eventually (this is another bug for the future).


git-svn-id: svn://10.0.0.236/trunk@247513 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-11 00:13:48 +00:00
timeless%mozdev.org
a96741e346 Bug 282660 Crash [@ jsds_NotifyPendingDeadScripts] ds->script is null
r=jst a=beltzner


git-svn-id: svn://10.0.0.236/trunk@247125 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-05 21:10:01 +00:00
timeless%mozdev.org
a0229ac8f7 Bug 394114 Interfaces missing from various QI implementations.
jsdContext
r=caillon sr=jag a=dsicore


git-svn-id: svn://10.0.0.236/trunk@246536 18797224-902f-48f8-a5cc-f745e15eee43
2008-02-26 15:10:19 +00:00
timeless%mozdev.org
ca6947dd8d Bug 411249 Top crash [@ jsds_ScriptHookProc][@jsds_ScriptHookProc(JSDContext*, JSDScript*, int, void*)] on shutdown with Firebug 1.1.0b10 installed
r=gijs a=beltzner


git-svn-id: svn://10.0.0.236/trunk@244608 18797224-902f-48f8-a5cc-f745e15eee43
2008-01-31 19:12:47 +00:00
benjamin%smedbergs.us
0a44d0e3e2 Bug 411327 - nsIXPCNativeCallContext should not inherit from nsISupports, r=mrbkap, a=schrep
git-svn-id: svn://10.0.0.236/trunk@243117 18797224-902f-48f8-a5cc-f745e15eee43
2008-01-15 15:51:02 +00:00
jwalden%mit.edu
dda6ff3c99 Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros.
git-svn-id: svn://10.0.0.236/trunk@229504 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-08 07:08:56 +00:00
timeless%mozdev.org
8d97fd0e4c Bug 385765 [@ jsdASObserver::Observe] You can't dereference a NULL nsCOMPtr with operator->()
r=dveditz sr=dveditz


git-svn-id: svn://10.0.0.236/trunk@229103 18797224-902f-48f8-a5cc-f745e15eee43
2007-07-01 19:25:10 +00:00
timeless%mozdev.org
2513d1e683 Bug 365363 Return value for GetJSDValue ignored leading to death
r=silver sr=biesi


git-svn-id: svn://10.0.0.236/trunk@228365 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-20 05:56:13 +00:00
igor%mir2.org
5857116860 Bug 379165: Simplifing JS_DimpHeap while fixing BeOS build problems. r=brendan
git-svn-id: svn://10.0.0.236/trunk@225236 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-29 21:49:01 +00:00
igor%mir2.org
f92cdfb6ca Bug 378261: Replacing GC_MARK_DEBUG by DumpHeap. r=brendan
git-svn-id: svn://10.0.0.236/trunk@225006 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-25 13:43:18 +00:00
silver%warwickcompsoc.co.uk
bc82662e97 Bug 341919 - Remove widget dependency from JSD. r=rginda sr=jst
git-svn-id: svn://10.0.0.236/trunk@200854 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-26 10:36:28 +00:00
gijskruitbosch%gmail.com
713e81a1ce Bug 342074 - JSD crashes on exit when there's two clients
r+a=timeless


git-svn-id: svn://10.0.0.236/trunk@200431 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-20 15:54:58 +00:00
mrbkap%gmail.com
0b7523274b Checking in Ben Turner <bent.mozilla@gmail.com> and timeless's patch to make Gecko use the JS engine's request model to help multithreaded embedders avoid GC races and crashes. bug 176182, r=mrbkap assumed-rs=brendan
git-svn-id: svn://10.0.0.236/trunk@199768 18797224-902f-48f8-a5cc-f745e15eee43
2006-06-12 22:39:55 +00:00
darin%meer.net
42edf059cf landing patch for bug 326273 "Implement nsIThreadManager" (Mac portions by Mark Mentovai) with reviews from bienvenu, bsmedberg, bzbarsky, josh, roc, and ssieb
git-svn-id: svn://10.0.0.236/trunk@196254 18797224-902f-48f8-a5cc-f745e15eee43
2006-05-10 17:30:15 +00:00
neil%parkwaycc.co.uk
08397c8422 Followup patch to bug 207327 to move the "service" string from the name to the value of the category entry where it is interpreted to belong r=timeless sr=bz
git-svn-id: svn://10.0.0.236/trunk@191407 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-28 17:36:58 +00:00
timeless%mozdev.org
8134fe8412 Bug 327605 [@ JSD_GetContextFlags - jsdService::GetFlags]
r=rginda


git-svn-id: svn://10.0.0.236/trunk@191299 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-27 04:17:08 +00:00
timeless%mozdev.org
ac0793519a Bug 281137 Add profiling column for functions excluding other functions running
jsd part
patch by silver@warwickcompsoc.co.uk r=shaver sr=dmose a=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@176982 18797224-902f-48f8-a5cc-f745e15eee43
2005-08-02 15:53:59 +00:00
timeless%mozdev.org
ab71febd39 Bug 283532 OOM crash [@ jsdValue::GetProperties]
patch by b.jacques@planet.nl r=rginda sr=brendan a=brendan


git-svn-id: svn://10.0.0.236/trunk@175474 18797224-902f-48f8-a5cc-f745e15eee43
2005-07-01 05:12:47 +00:00
timeless%mozdev.org
77453f609f Bug 207309 nsMemoryImpl::Alloc of 0: 'size' in jsdValue::GetProperties
r=shaver sr=shaver


git-svn-id: svn://10.0.0.236/trunk@165227 18797224-902f-48f8-a5cc-f745e15eee43
2004-11-10 21:58:00 +00:00
timeless%mozdev.org
53122e93fe Fixing code for CAUTIOUS_SCRIPTHOOK (not part of the build), broken by changes for
Bug 208030 JS errors report incorrect line numbers in the source code


git-svn-id: svn://10.0.0.236/trunk@156350 18797224-902f-48f8-a5cc-f745e15eee43
2004-05-13 06:04:09 +00:00
gerv%gerv.net
586f796c2a Bug 236613: change to MPL/LGPL/GPL tri-license.
git-svn-id: svn://10.0.0.236/trunk@155091 18797224-902f-48f8-a5cc-f745e15eee43
2004-04-18 22:01:16 +00:00
timeless%mozdev.org
20d9448f83 Bug 238393 DRefTool analysis for jsd files
r=rginda a=asa


git-svn-id: svn://10.0.0.236/trunk@154298 18797224-902f-48f8-a5cc-f745e15eee43
2004-03-26 07:27:05 +00:00
timeless%mozdev.org
21ea0c93c3 Bug 238393 DRefTool analysis for jsd files
r=rginda
GC_MARK_DEBUG is not part of the build...


git-svn-id: svn://10.0.0.236/trunk@154233 18797224-902f-48f8-a5cc-f745e15eee43
2004-03-24 23:25:30 +00:00
timeless%mozdev.org
a4b97e3438 Bug 238305 jsd doesn't build on windows if JS_MARK_DEBUG is set
r=rginda
not part of the build...


git-svn-id: svn://10.0.0.236/trunk@154186 18797224-902f-48f8-a5cc-f745e15eee43
2004-03-23 05:33:09 +00:00
timeless%mozdev.org
305a44edec Bug 238058 Crash [@js_GetStringBytes] from venkman
r=rginda a=brendan


git-svn-id: svn://10.0.0.236/trunk@154185 18797224-902f-48f8-a5cc-f745e15eee43
2004-03-23 05:13:09 +00:00
darin%meer.net
55688e6410 landing string defragmentation patch for bug 231995, r/sr=dbaron,jst,dougt
git-svn-id: svn://10.0.0.236/trunk@152905 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-19 02:44:03 +00:00
jst%mozilla.jstenback.com
854468a176 Fixing bug 233307. deCOMtaminating nsIScript* and related interfaces. r+sr=bryner@brianryner.com.
git-svn-id: svn://10.0.0.236/trunk@152565 18797224-902f-48f8-a5cc-f745e15eee43
2004-02-09 22:48:53 +00:00
dwitte%stanford.edu
45b91a5054 spelling fixes... s/debuging/debugging/. thanks to WeirdAl for the patch.
b=106386, p=ajvincent@juno.com, r=timeless, sr=bz.


git-svn-id: svn://10.0.0.236/trunk@147827 18797224-902f-48f8-a5cc-f745e15eee43
2003-10-10 04:31:15 +00:00
bryner%brianryner.com
dbbc84bf94 Fix build on gcc 3.4 by removing extra semicolons (bug 218551). r/sr=dbaron, a=brendan.
git-svn-id: svn://10.0.0.236/trunk@146620 18797224-902f-48f8-a5cc-f745e15eee43
2003-09-07 22:37:27 +00:00
rginda%netscape.com
fff7811074 bug 216112, "add ability to disable object tracking in jsd"
r=caillon, sr=brendan, a=asa

adds the ability to turn off the object tracking without having to disable the debugger.  should make a dormant venkman less of a performance impact.


git-svn-id: svn://10.0.0.236/trunk@146022 18797224-902f-48f8-a5cc-f745e15eee43
2003-08-14 22:49:09 +00:00
brendan%mozilla.org
2532d3d12a Big dynamic footprint win via script filename caching, plus line number fix for strict/const diags (see http://bugzilla.mozilla.org/attachment.cgi?id=127130&action=view for detailed checkin comments; 208030, r/rs=shaver, r=rginda on the jsd change, r=jst on the dom change).
git-svn-id: svn://10.0.0.236/trunk@145239 18797224-902f-48f8-a5cc-f745e15eee43
2003-07-26 22:37:11 +00:00
timeless%mozdev.org
e103e9a25c Bug 207327 @mozilla.org/js/jsd/app-start-observer;2 isn't registering itself correctly as an app-startup observer service
r=rginda


git-svn-id: svn://10.0.0.236/trunk@143001 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-28 22:34:20 +00:00
rginda%netscape.com
325d8b73c7 Bug 204028, "debugger service crashes when asked to eval an empty string"
a=sspitzer@netscape.com

return NS_ERROR_INVALID_ARG if asked to eval an empty string


git-svn-id: svn://10.0.0.236/trunk@142015 18797224-902f-48f8-a5cc-f745e15eee43
2003-05-01 18:50:58 +00:00
rginda%netscape.com
8a5d068645 bug 200591, "File Options > Don't Debug Eval/Timeouts isn't working", r=brendan
prevent any stack with a disabled frame from being debugged during single-stepping, or break-on-throw.  Also adds versioning support to the jsdIDebuggerService interface.


git-svn-id: svn://10.0.0.236/trunk@141407 18797224-902f-48f8-a5cc-f745e15eee43
2003-04-18 20:12:11 +00:00
dbaron%dbaron.org
a53a959416 Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag
git-svn-id: svn://10.0.0.236/trunk@136009 18797224-902f-48f8-a5cc-f745e15eee43
2003-01-08 21:07:51 +00:00
rginda%netscape.com
c32dc4620e bug 185719, r=peterv@netscape.com, sr=brendan@mozilla.org
"add ability to get at function object for a jsdIScript"

add a |functionObject| attribute to the jsdIScript interface, which returns the function's JSObject as a jsdIValue


git-svn-id: svn://10.0.0.236/trunk@135432 18797224-902f-48f8-a5cc-f745e15eee43
2002-12-17 22:22:30 +00:00
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