Commit Graph

99 Commits

Author SHA1 Message Date
Terrence Cole
2c6246852d Bug 759991 - Fix infinite loop in rekeyFront with fully collided Table; r=luke
This hooks up the same path to putNew, because it is slightly more efficient and
fixes an OOM failure introduced in c9024bcb8da0.
2012-06-06 16:40:56 -07:00
Nicholas Nethercote
267c1cb82d Bug 760337 - Add JS_ASSERT(table) where appropriate in HashTable.h. r=luke.
--HG--
extra : rebase_source : ab85f7061f79605afe54a6341612cededef35558
2012-06-04 00:00:24 -07:00
Terrence Cole
373c2da2dd 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
8f0eb7c918 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
53b40ccbbb 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
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Terrence Cole
a0e0ea194e Bug 744579 - Implement a relocatable version of HeapPtr; r=billm
We cannot store HeapPtrs in memory that may be realloced outside of the GC.
Instead we should use the RelocatablePtr, which is more expensive, but is able
to handle being moved, or EncapsulatedPtr which requires external barriers.

--HG--
extra : rebase_source : 949c71cfdab8005339aea49437922f7f00a6f73a
2012-05-15 17:21:23 -07:00
Nicholas Nethercote
b55e7d8641 Bug 755581 - Follow-up: replace js::RuntimeSizes with JS::RuntimeSizes. r=luke.
--HG--
extra : rebase_source : a1081266cec2f249f8acac782c2c806e5db705aa
2012-05-17 17:08:57 -07:00
Jason Orendorff
7bbae7c493 Bug 756260 - Fix up building without JS_HAS_XML_SUPPORT, again. r=terrence.
--HG--
extra : rebase_source : 9b0bc4f31db387e4e98821d712309792c07eac1c
2012-05-17 16:24:32 -05:00
Nicholas Nethercote
14ad857e16 Bug 755581 (part 5) - Add "cross-compartment-wrappers" reporter. r=luke.
--HG--
extra : rebase_source : 1dfb5eb522008acd59f6bce5e1724af1dc0da9f0
2012-05-15 19:31:01 -07:00
Nicholas Nethercote
9e31860570 Bug 755581 (part 4) - Add "math-cache", "script-filenames" and "compartment-objects" reporters. r=luke.
--HG--
extra : rebase_source : cc1fc8ff91a7b63b8a1fd48aac3b5f37c7e84393
2012-05-15 19:30:28 -07:00
Nicholas Nethercote
56b8cb2a5a Bug 755581 (part 3) - Clean up JSRuntime::sizeOfIncludingThis(). r=luke.
--HG--
extra : rebase_source : 892163d96148ed86a190ee7221235dc529445fef
2012-05-15 19:29:14 -07:00
Nicholas Nethercote
a57ef676b8 Bug 755581 (part 2) - Change "runtime/normal" reporter to "runtime/dtoa". r=luke.
--HG--
extra : rebase_source : 6dfe281494588628c3335058d333080f86bb3487
2012-05-15 19:28:31 -07:00
Terrence Cole
ab1313c6c1 Bug 753479 - Make HashTable::Enum::rekeyFront take a separate Lookup; r=luke
--HG--
extra : rebase_source : 7f8b2cda64f34c60f702182f64e370a73a593934
2012-05-04 14:18:28 -07:00
Terrence Cole
2d725e1799 Bug 752604 - Ergonomics improvements for HashTable::rekeyFront; r=luke
--HG--
extra : rebase_source : 9764f2db38844106ac13f5281d85464f0b2aff80
2012-05-07 12:46:28 -07:00
Luke Wagner
712afdc579 Bug 720753 - hoist JaegerCompartment and MathCache from JSCompartment into JSRuntime (r=bhackett,njn) 2012-05-03 09:12:47 +02:00
Justin Lebar
e7e161cf7f Bug 748440 - Part 1: Add heap-committed-unused and heap-committed-unused-ratio memory reporters, and rename some JS memory reporters to match. Also add back the js-gc-heap memory reporter. r=njn
--HG--
rename : browser/components/privatebrowsing/test/unit/test_privatebrowsing_telemetry.js => browser/components/privatebrowsing/test/unit/test_privatebrowsing_autostart.js
rename : browser/components/privatebrowsing/test/unit/test_privatebrowsingwrapper_telemetry.js => browser/components/privatebrowsing/test/unit/test_privatebrowsingwrapper_autostart.js
rename : security/manager/ssl/src/TransportSecurityInfo.cpp => security/manager/ssl/src/nsNSSIOLayer.cpp
rename : security/manager/ssl/src/TransportSecurityInfo.h => security/manager/ssl/src/nsNSSIOLayer.h
extra : rebase_source : 237a72f9b82f0e39dd0f15afa6056f231dc58358
2012-04-30 14:27:15 -04:00
Boris Zbarsky
7e0db46628 Bug 748237. Only do the c++11 stuff for clang here, since otherwise we get scary warnings with gcc on android. r=luke 2012-04-26 00:43:00 -04:00
Tom Schuster
fde4c4d67e Bug 735036 - Check for OOM in debug only method. r=luke 2012-04-24 20:03:48 +02:00
Justin Lebar
5766598758 Bug 741378 - Rejigger the js memory reporters to match jemalloc's. r=njn 2012-04-16 12:20:54 +10:00
Justin Lebar
b391903730 Back out changeset 21f34fdd64a3 (bug 741378) because it breaks telemetry. r=me 2012-04-16 11:34:00 +10:00
Justin Lebar
dbb7a3bbac Bug 741378 - Rejigger the js memory reporters to match jemalloc's. r=njn 2012-04-16 11:17:26 +10:00
Christian Holler
826d2446be Bug 734976 - Call js_ReportOutOfMemory in jsgcinlines when simulating OOM. Original patch by Brian Hackett. r=luke,bhackett,jdemooij 2012-04-14 11:37:32 -07:00
Jeff Walden
5e9385a53d Fix clang JS shell build bustage. No bug, r=billm over irl 2012-04-12 18:15:26 -07:00
Matt Brubeck
b7d725d72a Back out e4c82a6b298c, 036194408a50, 39acc9f51df8 (bug 714647 and followups) because of test_finalizer.js crashes in Linux64 PGO builds 2012-04-12 22:07:43 -07:00
Jeff Walden
2e8482d1bf Fix clang JS shell build bustage. No bug, r=billm over irl 2012-04-12 18:15:26 -07:00
Terrence Cole
870bfd5f18 Bug 744192 - Assert that Vectors do not contain implicitly postbarriered types; r=luke
Since vectors move their memory around outside the control of the GC, it is not
valid to store an implicitly post-barriered item in a Vector.

--HG--
extra : rebase_source : 2cef4d855cc4e926cea872cda18e5cf29230f0a7
2012-04-11 17:14:11 -07:00
Bas Schouten
67b6c99e9f Bug 719776 - Part 2: Make MOZ_CRASH and MOZ_ASSERT expand inline. r=waldo 2012-04-12 02:03:07 +02:00
Phil Ringnalda
4348c0ace3 Back out 4b82f26f8593:2fcf9cbedd48 (bug 743393, bug 719776) for bustage 2012-04-11 09:06:40 -07:00
Bas Schouten
57bf03284d Bug 719776 - Part 2: Inline MOZ_Assert and MOZ_Crash. r=waldo 2012-04-11 16:55:31 +02:00
Terrence Cole
766f061885 Backed out changeset a43eb4a2d2fd 2012-04-10 17:03:25 -07:00
Terrence Cole
431a41bf56 Bug 744192 - Assert that Vectors do not contain implicitly postbarriered types; r=luke
Since vectors move their memory around outside the control of the GC, it is not
valid to store an implicitly post-barriered item in a Vector.
2012-04-10 16:43:54 -07:00
Terrence Cole
ae810f2b36 Bug 744052 - Restructure HashTable::checkOverflow for easier reading; r=luke
When I added this function, I just copied the existing logical structure.  It
makes more sense here to check overflowed and return early, since we can do this
now.
2012-04-10 09:51:48 -07:00
Terrence Cole
49d3da6509 Bug 743885 - Fix OOM handling regression in HashTable; r=luke
Introduced by me in bug 722946.
2012-04-09 19:07:11 -07:00
Daniel Holbert
6fdccfb996 Bug 742438: Fix straggling bool-vs-NULL comparison after HashSet::put return-type change. r=terrence 2012-04-04 11:18:18 -07:00
Terrence Cole
ed16bd1b59 Bug 740153 - Don't expose Entry directly through HashMap; r=luke
HashMap and HashSet only expose Entries through Ptr and Range, except for one
variant of put. They also don't expose the default size they use if you call
init() without an argument. These weirdnesses seem to be interface carried over
from the old jsdhash.

The first oddness is unused and can be removed, the second should simply get
exposed to make it easier to wrap HashMap and HashSet.

--HG--
extra : rebase_source : e1432a9af189229f379158ba0529956ddbf5f234
2012-03-30 11:01:58 -07:00
Terrence Cole
a683dde987 Bug 722946 - Add method to HashTable::Enum for inline rekeying; r=luke
It is possible in several places to have unconstrained client objects as the key
of a HashMap/HashSet. For generational and compacting GC, we will need to move
these objects in memory. This means we will need to remove and re-insert these
keys in a new location, during GC. Because we cannot safely allocate memory for
this, we need a specialized algorithm inside the HashTable itself.
2012-03-14 13:48:59 -07:00
Ehsan Akhgari
aad636cb78 Backout changeset ea6be5f60c42 (bug 722946) for breaking Windows builds 2012-03-14 14:29:58 -04:00
Terrence Cole
6ab75b39c1 Bug 722946 - Add method to HashTable for inline rekeying/removal; r=luke
It is possible in several places to have unconstrained client objects as the key
of a HashMap/HashSet.  For generational and compacting GC, we will need to move
these objects in memory.  This means we will need to remove and re-insert these
keys in a new location, during GC.  Because we cannot safely allocate memory
for this, we need a specialized algorithm inside the HashTable itself.
2012-02-03 15:43:34 -08:00
Christian Holler
b58d4954ab Bug 733493 - Improve JS shell OOM testing code, now with 100% less bustage. r=jorendorff 2012-03-10 15:53:03 -05:00
Gary Kwong
2eec22319a Backed out changeset 6169d8aa7a9d, a=tbplFire 2012-03-10 12:12:54 -08:00
Christian Holler
5dc19ab62e Bug 733493 - Improve JS shell OOM testing code, r=jorendorff 2012-03-10 11:50:26 -08:00
Igor Bukanov
30d3de8268 bug 728250 - remove JSPrincipals::codebase. r=:luke,:bz
In just 2 cases where JSPrincipals::codebase is used it can be reconstructed from the values stored in the associated nsJSPrincipal. In addition the patch makes nsJSprincipals to inherit both from nsIPrincipal and JSPrincipals allowing to use static_cast to convert between nsIPrincipal and JSPrincipals pointers and to drop many cases of manual JSPrincipal reference counting.
2012-03-09 10:48:50 +01:00
Jason Orendorff
0af3864536 Add static assertions as requested in bug 726298 comment 2 and 4.
--HG--
extra : rebase_source : 3edf2446076dae08c16b121de18505174c84f370
2012-03-01 12:48:47 -06:00
Jason Orendorff
8e4eb12002 Fix hilarious bug in js_malloc: it fails once every 2^32 allocations in DEBUG builds. Bug 730270, r=luke. 2012-03-01 09:01:45 -06:00
Justin Lebar
b682bbe4a5 Bug 731789 - Rename mfbt/StdInt.h to mfbt/StandardInteger.h, so stdint types work from cpp files inside mfbt. r=waldo 2012-02-29 22:56:43 -05:00
David Mandelin
b29f6a956a Bug 731492: Remove obsolete typedef JSPackedBool, r=luke
--HG--
extra : rebase_source : 95423985f55547755a988ba19629678997bfa553
2012-02-28 19:03:57 -08:00
Igor Bukanov
267b62cdb3 Bug 731618 - remove JSContext * parameter from heap iteration API. r=:Billm 2012-02-29 21:23:53 +01:00
Nicholas Nethercote
9727de241c Bug 729403 (part 2, take 2) - Add js/runtime/gc-marker memory reporter. r=wmccloskey.
--HG--
extra : rebase_source : c48aacddd186be0de3c74153f5e5e4049d09a87b
2012-02-26 20:20:15 -08:00
Nicholas Nethercote
d6aeabe8ce Bug 729403 (part 1, take 2) - Add Vector::sizeOf{In,Ex}cludingThis(). r=luke.
--HG--
extra : rebase_source : d745c1b1b9ca30c6836c31b03ded4dcab22a2565
2012-02-26 20:18:13 -08:00