Commit Graph

70843 Commits

Author SHA1 Message Date
Jason Orendorff
6367a9c217 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.

--HG--
rename : js/src/jit-test/tests/debug/Debug-ctor.js => js/src/jit-test/tests/debug/Debug-ctor-01.js
2011-06-02 21:58:46 -05:00
Jim Blandy
b9b63b7f8e Define new macro, THIS_DEBUGOBJECT_OWNER_REFERENT, which also provides the owning Debug. r=jorendorff, push=jorendorff. 2011-06-15 18:02:02 -05:00
Jim Blandy
088562e69d Comment fixes, assertions, and cleanups to Debug GC-related code. r=jorendorff, push=jorendorff. 2011-06-15 18:00:06 -05:00
Jim Blandy
f79cb0d6c7 Use WeakMap for the Debug::objects, the mapping from referents to Debug.Objects. r=jorendorff, push=jorendorff. 2011-06-15 17:53:26 -05:00
Jason Orendorff
fcfd80cfc5 Merge from TM. Huge merge. Stack changes from bug 656462. 2011-06-15 16:14:09 -05:00
Brendan Eich
b2a9eace38 Inherited non-configurable accessor properties mis-reported as own properties (637994, r=jwalden). 2011-06-14 23:48:59 -07:00
Brendan Eich
a2fa4d23af No else after return. 2011-06-14 19:32:33 -07:00
Jim Blandy
a282ee62d3 Bug 660039: Provide a WeakMap usable from C++. r=jorendorff
Remove WeakMap class; implement the JavaScript object using functions static to jsweakmap.cpp.

Define a new WeakMap class template, parameterized by Key and Value types,
and accepting a MarkPolicy argument saying how to mark them.

Add assertions to check that we check and set the right mark bits, and
tests that trip them in the presence of mistakes in earlier revisions of
this patch.
2011-06-14 19:21:47 -07:00
Jim Blandy
7cdc628e2a Bug 661567: Use RuntimeAllocPolicy in JS WeakMap objects, not ContextAllocPolicy. r=jorendorff 2011-06-14 19:21:47 -07:00
Jim Blandy
900b1f6059 Bug 661567: Implement RuntimeAllocPolicy, providing proper memory accounting in GC'd objects that live longer than a JSContext. r=luke 2011-06-14 19:21:47 -07:00
Jim Blandy
fe837eb8a0 Bug 661567: Use ObjectValueMap typedef name where appropriate. r=gal 2011-06-14 19:21:47 -07:00
Luke Wagner
70b6adcc95 Bug 664159 - Fix eval-in-frame crash (r=waldo) 2011-06-14 17:35:19 -07:00
Nikhil Marathe
524b87e3d5 Bug 656519 - Fix consumers outside SpiderMonkey to use new ArrayBuffer APIs. r=mrbkap
--HG--
extra : rebase_source : f359987831611155029114b5f85080155c6a12d5
2011-06-14 15:37:21 -04:00
Nikhil Marathe
566af7c712 Bug 656519 - Add an interpreter fast-path for getting length from a typed array. r=mrbkap
--HG--
extra : rebase_source : b2d583778e14877cb0e01f0739d08cd31dc9c757
2011-06-14 15:35:54 -04:00
Nikhil Marathe
f96aadd8f3 Bug 656519 - Do a small size optimization for arraybuffer objects, possibly avoiding a second malloc entirely for small array buffers. r=mrbkap
--HG--
extra : rebase_source : 2dcaee6b42f47dafcfbb866a45ed2452f029a253
2011-06-14 15:34:06 -04:00
Nikhil Marathe
acda759fc1 Bug 656519 - Avoid a malloc (and a finalizer) by storing the malloc'd array in our slots instead of in a separate malloc'd structure in our private field. r=mrbkap
--HG--
extra : rebase_source : 791ede2d8db96f56e4ef8478d491aec413d3e392
2011-06-14 15:33:11 -04:00
Chris Leary
cb10121547 Avoid copy construction for paren info vector. (rs=dmandelin)
--HG--
extra : rebase_source : 659e9e5aa1946b2693645664584f98dfe068d19f
2011-06-14 11:53:14 -07:00
Jim Blandy
cde354a9bd Cross stack segment boundaries when looking for the youngest frame. Correctly check that live stack frames are on the stack. 2011-06-08 07:25:22 -07:00
Jim Blandy
91894959cf Verify that accessing frame properties throws once the frame is dead. 2011-06-07 12:15:26 -07:00
Jim Blandy
88decefd28 Merge from TM. 2011-06-07 12:12:28 -07:00
Nicholas Nethercote
a1825387bc Bug 645598 - Trim last bits of fat from the scanner, part 3 of 3. r=jwalden. 2011-06-07 13:48:55 +10:00
Nicholas Nethercote
af44ef61b4 Bug 645598 - Trim last bits of fat from the scanner, part 2 of 3. r=jwalden. 2011-06-07 13:48:21 +10:00
Nicholas Nethercote
5e87a0c3ea Bug 645598 - Trim last bits of fat from the scanner, part 1 of 3. r=jwalden. 2011-06-07 13:47:12 +10:00
Paul Biggar
33979e422d Bug 660681: Add NULL check to LeaveFunction (r=jimb) 2011-06-06 14:24:11 -07:00
Paul Biggar
118bf3fdae Bug 660670: Report an error on OOM in Parser::analyzeFunction (r=jimb) 2011-06-06 14:24:11 -07:00
Paul Biggar
08fcb0b61d Bug 660638: Add NULL check to Compiler::compileScript (r=jwalden) 2011-06-06 14:24:10 -07:00
David Mandelin
ea7d5ed079 Bug 662165: fix MSVC warning 2011-06-06 13:36:57 -07:00
Chris Leary
278e5141b8 Followup fix for merge, fix ifdef directive. 2011-06-06 09:58:15 -07:00
Chris Leary
f8e0e912ab Merge mozilla-central to tracemonkey. 2011-06-06 09:41:22 -07:00
Jim Blandy
8bd7752c01 Backed out changeset d02083014f57; build problems in nsXPConnect.cpp 2011-06-06 09:01:47 -07:00
Jim Blandy
80394f8a78 Backed out changeset 720b3fe3c84e; build problems in nsXPConnect.cpp. 2011-06-06 08:57:34 -07:00
Margaret Leibovic
9689877212 Bug 661823 - Ctrl+F shouldn't work to open Find toolbar in about:permissions and should work to close existing Find bar. r=gavin 2011-06-06 08:15:21 -07:00
Margaret Leibovic
ea5b8bfa04 tests for Bug 661819 - Values for All Sites in about:permissions displays last selected site's values. r=gavin 2011-06-06 08:15:13 -07:00
Margaret Leibovic
49138ee5c9 Bug 661819 - Values for All Sites in about:permissions displays last selected site's values. r=gavin 2011-06-06 08:14:07 -07:00
Margaret Leibovic
bff36cfb13 Bug 661791 - Rectify wording of "Clear all cookies" button in about:permissions to match the "Remove all cookies" button. r=gavin 2011-06-06 08:13:50 -07:00
Jacek Caban
ab9e18c25c Bug 661517 - nsWebSocketHandler.cpp fails to compile on mingw-w64 r=mcmanus DONTBUILD 2011-06-06 13:16:22 +02:00
Nicholas Nethercote
3f2c2d551f Bug 656773 - Separate the process and the path in nsIMemoryReporter so that about:memory works in private browsing mode. r=sdwilsh, sr=roc. 2011-06-06 11:22:45 +10:00
Kyle Huey
c5509e3146 Back out Bug 622315 due to Bug 662200. 2011-06-05 16:22:09 -07:00
Kyle Huey
dc20cc5fcd Backed out changeset 52b9e864be0e due to Bug 662200. 2011-06-05 16:21:42 -07:00
Kyle Huey
c10028170d Bug 622315: Refuse to navigate if a navigation is already pending. r=bz 2011-06-05 12:09:47 -07:00
Kyle Huey
7d5b6f2285 Bug 661876: Remove obsolete nsIDOMFile methods/properties. r=sicking 2011-06-05 11:54:50 -07:00
Kyle Huey
7c8feff73e Bug 661876: Fix tests to avoid using obsolete nsIDOMFile properties/methods. 2011-06-05 11:54:14 -07:00
Dão Gottwald
7778dfb0d9 Bug 662155 - addTab should report the exception when loadURIWithFlags fails. r=gavin 2011-06-05 19:37:10 +02:00
Mounir Lamouri
8bc1be7f60 Merging cedar with mozilla-central. 2011-06-05 15:31:36 +02:00
Tyler Downer
e98d10f115 Bug 660746 - Fix another typo. r=gavin 2011-06-05 10:07:15 +02:00
Phil Ringnalda
ba566a58e2 Bug 650691 - random-if the SVG object--auto reftests that are random-if(Android) 2011-06-04 22:20:52 -07:00
Ehsan Akhgari
8703cf5143 Bug 612448 - Protect the progress listener object from being garbage collected too soon which could cause a test timeout; r=roc 2011-06-03 16:48:31 -04:00
Rafael Ávila de Espíndola
f9339f6813 b=661145, r=bsmedberg Move the function declarations passed to AC_TRY_COMPILE out of the body of main. 2011-06-03 16:34:42 -04:00
Ehsan Akhgari
b24e41048e Bug 495577 - Rename the "Permanent Private Browsing mode" checkbox in the Privacy prefpane to better match the surrounding options; r=dao ui-r=faaborg 2011-06-03 15:04:52 -04:00
timeless@mozdev.org
deceb8bf2b Bug 620182 [@ QuoteString | DecompileSwitch] when JSVAL_IS_DOUBLE(key) and SprintDoubleValue fails due to oom
r=jorendorff
2011-06-03 08:57:00 -07:00