Commit Graph

67 Commits

Author SHA1 Message Date
Bill McCloskey
d80b33e02c Bug 677773 - Allow JS crash diagnostics to be disabled; simplify them (r=dmandelin,ted) 2011-08-12 06:57:45 -07:00
Matt Brubeck
5a6712b2b5 Back out cd7f694c9f2f (bug 677773) because of build failures 2011-08-12 07:35:31 -07:00
Bill McCloskey
b6af04e6bb Bug 677773 - Allow JS crash diagnostics to be disabled; simplify them (r=dmandelin,ted) 2011-08-12 06:57:45 -07:00
Jim Blandy
3ee5bd65a5 Bug 672728: Define MoveRef, an rvalue reference type; provide some support for move construction and assignment in js::Vector and js::HashTable. r=luke 2011-08-01 17:52:53 -07:00
Bill McCloskey
162941e24a Bug 673625 - Add more assertions to check JSScript validity (r=dmandelin) 2011-07-25 18:05:05 -07:00
Bill McCloskey
2a3d5215a6 Bug 662646 - GC topcrash diagnostics [needs backout before Aurora merge!] (r=dmandelin) 2011-07-07 17:31:24 -07:00
Luke Wagner
c9e1bf13c0 Bug 667915 - Don't let content JS consume all the stack and cause chrome JS to OOM (r=waldo,mrbkap) 2011-06-30 09:26:56 -07:00
Luke Wagner
0319982d42 Bug 665247 - Remove unused metering code (r=igor)
--HG--
extra : rebase_source : 78ec31e4236f63f8a91024f34b1b99a889dc47f5
2011-06-21 10:26:22 -07:00
David Mandelin
2299c54162 Bug 656282: Remove redundant declaration that causes an MSVC warning, r=luke
--HG--
extra : rebase_source : 42c6e9594f36fd7320bdea90fdb01c955bf07f4d
2011-05-16 16:17:19 -07:00
David Mandelin
37887345d9 Backed out changeset de6dfe16fd91 due to Linux/Mac build bustage 2011-05-23 14:22:03 -07:00
David Mandelin
f7eb07c405 Bug 625600: Update Yarr import to WebKit rev 83339, r=cdleary,dvander 2011-05-12 18:39:47 -07:00
Chris Leary
a7253cc393 Bug 654301: Better interned string API, take 2. (r=Waldo) 2011-05-17 12:15:12 -07:00
Paul Biggar
e0fa025e18 Bug 657384: Change new_ parameters to pass-by-copy, not pass-by-const-reference. (r=luke)
new_ [1] took a const reference for each of its parameters. Unfortunately, that
adds const-ness even when the constructor needs non-constness. Unfortunately,
the other way (turning off constness) can lead to excess copying.

According to the Forwarding Problem [2], there is no great solution here. C++
does not have a perfect way to write a function which wraps another function.
So we settle for non-constness, and we must rely on forbidding copying of
expensive objects.

[1] as in cx->new_<T>(p1)
[2] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm
2011-05-17 04:25:39 -07:00
Chris Leary
089bf2c468 Back out bug 654301 to run again on try. 2011-05-16 19:03:20 -07:00
Chris Leary
338cf025af Bug 654301: Better interned string API. (r=Waldo) 2011-05-16 18:18:59 -07:00
Chris Jones
ea1f5e599c Bug 647011: Sprinkle some DebugOnly in js/src. r=luke 2011-04-20 18:27:30 -05:00
Paul Biggar
59c1af50d3 Fix minor typo, followup to bug 634155 (no review) 2011-03-31 19:34:14 -07:00
Paul Biggar
43b850291d Bug 643548: Remove mozalloc_undef_macro_wrappers hack from JS engine. (r=luke,rs=brendan)
mozalloc_undef_macro_wrappers are brittle and have side-effects that are hard
to debug and fix. The alternative is the just stick an underscore on the end of
malloc, free, etc, which is a comparatively small burden.
2011-03-31 01:14:12 -07:00
Paul Biggar
72c7701093 Bug 634155: Account for NewCompartment's memory, and change allocation APIs (r=nnethercote)
This changes the allocation API, in the following way:

  js_malloc -> {cx->,rt->,OffTheBooks::}malloc
  js_calloc -> {cx->,rt->,OffTheBooks::}calloc
  js_realloc -> {cx->,rt->,OffTheBooks::}realloc
  js_free -> {cx->,rt->,Foreground::,UnwantedForeground::}free
  js_new -> {cx->,rt->,OffTheBooks::}new_
  js_new_array -> {cx->,rt->,OffTheBooks::}new_array
  js_delete -> {cx->,rt->,Foreground::,UnwantedForeground::}delete_

This is to move as many allocations as possible through a JSContext (so that they may be aken into account by gcMallocBytes) and to move as many deallocations to the background as possible (except on error paths).
2011-03-31 01:13:49 -07:00
Luke Wagner
7c96945e3c Bug 613457 - clean up string interfaces (r=njn)
--HG--
extra : rebase_source : 3e77b67fa9fe2cc31312ad99951cf92258a98e64
2011-03-14 13:59:53 -07:00
Paul Biggar
be81e401da Bug 642327 - Add OOM regression checking to the shell via |make check|. (r=nnethercote)
In a known test file, there are 129 OOM errors. This adds a script which checks
the number of unhandled OOMs, and fails if it is not exactly 129. If we
accidentally increase the number of unhandled OOMs, this should catch it. If we
reduce the number of unhandled OOMs (which is the plan), then adjust this
number in Makefile.in.
2011-01-17 15:15:00 -08:00
Igor Bukanov
6990aee491 Bug 633219 - replacing resolve hashtable with a linked list. r=luke 2011-03-07 23:00:00 +01:00
Igor Bukanov
e9f9fd9db6 Backed out changeset 510c42c0d472 - bug 633219 2011-02-17 19:39:05 +01:00
Igor Bukanov
8bc1ca45aa Bug 633219 - replacing per context resolving list with per-thread resolving list. r=lw 2011-02-15 13:57:54 +01:00
Igor Bukanov
02ca585380 bug 632003 - var declarations should ignore prototype properties, r=jwalden 2011-02-11 14:58:53 +01:00
Rafael Ávila de Espíndola
61100744cd Bug 622144 - Code must #include <string.h> to use memset. r=dmandelin, a=shaver 2011-01-22 08:52:25 -08:00
Nicholas Nethercote
ed55695802 Bug 624878 - Remove dangerous uses of vanilla (throw-on-failure) |operator new|. r=lw. 2011-01-17 19:44:10 -08:00
Luke Wagner
05acea426c Bug 624218 - Fix PodCopy assert (r=jorendorff)
--HG--
extra : rebase_source : 5b969a4c98cc3a3a22432b45d6787c93e8a4ea5b
2011-01-11 15:20:07 -08:00
Luke Wagner
d8719356c0 Bug 609440, part 4 - make JSString::chars() fallible (r=waldo,dvander,igor,dwitte,njn) 2010-12-06 10:26:58 -08:00
Robert Sayre
2d10c1480d Merge tracemonkey to mozilla-centra. a=blockers. 2010-11-17 13:55:14 -08:00
Igor Bukanov
52ea348c4c bug 610198 - Replacing JS_GetStringBytes usage with JS_EncodeString. r=gal 2010-11-11 21:40:29 +01:00
David Anderson
7487c14d37 Backed out changeset 8e119f847f97 (build busted) 2010-11-11 11:19:42 -08:00
Igor Bukanov
e32ba97023 bug 610198 - Replacing JS_GetStringBytes usage with JS_EncodeString. r=gal 2010-11-02 15:36:25 +01:00
Chris Leary
c85d4936d7 Bug 605754 - regexp topcrash diagnostics. r=dmandelin, a=dmandelin 2010-11-15 19:40:26 -08:00
Gavin Sharp
b3af616f19 Backed out changeset 031e9ea92ed1 (bug 605754) due to Windows build bustage, a=red 2010-11-15 23:13:20 -05:00
Chris Leary
ed9f0e208b Bug 605754 - regexp topcrash diagnostics. r=dmandelin, a=dmandelin 2010-11-15 19:40:26 -08:00
Luke Wagner
c286afd4be Bug 609075 - speed up JSString::flatten a bit, part 2 (r=gal) 2010-11-08 14:35:30 -08:00
Ginn Chen
b1fc7ea706 Bug 601835 Add JS_STATIC_ASSERT back for Solaris Studio, r=brendan 2010-10-11 18:23:55 +08:00
Gregor Wagner
9aad841305 Bug 594455 Add assertions for defaultCompartments. r=jorendorff 2010-10-01 11:10:30 -07:00
Brendan Eich
790ddc9e99 Merge JSScope into JSObject and JSScopeProperty (now js::Shape; bug 558451, r=jorendorff). 2010-08-29 11:57:08 -07:00
Luke Wagner
42f82923f9 Fix bustage; don't #include jstl.h from jsvalue.h, it messes up the mozalloc wrapper ritual
--HG--
extra : rebase_source : ac82f78d3d34a8d58d28d7e556ae4fd516fc83d5
2010-08-09 13:59:28 -07:00
Igor Bukanov
63f9c2e3d5 bug 553033 - replacing the background free list with a vector. r=jwalden 2010-04-27 15:46:24 +02:00
Mike Moening
a82a061ff5 Bug 549532 - Allow custom memory allocator use in spidermonkey. Part 1. r=dvander. 2010-04-16 15:03:53 -04:00
Robert Sayre
ec12d7736d Backed out changeset c9faf5a2bc75 2010-04-13 18:15:20 -04:00
Mike Moenig
7cb366214a [JAEGER] Allow custom memory allocator use in spidermonkey (bug 549532, r=dvander). 2010-04-12 18:51:25 -07:00
Jason Orendorff
7ef276f207 Bug 545962 - Workers for the js shell. r=igor. 2010-04-06 08:15:15 -05:00
Jeff Walden
95422c65a3 Backed out changeset e7065853ef79; I'll be repushing this incrementally, attempting to find the precise place where things go bad, in the near future. Happy days are here again! :-\ 2010-03-26 18:01:54 -07:00
Jeff Walden
106fbd8085 Bug 548702 - Temporary value-rooting scheme should be C++- and RAII-based, not macro-based. r=igor
--HG--
extra : rebase_source : c7bb34662dbd70df49d40880227139537c60356e
2010-01-11 11:52:21 -06:00
Jason Orendorff
102ed4de5a Do not secretly write to /tmp in DEBUG builds unless your name is brendan. (Leave the basic stats code ifdef'd on for everyone though, to help avoid bitrot.) No bug, r=Waldo. 2009-12-17 11:37:25 -06:00
Robert Sayre
e7f09943fc Merge. 2009-12-15 22:35:15 -05:00