2cc9d8a133bc33a0202ec8dcdcd1b85b3df5eb9d: Revise comments on js::Debug::mark. Also inline Debug::sweepCompartment into Debug::sweepAll.
Jason Orendorff <jorendorff@mozilla.com> - Tue, 28 Jun 2011 14:48:22 -0500 - rev 74487
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Revise comments on js::Debug::mark. Also inline Debug::sweepCompartment into Debug::sweepAll.
9ed67a5d4e917fab856aabd656129bed4ab81dbb: Add Script.prototype.getAllOffsets and getLineOffsets.
Jason Orendorff <jorendorff@mozilla.com> - Tue, 28 Jun 2011 14:46:00 -0500 - rev 74486
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Add Script.prototype.getAllOffsets and getLineOffsets.
9545334d35a31dff3abd1f8ec6c624daa18067fe: Quick follow-up for thinko in bug 667925: lists can be empty. r=orange.
Jason Orendorff <jorendorff@mozilla.com> - Tue, 28 Jun 2011 12:28:02 -0500 - rev 74485
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Quick follow-up for thinko in
bug 667925: lists can be empty. r=orange.
13c14153bd63ae9421ebaeb8ca4c62cfc148acb6: Bug 667925 - Line number is bogus on JSOP_TRACE opcodes. r=brendan.
Jason Orendorff <jorendorff@mozilla.com> - Tue, 28 Jun 2011 12:15:32 -0500 - rev 74484
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Bug 667925 - Line number is bogus on JSOP_TRACE opcodes. r=brendan.
d165c2385ee06a63b34ac4a5507a98ea0e9ba645: Add Script.prototype.getOffsetLine.
Jason Orendorff <jorendorff@mozilla.com> - Sat, 25 Jun 2011 20:58:17 -0500 - rev 74483
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Add Script.prototype.getOffsetLine.
026c7bc10466e0407b0cb65d11db1ccbe4e0eb91: Add Frame.prototype.offset.
Jason Orendorff <jorendorff@mozilla.com> - Sat, 25 Jun 2011 19:13:19 -0500 - rev 74482
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Add Frame.prototype.offset.
0a728f8555057f892902873ee4be96abbcc58023: Test that we get the same Debug.Script instance for different closures made from the same 'function' expression/declaration/statement.
Jim Blandy <jimb@mozilla.com> - Fri, 24 Jun 2011 14:10:26 -0700 - rev 74481
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Test that we get the same Debug.Script instance for different closures made from the same 'function' expression/declaration/statement.
7a78b176e018fee1a5899a5902b2c266925dd488: Fix 'if' in DebugObject_trace: the scope of a declaration includes its initializer.
Jim Blandy <jimb@mozilla.com> - Fri, 24 Jun 2011 14:02:23 -0700 - rev 74480
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Fix 'if' in DebugObject_trace: the scope of a declaration includes its initializer.
2d2654fc31b2eff7e5ac6ac2573969567c6c6c40: Support disabling debug mode in a compartment with scripts on the stack. Dump the debug-mode JIT code during a later GC.
Jason Orendorff <jorendorff@mozilla.com> - Thu, 23 Jun 2011 12:25:48 -0500 - rev 74479
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Support disabling debug mode in a compartment with scripts on the stack. Dump the debug-mode JIT code during a later GC.
2560cd08c8281ce1cec2fb37f7e9b7a60c8cc906: Change js::Debug::heldScripts to have pointers to debuggee-compartment objects as keys, rather than wrappers.
Jason Orendorff <jorendorff@mozilla.com> - Mon, 20 Jun 2011 18:30:36 -0500 - rev 74478
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Change js::Debug::heldScripts to have pointers to debuggee-compartment objects as keys, rather than wrappers.
6fef8a7982caad773a5ae9b499d4374b26d55ef6: Change js::Debug::objects to have referents as keys, rather than cross-compartment wrappers of referents.
Jason Orendorff <jorendorff@mozilla.com> - Mon, 20 Jun 2011 18:26:05 -0500 - rev 74477
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Change js::Debug::objects to have referents as keys, rather than cross-compartment wrappers of referents.
This adds support for cross-compartment WeakMaps and changes js::Debug::objects to be one. It eliminates the vexing JSMSG_DEBUG_STREAMS_CROSSED error messsage.
The GC interaction between jsgc and jsdbg is a little more complex now; like the cross-compartment wrapper maps, Debug::objects must be marked (just once) during per-compartment GC. In other ways this is a simplification.
3a7a75064ce6b91d69ab70486a5df0cfd112eea3: Fix Debug-ctor-03.js (regression: the exception is being thrown in the wrong compartment since rev e05d3da5866a) and make removeDebuggee throw if it would disable debug mode in a compartment with scripts on the stack.
Jason Orendorff <jorendorff@mozilla.com> - Mon, 20 Jun 2011 15:33:53 -0500 - rev 74476
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Fix Debug-ctor-03.js (regression: the exception is being thrown in the wrong compartment since rev e05d3da5866a) and make removeDebuggee throw if it would disable debug mode in a compartment with scripts on the stack.
e05d3da5866a594138b9678d12bc122a81551946: GlobalObject::getOrCreateDebuggers must be called in the global object's compartment, since it may create an object.
Jason Orendorff <jorendorff@mozilla.com> - Mon, 20 Jun 2011 14:06:42 -0500 - rev 74475
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
GlobalObject::getOrCreateDebuggers must be called in the global object's compartment, since it may create an object.
ac45a3dbfe3304dca3b9c9b0de4464f1e102a0b3: Initial support for Debug.Script instances. r=jorendorff, push=jorendorff.
Jason Orendorff <jorendorff@mozilla.com> - Fri, 17 Jun 2011 16:28:32 -0500 - rev 74474
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Initial support for Debug.Script instances. r=jorendorff, push=jorendorff.
6885f4c66607709010eae5d47f39b6b22ee3f707: Merge.
Jason Orendorff <jorendorff@mozilla.com> - Fri, 17 Jun 2011 11:12:33 -0500 - rev 74473
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Merge.
feb8c7a919b366b7d8c5390007cddf9c828a81d0: Fix MSVC-only errors and a warning.
Jason Orendorff <jorendorff@mozilla.com> - Thu, 16 Jun 2011 10:25:10 -0500 - rev 74472
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Fix MSVC-only errors and a warning.
a95ab01cda09f6a4f344ed1898e4ff1bfd65a6d5: Automatically turn debug mode on/off when adding/removing debuggees.
Jason Orendorff <jorendorff@mozilla.com> - Thu, 02 Jun 2011 21:58:46 -0500 - rev 74471
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Automatically turn debug mode on/off when adding/removing debuggees.
This allows most of the tests to run without the -d command-line flag.
Now a compartment is in debug mode if
* JSD1 wants debug mode on, thanks to a JS_SetDebugMode* call; OR
* JSD2 wants debug mode on, because a live Debug object has a debuggee
global in that compartment.
Since this patch only adds the second half of the rule, JSD1 should be
unaffected.
The new rule has three issues:
1. When removeDebuggee is called, it can cause debug mode to be turned
off for a compartment. If any scripts from that compartment are on
the stack, and the methodjit is enabled, returning to those stack
frames will crash.
2. When a Debug object is GC'd, it can cause debug mode to be turned off
for one or more compartments. This causes the same problem with
returning to deleted methodjit code, but the fix is different: such
Debug objects simply should not be GC'd.
3. Setting .enabled to false still does not turn off debug mode
anywhere, so it does not reduce overhead as much as it should.
A possible fix for issue #1 would be to make such removeDebuggee calls
throw; a different possibility is to turn off debug mode but leave all
the scripts alone, accepting the performance loss (as we do for JSD1 in
JSCompartment::setDebugModeFromC). The fix to issues #2 and #3 is to
tweak the rule--and to tweak the rule for Debug object GC-reachability.
700d8a05c7de53fbeb84e2b3b4ac4cb8ae7e82e4: Define new macro, THIS_DEBUGOBJECT_OWNER_REFERENT, which also provides the owning Debug. r=jorendorff, push=jorendorff.
Jim Blandy <jimb@mozilla.com> - Wed, 15 Jun 2011 18:02:02 -0500 - rev 74470
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Define new macro, THIS_DEBUGOBJECT_OWNER_REFERENT, which also provides the owning Debug. r=jorendorff, push=jorendorff.
8164f83c3cf8d429424c36298d11b324333996b9: Comment fixes, assertions, and cleanups to Debug GC-related code. r=jorendorff, push=jorendorff.
Jim Blandy <jimb@mozilla.com> - Wed, 15 Jun 2011 18:00:06 -0500 - rev 74469
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Comment fixes, assertions, and cleanups to Debug GC-related code. r=jorendorff, push=jorendorff.
8247161274fbcb5d827c3e32ab6637a306520087: Use WeakMap for the Debug::objects, the mapping from referents to Debug.Objects. r=jorendorff, push=jorendorff.
Jim Blandy <jimb@mozilla.com> - Wed, 15 Jun 2011 17:53:26 -0500 - rev 74468
Push
20986 by khuey@mozilla.com at Sun, 14 Aug 2011 11:45:15 +0000
Use WeakMap for the Debug::objects, the mapping from referents to Debug.Objects. r=jorendorff, push=jorendorff.