Commit Graph

41 Commits

Author SHA1 Message Date
Terrence Cole
816de10c5e Bug 760342 - Check explicitly for mis-use of HashTable::Enum; r=luke
If a user does removeFront or rekeyFront on an Enum, then continues to use it,
it will fail, potentially randomly. This patch makes the failure explicit in
debug builds.
2012-06-01 15:41:27 -07:00
Matt Brubeck
3024f60165 Back out bug 760342 for Windows build error, bug 755070 for Android crashes, and bug 760458 because it depends on 755070 2012-06-01 17:45:02 -07:00
Terrence Cole
182d257235 Bug 760342 - Check explicitly for mis-use of HashTable::Enum; r=luke
If a user does removeFront or rekeyFront on an Enum, then continues to use it,
it will fail, potentially randomly. This patch makes the failure explicit in
debug builds.
2012-06-01 15:41:27 -07:00
Terrence Cole
21763adf0c Bug 730933 - Make IsAboutToBeFinalized indirect; r=billm
This additionally moves the interface into js::gc:: and renames it to
CheckFooMarked.
2012-05-23 10:34:29 -07:00
Gervase Markham
cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jeff Walden
60b5d410c3 Bug 750907 - Move the marking declarations out of jsgcmark.h and into a header with minimal dependencies. r=billm 2012-05-01 14:30:18 -07:00
Matt Brubeck
6ef536f064 Back out 682bf201edde, ef35ba222ac8, and 6a20cf61289d (bug 750907, bug 751003, bug 751377) because of build failure on a CLOSED TREE 2012-05-03 14:55:52 -07:00
Jeff Walden
149f277184 Bug 750907 - Move the marking declarations out of jsgcmark.h and into a header with minimal dependencies. r=billm 2012-05-01 14:30:18 -07:00
Bill McCloskey
600fab1cd4 Bug 742843 - Clean up weakmap header (r=terrence) 2012-04-09 11:42:04 -07:00
Terrence Cole
501f305f4f Bug 740673 - Simplify the C++ WeakMap implementation; r=jimb
It exposes way more configurability than we use at the moment.
2012-03-29 17:35:46 -07:00
Bill McCloskey
634484a4e5 Bug 729238 - Save and restore weakmap list during marking validation (r=igor) 2012-02-27 09:48:35 -08:00
Bill McCloskey
ca293fdba6 Bug 641025 - Incremental GC (r=igor,smaug,roc,cdleary,gregor) 2012-02-17 14:35:20 -08:00
Terrence Cole
d5bba64499 Bug 727281 - Make JSObject* for Root and Barriered marking indirect; r=billm
This will allow us to move HeapPtr and rooted objects when tracing.
2012-02-14 15:19:55 -08:00
Terrence Cole
a6cfb19ba6 Bug 726845 - Make Value marking interfaces indirect; r=billm
This will eventually allow the GC to update Values that reference an Object,
when moving an object.
2012-02-15 17:16:53 -08:00
Igor Bukanov
642ae18cf6 bug 660441 - removal of cx parameter from IsAboutToBeFinalized. r=anygregor 2012-02-08 01:51:32 +01:00
Andrew McCreight
dc69c83cd8 Bug 707313 - use special non-NULL next for weak maps not in the list. r=jimb 2012-01-06 11:30:09 -08:00
Andrew McCreight
611268b266 Bug 680937, part 1 - Don't always mark wrapped native keys. r=billm 2011-12-15 17:44:34 -08:00
Andrew McCreight
79d559e155 Bug 668855, part 1: add JS weak map tracing interface. r=billm 2011-11-24 07:35:56 -05:00
Bill McCloskey
267d9855a3 Bug 641027 - Add snapshot-at-the-beginning write barriers for incremental GC (r=luke,bhackett) 2011-10-25 16:07:42 -07:00
Andrew McCreight
5bba2c43dd Bug 688277, part 1 - add JS friend API to get keys of a weak map. r=jorendorff 2011-10-13 09:33:39 -07:00
Luke Wagner
f6e92fa08c Bug 689362 - Create js/public (with the intention that its contents will eventually be the only INSTALLED_HEADERS), move Vector and HashTable to js/public and some dependencies (r=billm,sr=dmandelin) 2011-10-04 15:33:00 -07:00
Igor Bukanov
bc9db0f9c5 bug 687966 - eliminating held/unheld scripts in the debugger. r=jorendorff 2011-09-20 21:49:12 +02:00
Jeff Walden
ea3e36fc7a Make ~WeakMapBase virtual to silence MSVC. It's a destructor, probably called in concert with a delete or free(), so perf shouldn't matter, right? r=mozbot 2011-10-05 15:53:50 -07:00
Andrew McCreight
9828f7e42f Bug 681104 - Add JSTracer flag to disable visiting WeakMap mappings. r=billm 2011-09-04 11:25:49 -07:00
Andrew McCreight
071c617ab5 Bug 684595 - Don't visit WeakMap keys from the WeakMap in markentry. r=jorendorff 2011-09-04 10:16:23 -07:00
Luke Wagner
8fe42d3496 Bug 684110 - Clean JSObject::clasp usage (r=pbiggar) 2011-09-02 17:23:26 -07:00
Ed Morley
ee57bf1d01 Backout bug 684110 (08b6eaf6aad0, cf8b35fa1010, 25ee45edabe1, 659f5c7d2cc9, 870f6dd82586 & e1ad65d6a7fd) and bug 684344 (cd1957f6628d) on a CLOSED TREE; a=bustage-fairies 2011-09-03 03:21:25 +01:00
Luke Wagner
ec00ca00c4 Bug 684110 - Clean JSObject::clasp usage (r=pbiggar) 2011-09-02 17:23:26 -07:00
Jason Orendorff
0a46d5195d Merge from mozilla-central to jsdbg2 branch. 2011-07-27 18:23:16 -05:00
Jason Orendorff
de7a3f1ee4 Address review comments from billm (bug 672829 comment 15). 2011-07-21 18:14:33 -05:00
Jason Orendorff
17781060f2 Merge from tracemonkey to jsdbg2. 2011-07-01 19:02:40 -05:00
Jason Orendorff
ba7258645a 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.
2011-06-20 18:26:05 -05:00
Jim Blandy
e869b533b0 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
Brendan Eich
6ad6376910 No else after return. 2011-06-14 19:32:33 -07:00
Jim Blandy
af9b5b2858 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
8790af8312 Bug 661567: Use RuntimeAllocPolicy in JS WeakMap objects, not ContextAllocPolicy. r=jorendorff 2011-06-14 19:21:47 -07:00
Andrew McCreight
7987cdad38 Bug 655297 - Mark XPC wrapped natives used as weak map keys. r=billm 2011-07-22 09:51:51 -07:00
Jim Blandy
c5f153ec15 Bug 667126: Allow WeakMaps where the criterion for retaining an entry does not imply that the entry's key has been marked. r=jorendorff
This patch replaces the 'markKey' and 'markValue' member functions of the
MarkPolicy template parameter with two functions:

- markEntryIfLive determines if a map entry should be retained, and, if so
  ensures its key and value have been marked.
- markEntry simply marks an entry's key and value, unconditionally.

The comments describe these in more detail.
2011-06-29 02:27:47 -07:00
Andreas Gal
821b8221a0 Implement Harmony weak maps (bug 547941, r=jorendorff). 2011-04-16 21:23:44 -07:00
L. David Baron
593033f346 Back out changeset 7dcd0d16cc08 (bug 547941) for causing jsreftest crashes on debug builds. 2011-04-12 01:28:40 -07:00
Andreas Gal
2b5a4b0581 Bug 547941 - WeakMap. r=jorendorff. 2011-04-11 22:38:11 -07:00