Граф коммитов

41 Коммитов

Автор SHA1 Сообщение Дата
Terrence Cole c15ef6f2b8 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 e62fcc8acf 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 722da9452b 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 1d3f0b3c20 Bug 730933 - Make IsAboutToBeFinalized indirect; r=billm
This additionally moves the interface into js::gc:: and renames it to
CheckFooMarked.

--HG--
extra : rebase_source : cbe66c7219cfc637f8655e3356040e532252183a
2012-05-23 10:34:29 -07:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jeff Walden 19a35f7f33 Bug 750907 - Move the marking declarations out of jsgcmark.h and into a header with minimal dependencies. r=billm
--HG--
rename : js/src/jsgcmark.cpp => js/src/gc/Marking.cpp
rename : js/src/jsgcmark.h => js/src/gc/Marking.h
extra : rebase_source : 3eb96a33102f0b76438dbb79ecb46e817bc1b767
2012-05-01 14:30:18 -07:00
Matt Brubeck fd49ebbe60 Back out 682bf201edde, ef35ba222ac8, and 6a20cf61289d (bug 750907, bug 751003, bug 751377) because of build failure on a CLOSED TREE
--HG--
rename : js/src/gc/Marking.cpp => js/src/jsgcmark.cpp
rename : js/src/gc/Marking.h => js/src/jsgcmark.h
2012-05-03 14:55:52 -07:00
Jeff Walden 860db51b6d Bug 750907 - Move the marking declarations out of jsgcmark.h and into a header with minimal dependencies. r=billm
--HG--
rename : js/src/jsgcmark.cpp => js/src/gc/Marking.cpp
rename : js/src/jsgcmark.h => js/src/gc/Marking.h
extra : rebase_source : 2829c44da4316ceb6af0f4627158e337dd6ba28a
2012-05-01 14:30:18 -07:00
Bill McCloskey 8b5366ab25 Bug 742843 - Clean up weakmap header (r=terrence) 2012-04-09 11:42:04 -07:00
Terrence Cole 7c572b6c0b 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 0021da71d3 Bug 729238 - Save and restore weakmap list during marking validation (r=igor) 2012-02-27 09:48:35 -08:00
Bill McCloskey d15702e36f Bug 641025 - Incremental GC (r=igor,smaug,roc,cdleary,gregor) 2012-02-17 14:35:20 -08:00
Terrence Cole ddb9b610b8 Bug 727281 - Make JSObject* for Root and Barriered marking indirect; r=billm
This will allow us to move HeapPtr and rooted objects when tracing.

--HG--
extra : rebase_source : 6752792c1610899350eee1d5151136090de94f42
2012-02-14 15:19:55 -08:00
Terrence Cole ba12f349e5 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 68b70a8965 bug 660441 - removal of cx parameter from IsAboutToBeFinalized. r=anygregor 2012-02-08 01:51:32 +01:00
Andrew McCreight f14f025a4a 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 1df9abbcac Bug 680937, part 1 - Don't always mark wrapped native keys. r=billm 2011-12-15 17:44:34 -08:00
Andrew McCreight 8a8de0249a Bug 668855, part 1: add JS weak map tracing interface. r=billm 2011-11-24 07:35:56 -05:00
Bill McCloskey 213017df51 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 32114da4b2 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 f90352c158 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)
--HG--
rename : js/src/jshashtable.h => js/public/HashTable.h
rename : js/src/jsvector.h => js/public/Vector.h
rename : js/src/mfbt/InlineMap.h => js/src/ds/InlineMap.h
extra : rebase_source : 818639b74653667b7a572bc1234398c0e4559a60
2011-10-04 15:33:00 -07:00
Igor Bukanov c162775c3e bug 687966 - eliminating held/unheld scripts in the debugger. r=jorendorff 2011-09-20 21:49:12 +02:00
Jeff Walden 14cb9c97c4 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 77e5d2474d Bug 681104 - Add JSTracer flag to disable visiting WeakMap mappings. r=billm 2011-09-04 11:25:49 -07:00
Andrew McCreight 0fe1e1e393 Bug 684595 - Don't visit WeakMap keys from the WeakMap in markentry. r=jorendorff 2011-09-04 10:16:23 -07:00
Luke Wagner 293c7bcf13 Bug 684110 - Clean JSObject::clasp usage (r=pbiggar) 2011-09-02 17:23:26 -07:00
Ed Morley 5ad1e0be99 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 bddd0c80c3 Bug 684110 - Clean JSObject::clasp usage (r=pbiggar) 2011-09-02 17:23:26 -07:00
Jason Orendorff daebe48d84 Merge from mozilla-central to jsdbg2 branch. 2011-07-27 18:23:16 -05:00
Jason Orendorff 5f9f5beb52 Address review comments from billm (bug 672829 comment 15). 2011-07-21 18:14:33 -05:00
Jason Orendorff 9c06df6eb4 Merge from tracemonkey to jsdbg2. 2011-07-01 19:02:40 -05:00
Jason Orendorff 5acf28423c 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 20e7f14050 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 5cfae60d59 No else after return. 2011-06-14 19:32:33 -07:00
Jim Blandy 10db00cf8a 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 add4733d5f Bug 661567: Use RuntimeAllocPolicy in JS WeakMap objects, not ContextAllocPolicy. r=jorendorff 2011-06-14 19:21:47 -07:00
Andrew McCreight 37de4aa0e9 Bug 655297 - Mark XPC wrapped natives used as weak map keys. r=billm 2011-07-22 09:51:51 -07:00
Jim Blandy 58c3e9fa12 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 4ff4d86aa2 Implement Harmony weak maps (bug 547941, r=jorendorff). 2011-04-16 21:23:44 -07:00
L. David Baron b0e2905f19 Back out changeset 7dcd0d16cc08 (bug 547941) for causing jsreftest crashes on debug builds. 2011-04-12 01:28:40 -07:00
Andreas Gal f5b2ab2567 Bug 547941 - WeakMap. r=jorendorff. 2011-04-11 22:38:11 -07:00