Commit Graph

1718 Commits

Author SHA1 Message Date
Steve Fink
f1abc86304 Bug 1259850 - In-source annotations for GC suppression, r=terrence
MozReview-Commit-ID: HaSt3RVV6CM

--HG--
extra : rebase_source : f607cee411ac438e9f17095cd7b5732ccf325443
extra : source : 129559d4ac621b3801e41ce10db1cb4b1a6786da
2016-05-19 12:53:29 -07:00
Wes Kocher
74c78019e7 Backed out 22 changesets (bug 1259850) for GC crashes in various tests CLOSED TREE
Backed out changeset ef5cdcca45d9 (bug 1259850)
Backed out changeset c95bdd426ced (bug 1259850)
Backed out changeset a73f74f718e7 (bug 1259850)
Backed out changeset 95107c3ad9cf (bug 1259850)
Backed out changeset 788ac18818c9 (bug 1259850)
Backed out changeset 19c13aa9b5ad (bug 1259850)
Backed out changeset 0b9dedcf7163 (bug 1259850)
Backed out changeset b641d01138ab (bug 1259850)
Backed out changeset aa434447a11b (bug 1259850)
Backed out changeset 4c7373c6c29e (bug 1259850)
Backed out changeset 457cb29cad55 (bug 1259850)
Backed out changeset 5762a8fba027 (bug 1259850)
Backed out changeset 129559d4ac62 (bug 1259850)
Backed out changeset d00b9c8a7984 (bug 1259850)
Backed out changeset 266befcb8acd (bug 1259850)
Backed out changeset c6615c7b0083 (bug 1259850)
Backed out changeset 196ac1f813f9 (bug 1259850)
Backed out changeset b6108a65dc38 (bug 1259850)
Backed out changeset 0d58f8529b86 (bug 1259850)
Backed out changeset a8d2730ada95 (bug 1259850)
Backed out changeset e8544b072ee6 (bug 1259850)
Backed out changeset 15de0d1d0b05 (bug 1259850)
2016-05-31 11:15:41 -07:00
Steve Fink
4ec00ba75f Bug 1259850 - Comments
MozReview-Commit-ID: 9RjVxl4EX8N

--HG--
extra : rebase_source : 66b76123d3ef36ece9c911eb7815c70f15ed5ad6
2016-05-24 18:26:21 -07:00
Steve Fink
7ef77cb0e1 Bug 1259850 - In-source annotations for GC suppression, r=terrence
MozReview-Commit-ID: HaSt3RVV6CM

--HG--
extra : rebase_source : 9208edf58765abab960fa7188070704ee5bcbf56
2016-05-19 12:53:29 -07:00
Jeff Walden
70329fa4a6 Bug 1270977 - Remove JS::CallReceiver. r=efaust
--HG--
extra : rebase_source : c63656746559d41816e77baa8f12238882bca395
2016-05-26 20:14:39 -07:00
Jeff Walden
c9af593ee4 Bug 1270977 - Modify BoxNonStrictThis to not use CallReceiver. r=efaust
--HG--
extra : rebase_source : f8db060e368df96982a688dd6f71279e876904c9
2016-05-26 14:49:46 -07:00
Terrence Cole
35aa56f100 Bug 1275634 - Drop workarounds for SunPro and XLC now that they support typed enums; r=sfink 2016-05-26 13:52:06 -07:00
Terrence Cole
8ee67582a6 Bug 1275082 - Add missing ValueOperations private accessors; r=sfink 2016-05-23 13:17:12 -07:00
Jan de Mooij
d54ca15369 Bug 1269319 followup - Don't swap an entry with itself to avoid Variant self assignment. r=bustage
--HG--
extra : rebase_source : 0bf8331f4aba57502bbff07df478c1aeb91c2fc6
2016-05-21 18:08:30 +02:00
Jan de Mooij
eb2ea5c544 Bug 1269319 - Make AlignedStorage/AlignedStorage2 non-copyable to fix strict aliasing issues. r=Waldo 2016-05-19 20:57:36 +02:00
Jon Coppeard
3d8e7a7e44 Bug 1273908 - Refactor GC to make it easier to add new kinds of GC thing r=terrence 2016-05-19 10:12:54 +01:00
Terrence Cole
4bf8df3a44 Bug 1266887 - Store Rooted heads on the Zone; r=sfink
--HG--
extra : rebase_source : 30686e746021d123947ade0ad51b10f1b3d32ee9
2016-04-25 12:32:36 -07:00
Myk Melez
88f158a792 Bug 1271014 - return partial result and num bytes/chars written from DeflateStringToUTF8Buffer; r=jandem 2016-05-17 08:31:14 -07:00
Jon Coppeard
35a9e3a430 Bug 1272604 - Add a zeal mode to check the heap after a moving GC r=terrence 2016-05-16 14:23:09 +01:00
Nicholas Nethercote
a36723b8a8 Bug 1267551 (part 8) - Use MOZ_MUST_USE more in js/src/gc/. r=terrence.
--HG--
extra : rebase_source : bb87bee366dcc3c5f14f15532a902ac0b5e430a5
2016-05-09 11:17:26 +10:00
Terrence Cole
f452b33559 Bug 1257387 - Annotate OOM allocation sizes where possible; r=jonco
--HG--
extra : rebase_source : 91d74e18238554d71452498bd25860e78993c7a0
2016-04-22 11:55:34 -07:00
Pip
4e12ba331b Bug 1264613 - Allow object-to-nonobject serialization. r=baku
Fix the Structured Clone API to avoid assigning a numeric back-reference
id to objects that are serialized as non-objects; in particular, this
fixes incorrect serialization and crashes upon deserialization when a
DedicatedWorkerGlobalScope is serialized twice in the same serialization
packet.
2016-04-19 10:26:00 +02:00
Nick Fitzgerald
42225056cf Bug 1211723 and 1260570 - Share JS source text between JSRuntimes; r=jimb
This commit adds `SharedImmutableStringsCache` which allows for de-duplication
and sharing of immutable strings between threads and JSRuntimes.

Each JSRuntime gets a SharedImmutableStringsCache member, but the accessor
always returns the parent runtime's cache. The caches in child JSRuntime's are
not wasting space, however, as initialization and allocation of the table
happens lazily within SharedImmutableStringsCache.

Furthermore, this commit removes `js::ScriptSource::Parent` and the
`CompressedSourceSet`. They are unnecessary because source text is always shared
via the parent runtime's `SharedImmutableStringsCache` now.
2016-05-06 16:53:45 -07:00
Ehsan Akhgari
743de77fb3 Bug 1270370 - Part 2: Expose MapIterator and SetIterator through ESClassValues; r=jorendorff 2016-05-05 19:26:29 -04:00
Anthony Ramine
62b19acdb1 Bug 1270069 - Do not use DebugOnly in ElementAdder. r=nbp
DebugOnly makes binding to other languages (e.g. Rust) more complicated than needed.

--HG--
extra : rebase_source : 83d58042f9ef74a3e02c17b6de51144b721f113e
2016-05-04 08:27:00 -04:00
Jeff Walden
ab5f41a86c Bug 1269928 - Fold DirectProxyHandler into Wrapper, which is now its only (non-test) consumer. r=efaust
--HG--
extra : rebase_source : cfe2b7aafd5867d39445815e8f732a0845d6977d
2016-05-03 17:29:10 -07:00
Jeff Walden
3017794ba8 Bug 888969 - Permit a cyclic [[Prototype]] chain to be created through a Location object. r=bz, r=efaust
--HG--
extra : rebase_source : dca3ecec791ecca5a2512a789c756bb4af1ca895
2016-04-29 19:59:40 -07:00
Terrence Cole
9ca2f324ec Backout edb632ad80c4 (Bug 1266887) for regressing performance on windows. 2016-05-03 13:59:50 -07:00
Shu-yu Guo
d1f542f8c9 Bug 1268805 - Implement PrivateGCThingValue. (r=terrence) 2016-04-29 18:10:07 -07:00
Sebastian Hengst
670924b38b Backed out 2 changesets (bug 1268805) for build bustage. r=backout on a CLOSED TREE
Backed out changeset b8a517eb7c6b (bug 1268805)
Backed out changeset 31075a760b2e (bug 1268805)
2016-04-30 00:52:59 +02:00
Shu-yu Guo
53a6f2cd64 Bug 1268805 - Followup: fix typo on a CLOSED TREE. (r=me) 2016-04-29 15:27:54 -07:00
Shu-yu Guo
e841ff15ad Bug 1268805 - Implement PrivateGCThingValue. (r=terrence) 2016-04-29 15:12:13 -07:00
Terrence Cole
8e2294b2b6 Bug 1267699 - Move some public types to the right namespace; r=sfink
--HG--
extra : rebase_source : f79f7d86aab708b86a65e6f2426baeb8488f47e5
2016-04-26 09:18:48 -07:00
Nicholas Nethercote
2511b2c327 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX

--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
Terrence Cole
e27fba9d56 Bug 1266887 - Store Rooted heads on the Zone; r=sfink
--HG--
extra : rebase_source : 1a9056f7d67eb118d55c789c18935799f871344f
2016-04-25 12:32:36 -07:00
Jan de Mooij
88d16d7efa Bug 1267557 part 0 - Move JS poison constants to jsutil.h. r=jonco 2016-04-28 13:38:05 +02:00
Jeff Walden
56d59777fd Bug 888969 - Make the getPrototypeOf/setPrototypeOf traps scriptable. r=efaust, r=bholley
--HG--
extra : rebase_source : 4a19f3a59e9a5935f8a41f2928b74c0af3947942
2016-02-23 13:42:30 -08:00
Ehsan Akhgari
d46718279a Bug 1266804 - Un-inline js::Unbox(); r=jorendorff 2016-04-26 14:51:47 +08:00
Nick Fitzgerald
6aeb7e7595 Bug 1266573 - Add the JS::ubi::dumpPaths debug utility; r=jimb
MozReview-Commit-ID: Gx37kFnasVl

--HG--
extra : rebase_source : b5ba6bf7853a4ab1753b168c0c304eace5739d5d
2016-04-21 19:23:22 -07:00
Kit Cambridge
033ba99b0d Bug 1256488 - Add explicit casts to fix MSVC warning C4365. r=fitzgen
MozReview-Commit-ID: HuVL7COgcX7

--HG--
extra : rebase_source : 0d087f0ab115a701c3562d33082c9319d72d65bf
2016-04-18 17:29:43 -07:00
Terrence Cole
da3a863a84 Bug 1265483 - Use WeakCache to automate sweeping of ObjectGroupCompartment::NewTable; r=jonco 2016-04-20 15:17:25 -07:00
Shu-yu Guo
a58fd08178 Bug 1265956 - Assert that no entry is found in HashTable::putNew. (r=terrence) 2016-04-20 14:52:12 -07:00
Nicholas Nethercote
5eb5cc7d6c Bug 1132502 (part 1) - Abort if compartmentStats is null during memory reporting. r=jandem.
We have inconclusive evidence that compartmentStats is sometimes nullptr during
memory reporting, which would be bad. This patch makes us abort in that case.
It also changes some pointers to references to make the expected non-nullness
clearer.

--HG--
extra : rebase_source : c49f727450ce065d0e84d7728057c93d35353e91
2016-04-15 12:03:39 +10:00
Terrence Cole
321ad1873e Bug 1263772 - Use WeakCache wrapper to sweep BaseShape table; r=jonco
--HG--
extra : rebase_source : a698230ef1f38bfd549417ed2256603ab94bd49e
2016-04-12 17:05:15 -07:00
Terrence Cole
b7c56d9cba Bug 1233862 - Add a WeakCache builtin to automatically manage sweeping; r=sfink
--HG--
extra : rebase_source : 5731194b652a17fdcbc666d965690949f28b3ada
2015-12-18 14:50:20 -08:00
Tom Schuster
c10d9494c7 Bug 1041586 - Fold away property accesses to not-defined properties. r=jandem 2016-04-14 18:09:56 +02:00
Jon Coppeard
a49aa74ce1 Bug 1259180 - Compact arenas containing scripts r=terrence 2016-04-13 10:03:44 +01:00
Nicholas Nethercote
60dcde7875 Bug 1261723 (part 2) - Separate class ops from js::Class. code=njn,h4writer. r=efaust,bz.
js::Class op are often all null. And when they're not all null, they're often
duplicated among classes. By pulling them out into their own struct, and using a
(possibly null) pointer in js::Class, we can save 114 KiB per process on
64-bit, and half that on 32-bit.
* * *
imported patch separate-ClassOps-2

--HG--
extra : rebase_source : bd751bf247e9491c1966a123dbeffa573657dfb1
2016-04-01 11:00:01 +11:00
Nicholas Nethercote
754dc0bd49 Bug 1261723 (part 1) - Rename js::Class::ops as oOps. r=efaust.
|oOps| is short for "objectOps", which will contrast with the |cOps| "classOps"
field that the next patch will introduce.

--HG--
extra : rebase_source : 920662674e1f672d923cb9060de23c85dfc903bf
2016-04-01 10:59:59 +11:00
Jon Coppeard
c20538fdb8 Bug 1263218 - Fix possbile race under oomTest involving background threads r=terrence
--HG--
extra : rebase_source : 89e57d0d85029caf301f63e8409bffbbd9fd9073
2016-04-12 09:44:11 +01:00
Nick Fitzgerald
03303bde0d Bug 1263270 - Sort census reports by smallest node ID counted, rather than number of nodes counted. r=jimb 2016-04-08 16:21:00 -04:00
Nicholas Nethercote
dbc9af380e Bug 1262731 - Add JS_InitWithFailureDiagnostic(). r=sfink.
This will help identify the cause of some Firefox start-up crashes when JS
initialization fails.

--HG--
extra : rebase_source : 3ed3c5e60f487e0ca11dc13bab93aa820ca8273f
2016-04-08 09:08:49 +10:00
Terrence Cole
6ab8c8ca99 Bug 1259580 - Hide as many Proxy details as possible behind a detail namespace; r=efaust
--HG--
extra : rebase_source : 9acd8f66646e5104579cde751a85175a365c9662
2016-03-24 13:24:51 -07:00
Terrence Cole
172b7c970b Bug 1259578 - Use GC infrastructure to allocate proxy's malloced blob; r=jonco
--HG--
extra : rebase_source : ed7051ff26fdebc7ebbfbe693880dacee51366fa
2016-03-24 13:03:55 -07:00
Nicholas Nethercote
0faa7a06ba Bug 1261720 (part 2) - Move ClassExtension::isWrappedNative into js::Class::flags. r=jorendorff.
This saves 10 KiB of static data on 64-bit, and half that on 32-bit.

--HG--
extra : rebase_source : f0e9c5cdba7f5a71cda046152691de6a5184a223
2016-04-04 08:47:15 +10:00
Nicholas Nethercote
f7dab46ae8 Bug 1261720 (part 1) - Separate js::ClassExtension from js::Class. r=jorendorff,bz.
js::ClassExtension is often all null. When it's not all null, it's often
duplicated among classes. By pulling it out into its own struct, and using a
(possibly null) pointer in js::Class, we can save 17 KiB per process on
64-bit, and half that on 32-bit.

--HG--
extra : rebase_source : eb78ade09ce268e886d091f6cbc38d7e5e912527
2016-04-04 08:45:07 +10:00
Jim Blandy
b44fbd0499 Bug 1251529: In object metadata world, rename "object metadata" to "allocation metadata" and "callback" to "builder". r=fitzgen
Exceptions:
- AutoSetNewObjectMetadata and its related type are still exclusively about objects.
- JSCompartment::objectMetadataTable is still only about objects.
- the ObjectMetadataMap type still only has objects as keys.

Non-exceptions:

The builder type, and the JSCompartment member:
ObjectMetadataCallback -> AllocationMetadataBuilder
objectMetadataCallback -> allocationMetadataBuilder

jsfriendapi.h interface:
SetObjectMetadataCallback -> SetAllocationMetadataBuilder
GetObjectMetadata -> GetAllocationMetadata

JSCompartment methods:
hasObjectMetadataCallback -> hasAllocationMetadataBuilder
getObjectMetadataCallback -> getAllocationMetadataBuilder
setObjectMetadataCallback -> setAllocationMetadataBuilder
forgetObjectMetadataCallback -> forgetAllocationMetadataBuilder
addressOfMetadataCallback -> addressOfMetadataBuilder

Shell and testing functions:
SavedStacksMetadataCallback -> SavedStacksMetadataBuilder
ShellObjectMetadataCallback -> ShellAllocationMetadataBuilder
EnableShellObjectMetadataCallback -> EnableShellAllocationMetadataBuilder
enableShellObjectMetadataCallback -> enableShellAllocationMetadataBuilder
GetObjectMetadata -> GetAllocationMetadata
getObjectMetadata -> getAllocationMetadata

Delayed metadata collection:
shouldDelayMetadataCallback -> shouldDelayMetadataBuilder
JSCLASS_DELAY_METADATA_CALLBACK -> JSCLASS_DELAY_METADATA_BUILDER
suppressObjectMetadataCallback -> suppressAllocationMetadataBuilder

--HG--
extra : rebase_source : 54af5a56edd9b39466fa418f7a72fc586d0482d3
2015-09-01 15:26:46 -07:00
Nicholas Nethercote
3e563eab78 Bug 1260984 (part 3) - Separate js::ClassSpec from js::Class. r=jorendorff.
js::ClassSpec is often all null. When it's not all null, it's often duplicated
among classes. By pulling it out into its own struct, and using a (possibly
null) pointer in js::Class, we can save 138 KiB per process on 64-bit, and half
that on 32-bit.

--HG--
extra : rebase_source : 852ac6770ace46958d018107e78c5c44ebd6528a
2016-04-01 10:59:54 +11:00
Jon Coppeard
ca319d558f Bug 1235677 - Add assertion to catch unsafe concurrent use of AutoEnterOOMUnsafeRegion r=terrence 2016-03-30 12:33:56 +01:00
Phil Ringnalda
4204667ede Back out 735da799e3bb (bug 1211723) for assertion failures and crashes in SharedImmutableStringsCache
CLOSED TREE
2016-03-29 21:57:51 -07:00
Nick Fitzgerald
35e15a7ddb Bug 1211723 - Share JS source text between JSRuntimes; r=jimb
This commit adds `SharedImmutableStringsCache` which allows for de-duplication
and sharing of immutable strings between threads and JSRuntimes.

Each JSRuntime gets a SharedImmutableStringsCache member, but the accessor
always returns the parent runtime's cache. The caches in child JSRuntime's are
not wasting space, however, as initialization and allocation of the table
happens lazily within SharedImmutableStringsCache.

Furthermore, this commit removes `js::ScriptSource::Parent` and the
`CompressedSourceSet`. They are unnecessary because source text is always shared
via the parent runtime's `SharedImmutableStringsCache` now.
2016-03-29 15:15:47 -07:00
Nicholas Nethercote
e114b226dc Bug 1259194 (part 4) - Separate js::ObjectOps from js::Class. r=efaust,mrbkap,bz.
js::ObjectOps is often all null. When it's not all null, it's often duplicated
many times among classes. By pulling it out into its own struct, and using a
(possibly null) pointer in js::Class, we can save 208 KiB per process on
64-bit, and half that on 32-bit.

--HG--
extra : rebase_source : 5be8fe45f652392571b8a6d7b63777cbafba6ae4
2016-03-24 07:00:29 +11:00
Nathan Froyd
cccdd9fbca Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-23 10:40:53 -04:00
Wes Kocher
ea76ed99d7 Backed out changeset 95494e68c722 (bug 1177488) for crashes in test_bug732665.xul CLOSED TREE
MozReview-Commit-ID: IFUHUBUCnCD
2016-03-25 12:11:48 -07:00
Nathan Froyd
418aa2af4f Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-23 10:40:53 -04:00
Jeff Walden
1dd8dbc3f7 Bug 1246061. r=jandem, r=bz, r=luke, r=froydnj
--HG--
extra : rebase_source : 5b314d4c4c6e0b553290884be7338f8e79c22f71
2016-03-09 00:37:20 -08:00
Wes Kocher
1922ce7aa8 Merge m-c to inbound, a=merge CLOSED TREE
MozReview-Commit-ID: KCev5FqbsuD
2016-03-22 16:57:35 -07:00
Carsten "Tomcat" Book
58f863b9a0 Merge mozilla-central to fx-team 2016-03-22 12:32:56 +01:00
Victor Porof
8dd039677b Bug 1258302 - Create a categories module instead of placing everything in global.js, r=jsantell 2016-03-22 10:17:20 +01:00
Jim Blandy
0a2e45670b Bug 1258555: Fix return type of js::GCPointerPolicy::needsSweep. r=terrence
--HG--
extra : rebase_source : 987a12c8e8d32eb13aabd057e7ffa8a77ca84be0
2016-03-21 15:23:08 -07:00
Jon Coppeard
f0d2a7676e Bug 1256672 - Make OOM alloc counters 64 bit. r=terrence 2016-03-15 11:46:00 +01:00
Carsten "Tomcat" Book
41c5d93a8a Backed out changeset 5e4e30fff99b (bug 1235677) for landing with wrong bugnumber 2016-03-16 10:59:41 +01:00
Jon Coppeard
93d786cfd8 Bug 1235677 - Refactor OOM simulation and make counters 64 bit r=terrence 2016-03-16 09:41:57 +00:00
Till Schneidereit
db904728ee Bug 911216 - Part 7: Implement ES6 Promises in the JavaScript engine. r=efaust
--HG--
extra : rebase_source : 44ac4d767f6b2298acea444675c7177cb8f0d602
2015-11-10 12:34:00 +01:00
Jim Blandy
db7bf419d6 Bug 1257395: Update comments for GCHashTable and GCPolicy. DONTBUILD r=terrence
--HG--
extra : rebase_source : 12d7d4f2b7a1178498e1499c1f68b0033449f887
2016-03-16 18:16:01 -07:00
Jeff Walden
1a0903f98c Bug 1257979 - Use a GCHashSet for a hash in the JSON stringifying algorithm. r=sfink
--HG--
extra : rebase_source : c6e2b22de7467ac4c99fa6e010a88c2f2ca1d981
2016-03-18 16:43:53 -07:00
Steve Fink
517605b022 Bug 1246804 - Switch to using in-source annotations. Use C++ inheritance information when describing GC types. Add a test suite., r=terrence
MozReview-Commit-ID: HCcG2k8Wyb9

--HG--
extra : rebase_source : 732ef6ecc52f0e528d38b8c42e442919eba9b5ae
extra : source : 901b1c651c982ccbf42604231c723d168e1cde69
2015-09-29 13:39:33 -07:00
Nick Fitzgerald
1685818a63 Bug 1254092 - TraceIncomingCCWs should work at the JSCompartment level of granularity. r=jimb
There can be multiple compartments within the same zone, only one of which is a
debuggee. In this scenario, CCWs from other compartments into the debuggee
compartment should be traced and treated as roots. Therefore, dealing with CCWs
at the JS::Zone level is incorrect, and this patch changes the granularity level
to JSCompartments. If you look at the callers and uses of the function, it makes
much more sense now.

Additionally, it renames `JS_TraceIncomingCCWs` to `JS::TraceIncomingCCWs`.

--HG--
rename : devtools/shared/heapsnapshot/tests/gtest/DoesCrossZoneBoundaries.cpp => devtools/shared/heapsnapshot/tests/gtest/DoesCrossCompartmentBoundaries.cpp
rename : devtools/shared/heapsnapshot/tests/gtest/DoesntCrossZoneBoundaries.cpp => devtools/shared/heapsnapshot/tests/gtest/DoesntCrossCompartmentBoundaries.cpp
2016-03-14 16:11:00 +01:00
Steve Fink
57bca06b15 Backed out changeset 901b1c651c98 (bug 1246804)
--HG--
extra : rebase_source : d80a34f467275bf74672b87fd09a254b39ee20a1
2016-03-14 21:58:31 -07:00
Steve Fink
2dada4b1a0 Bug 1246804 - Switch to using in-source annotations. Use C++ inheritance information when describing GC types. Add a test suite., r=terrence
MozReview-Commit-ID: HCcG2k8Wyb9

--HG--
extra : rebase_source : 4b048fdcb150662c82e1b623e455551cc7281251
2015-09-29 13:39:33 -07:00
Wes Kocher
168746512d Backed out changeset ee3c99e6f676 (bug 1177488) for LeakSanitizer failures
MozReview-Commit-ID: FFfF4u2vOrS

--HG--
extra : rebase_source : 0c7f5e290b388b2f35837a5f757f2d962b973da3
2016-03-14 13:15:21 -07:00
Nathan Froyd
6b6c2a1fcd Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string.  We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-08 16:29:25 -05:00
Shu-yu Guo
5969cafc7d Bug 1254453 - Support using Variant inside GC wrappers. (r=terrence) 2016-03-11 21:43:20 -08:00
Till Schneidereit
dc24ad50e8 Bug 1254968 - Add support for running JS builtins' constructors over Xray wrappers without unwrapping the newTarget. r=bholley,f=bz 2016-02-10 23:09:13 +01:00
Lars T Hansen
1996b83ba5 Bug 1248153 - Do not convert fp to int by cast. r=waldo
--HG--
extra : amend_source : 6eea6a7a9bf113efe43822423ad7d0ab542d94c7
extra : histedit_source : 63cd6daa497e79a01b7011bb5fb56e098104d00d
2016-03-04 14:18:06 +01:00
Jonathan Watt
fea223341b Bug 1253094, part 4 - Stop using DebugOnly for class/struct members in js/. r=billm
MozReview-Commit-ID: mBuo3b34dR
2016-02-26 15:52:07 +00:00
Emanuel Hoogeveen
c8f99e6a24 Bug 1251833 - Part 3: Merge ArenaHeader into Arena. r=terrence 2016-02-29 11:24:00 -05:00
Emanuel Hoogeveen
75b7110778 Bug 1251833 - Part 1: Move allocation into FreeSpan and move firstFreeSpan to the top of Arenas. r=terrence 2016-02-29 11:21:00 -05:00
Steve Fink
8916274a41 Bug 1251480 - Use Rooted<UniquePtr<StateData>> in place of StateData::CustomAutoRooter, r=bz
--HG--
extra : rebase_source : c68dedf2cdfe1e6fda4941cd1b3c52a20f6b7ffe
2016-02-26 18:16:17 -08:00
Steve Fink
ffcba27ec8 Bug 1251480 - Implement Rooted<UniquePtr<T>>, r=terrence
--HG--
extra : rebase_source : 26962432d56d40f42e89b90e7585037d90ce4b68
2016-02-26 11:56:29 -08:00
Nick Fitzgerald
4562939197 Bug 1249107 - Fix assertion failure when reaching start node in JS::ubi::ShortestPaths; r=jimb
The start node was being marked "visited" at the start of the traversal, but
this broke the invariant that if we come across a target node that is marked
"visited" then we had better have an entry for it in our results map. In order
to maintain this invariant and stop triggering these assertion failures, this
commit stops marking the start node as "visited" right off the bat.
2016-02-22 08:55:00 +01:00
Nick Fitzgerald
241e342004 Bug 961323 - Add a method for finding shortest retaining paths of JS::ubi::Node heap graphs; r=jimb
This commit adds `JS::ubi::ShortestPaths` which can find the N shortest
retaining paths starting from some root for any number of target nodes.
2016-02-11 10:38:00 +01:00
Terrence Cole
4ed1c831e9 Bug 1244909 - Store all persistent roots on the JSRuntime; r=sfink 2016-02-11 13:04:10 -08:00
Nick Fitzgerald
70a5002b41 Bug 1247413 - Give JS::ubi::BreadthFirst handlers a non-const reference; r=jimb 2016-02-11 07:59:00 +01:00
Carsten "Tomcat" Book
b054cb159a Backed out changeset 09836ef7b0f6 (bug 961323) for bustage on a CLOSED TREE
--HG--
extra : rebase_source : 80a8d58487f1e56624bd06572e09cc07e4404fe2
2016-02-12 08:41:24 +01:00
Nick Fitzgerald
649d03679a Bug 961323 - Add a method for finding shortest retaining paths of JS::ubi::Node heap graphs; r=jimb
This commit adds `JS::ubi::ShortestPaths` which can find the N shortest
retaining paths starting from some root for any number of target nodes.
2016-02-11 10:38:00 +01:00
Nicholas Nethercote
931d190779 Bug 1244841 - Don't measure SharedArrayBuffer objects multiple times. r=lth.
Redoes object element measurement and reporting:

- Adds "non-heap/elements/shared", which reports a (size / refcount)
  measurement. Previously these measurements went into
  "non-heap/elements/mapped" and the full size would be erroneously reported
  for every thread sharing the buffer.

- Renames "non-heap/elements/mapped" as "non-heap/elements/normal".

- Renames "malloc-heap/elements/non-asm.js" as "malloc-heap/elements/normal".

- Leaves "{malloc,non}-heap/elements/asm.js" unchanged.

--HG--
extra : rebase_source : cd1a660000fcb95674b317098be2dfec792b2c8e
2016-02-12 09:18:46 +11:00
Nicholas Nethercote
462eb9a0d4 Bug 1245737 (part 2) - Don't bother measuring DtoaState. r=bhackett.
It's gone from 4,096 bytes per JS thread to 72 bytes per thread. (Also, the
old code only measured the DtoaState for the main thread.)

--HG--
extra : rebase_source : bfe0772b8c760a45ca3665e2c0939b121189520a
2016-02-05 14:50:55 +11:00
Terrence Cole
537d4adc58 Bug 1247328 - Make PersistentRooted fully support Move semantics; r=sfink
--HG--
extra : rebase_source : fb4ccb31648f27b75c3088636a9cafd0934b6082
2016-02-10 12:28:18 -08:00
Terrence Cole
dcd54c45e5 Bug 1246697 - Use simpler semantics for PersistentRooted<Traceable>; r=sfink
--HG--
extra : rebase_source : 4b67513c7c9b9405f06c0d633af45c1b8d971393
2016-02-10 09:48:28 -08:00
Nicholas Nethercote
ff840e5f16 Bug 1246855 (part 2) - Measure CompartmentPrivates during memory reporting. r=terrence.
This also expands the coverage to include the hash table elements in the
mWrappedJSMap.
2016-02-10 08:41:38 +11:00
Tom Schuster
9c44f6d73e Bug 1246318 - Make the proxy enumerate trap non-standard. r=efaust 2016-02-10 00:12:24 +01:00
Nicholas Nethercote
3a94c4149a Bug 1245761 (part 2) - Measure JIT compartments. r=jandem.
--HG--
extra : rebase_source : cc6d1c57306405cdaada9ff876256b8eb2dad03f
2016-02-04 17:36:06 +11:00
Hannes Verschore
ccede1b3ba Bug 1242578 - Add documentation about the binary arith annotations for jit coach, r=shu 2016-02-04 06:56:49 -05:00
Hannes Verschore
e9ef8380a9 Bug 1242578 - Annotate binary arith for jit coach, r=shu 2016-02-04 06:56:46 -05:00
Terrence Cole
245c375321 Bug 1244365 - Remove Traceable; r=sfink
--HG--
extra : rebase_source : 8e6498b6e379b026c70b4ba7d13d30b664eef4ed
2016-01-29 16:56:11 -08:00
Terrence Cole
681960447c Bug 1244358 - Support all types in PersistentRooted; r=sfink
--HG--
extra : rebase_source : 4b2d0c675075c1a0e19bad293ca255ba898f057c
2016-01-27 13:03:52 -08:00
Terrence Cole
309f950dae Bug 1243888 - Derive RootKind automatically from TraceKind; r=sfink
--HG--
extra : rebase_source : 4ea174eb95c36ac1452baa0ed44b4c99ff517d9e
2016-01-27 09:54:53 -08:00
Terrence Cole
ecf2779f43 Bug 1234862 - Part 5.1: Followup comment fixes; r=sfink
--HG--
extra : rebase_source : 3f8232d081da939faa9d8890e2001869498d810a
2016-01-28 14:48:17 -08:00
Luke Wagner
c4e57a6906 Bug 1243252 - Remove const restriction on CharsToNewUTF8CharsZ (r=jandem)
--HG--
extra : commitid : CZd2zqCgeCG
extra : rebase_source : 3c6a71b1e64e605d9e5e8bde848a7dc9c12b824d
2016-01-28 09:20:19 -06:00
Tom Schuster
180499c4ff Bug 1242214 - Rename JSPropertyDescriptor JS::PropertyDescriptor in js. r=sstangl 2016-01-28 11:28:04 +01:00
Terrence Cole
52e9feb9d3 Bug 1234862 - Part 5: Rename DefaultGCPolicy to GCPolicy; r=sfink 2016-01-26 12:53:35 -08:00
Terrence Cole
f4ed10f0f7 Bug 1234862 - Part 3: Always use DefaultGCPolicy for GCHashTables; r=sfink 2016-01-25 08:43:53 -08:00
Terrence Cole
bacbbed947 Bug 1234862 - Part 2: Always use DefaultGCPolicy with GCVector; r=sfink 2016-01-22 11:24:11 -08:00
Terrence Cole
eff749c612 Bug 1234862 - Part 1: Rename GCMethods to BarrierMethods; r=sfink
--HG--
extra : rebase_source : a773cf25e8e9986a154b8a8b0d04c6b9267545b8
2015-12-28 10:11:40 -08:00
Jeff Walden
58c4a19e64 Bug 1079844 - Refer to "detaching" instead of "neutering" of ArrayBuffers, in JIT optimization tracking code. r=jandem
--HG--
extra : rebase_source : b29be8b291a5273b36b6249e6db93320aa9a881c
2016-01-24 23:41:38 -08:00
Luke Wagner
b4d7059241 Bug 1234985 - Hoist CStringHasher (r=sfink)
--HG--
extra : commitid : KxwfOhuDfeq
extra : rebase_source : 1a38c30bea5b324ca913a7688c2febd834873d49
2016-01-20 12:00:21 -06:00
Jon Coppeard
de80f46e74 Bug 1240416 Disallow setting GC mark stack size to zero, and assert on attempt to realloc() zero bytes r=terrence 2016-01-20 10:13:14 +00:00
Nick Fitzgerald
59008f94c6 Bug 1233831 - Part 2: Expose JS::gcreason::ExplainReason to embedders; r=terrence
This renames the internal function `js::gcstats::ExplainReason` to
`JS::gcreason::ExplainReason` and publicly exposes it to embedders.
2016-01-19 12:48:22 -08:00
Nick Fitzgerald
445de2814b Bug 1233831 - Part 0: JSAPI plumbing for nursery collection callbacks; r=terrence
This commit adds the relatively boring plumbing needed to expose methods to set
callbacks that get fired on nursery collection start and end, as well as storing
said callbacks internally.
2016-01-19 12:48:22 -08:00
Luke Wagner
72ea23c63e Bug 1239601 - improve the UniquePtr situation (r=jandem)
--HG--
extra : commitid : JegWAoGsuQ9
extra : rebase_source : 995c1b6ab8e4fd3b83c44741cd84a2d7b0d934d7
2016-01-15 18:26:20 -06:00
Luke Wagner
6ebd19920f Bug 1239601 - improve the UniquePtr situation (r=jorendorff)
--HG--
extra : commitid : FwqWNSZ3SKY
extra : rebase_source : 75ed67bfadcbdaeb5bf89a57ad6ca9ef75b7f1f0
2016-01-15 18:26:06 -06:00
Terrence Cole
3c0b63c8e8 Bug 1239515 - Simplify HashSet's key-overwriting interface; r=sunfish 2016-01-14 09:43:30 -08:00
Georg Kilzer
8ffe0ffc55 Bug 1236373 - Fix JSCLASS_CACHED_PROTO_WIDTH's definition when it appears outside the js namespace. r=jwalden
--HG--
extra : rebase_source : 27179d493978c6d5dbc1f5c7d05a6597ae9a0109
2016-01-03 21:15:41 +01:00
Jim Blandy
9aba54fc4f Bug 1236801: Don't check for simulated OOM in a way that invalidates AddPtrs for no discernable reason. (Revised to fix uninitialized var, r=sfink) r=jonco
--HG--
extra : rebase_source : 23222e831fb516bc3cc2672b4c6807564d56bce1
2016-01-12 16:49:45 -08:00
Wes Kocher
0439338087 Backed out changeset 7111837e42b9 (bug 1236801) for SM wError bustage
--HG--
extra : commitid : EZ9x68Sn1qG
2016-01-12 16:55:12 -08:00
Jim Blandy
637fbf70ae Bug 1236801: Don't check for simulated OOM in a way that invalidates AddPtrs for no discernable reason. r=jonco
--HG--
extra : rebase_source : 12fd6cb6969733355581d7cd28876a7b46097c45
extra : amend_source : 04430312d8175c746139a85b0f8062b408c82192
2016-01-08 10:01:53 -08:00
Terrence Cole
738245d262 Bug 1238786 - Part 1: Allow null pointers in public tracing APIs; r=sfink
--HG--
extra : rebase_source : aaa025bffb09758f886450b8a6a9372a65fa6db7
2016-01-12 13:07:53 -08:00
Terrence Cole
cadd5c5f26 Bug 1238779 - Remove the unused and nonsensical JS_TraceRuntime; r=fitzgen 2016-01-12 13:07:54 -08:00
Terrence Cole
b8876546d0 Bug 1238711 - Rename TraceableVector to GCVector; r=sfink
--HG--
rename : js/public/TraceableVector.h => js/public/GCVector.h
2015-12-28 11:45:13 -08:00
Luke Wagner
498e4980ad Bug 1238195 - Switch over some AutoVectorRooters to Rooted<TraceableVector>s and fill in some missing support (r=terrence)
--HG--
extra : commitid : GJxokWWXWjW
extra : rebase_source : ad0f7b28e6da997c139de661182980ecfced1b20
2016-01-11 12:37:11 -06:00
Benjamin Bouvier
a2ffb6e845 Bug 1235408: Lazily resolve SIMD types; r=jandem
--HG--
extra : rebase_source : 552c34977142aa1bb89eced6d709ea3645460f04
2016-01-11 16:03:02 +01:00
Nigel Babu
3989c307d6 Backed out changeset 51e26ad49ed2 (bug 1235408) for build bustage on a CLOSED TREE
--HG--
extra : commitid : 24qZk2WyHvI
2016-01-11 16:27:20 +05:30
Benjamin Bouvier
06044ccf15 Bug 1235408: Lazily resolve SIMD types; r=jandem
--HG--
extra : commitid : KF8d4hqdx47
extra : rebase_source : 19270a20ddcf9b05552a092a6f9f59c89f58f73b
2015-12-31 10:25:00 +01:00
Luke Wagner
ce49978208 Bug 1237508 - Odin: make AsmJSModule derive wasm::Module (r=bbouvier)
--HG--
extra : commitid : FRmfuJ5MQZo
extra : rebase_source : 603b10e7fcf1cd6daa9587cd8e7cab570c519230
2016-01-08 12:35:23 -06:00
Terrence Cole
b7aa38d7ac Bug 1235923 - Part 1: Add C++ APIs for unbarriered pointer tracing; r=sfink 2015-12-30 10:10:29 -08:00
Steve Fink
1445b238f3 Bug 1237445 - Implement GCRekeyableHashMap, r=terrence
--HG--
extra : rebase_source : f07a27b1497d6099300b99ac712e27115be29370
2016-01-06 14:41:12 -08:00
Terrence Cole
eca54a7ace Backout 9dfd86b06459c257390c2514380a09456b008e33 (Bug 1235923) for build bustage on a CLOSED TREE.
--HG--
extra : rebase_source : 412366ba75e73e2338a9ec21a96c40bd466fa6db
2016-01-06 12:05:08 -08:00
Terrence Cole
e03a483cfa Bug 1235923 - Part 1: Add C++ APIs for unbarriered pointer tracing; r=sfink 2015-12-30 10:10:29 -08:00
Terrence Cole
14bc095b59 Bug 1235598 - Part 1: Add better SpiderMonkey API support for tracing in C++; r=sfink
--HG--
extra : rebase_source : 777e1dd17331f38b482fc12ef1e2d96ec61fb02d
2015-12-30 08:52:12 -08:00
Wes Kocher
a69ea37914 Backed out 2 changesets (bug 1235598) for linux reftest bustage
Backed out changeset 3bcd3c276785 (bug 1235598)
Backed out changeset 80cd10a8b3d7 (bug 1235598)

--HG--
extra : commitid : DZRlFy6bH2m
extra : rebase_source : 3479cd1146e58115883f2329861647a962d162cc
2015-12-31 15:51:13 -08:00
Terrence Cole
dbe067989c Bug 1235598 - Part 1: Add better SpiderMonkey API support for tracing in C++; r=sfink
--HG--
extra : rebase_source : 8e2a38d3eedc0bc795be696ca36759c153e3b34e
2015-12-30 08:52:12 -08:00
Sean Stangl
f69acc592f Bug 470143 - Part 2/2 - TrackedOptimization changes for TypeOfNoSuchVar. r=shu 2015-12-15 13:42:56 -08:00
Wes Kocher
a865324b23 Backed out 3 changesets (bug 1235598) for build bustage CLOSED TREE
Backed out changeset 7da07459ce20 (bug 1235598)
Backed out changeset cf35918cb3ba (bug 1235598)
Backed out changeset 55db488f9dfd (bug 1235598)

--HG--
extra : commitid : 2Q694NrtoN0
2015-12-30 15:17:44 -08:00
Terrence Cole
4cc6b37c96 Bug 1235598 - Part 1: Add better SpiderMonkey API support for tracing in C++; r=sfink
--HG--
extra : rebase_source : 66daf07ec194720d31b058ef7288ef1ee2fcf6ca
2015-12-30 08:52:12 -08:00
Luke Wagner
3c88b36742 Bug 1229642 - Split wasm::Module out of AsmJSModule (r=bbouvier)
--HG--
rename : js/src/asmjs/AsmJSFrameIterator.cpp => js/src/asmjs/WasmFrameIterator.cpp
rename : js/src/asmjs/AsmJSFrameIterator.h => js/src/asmjs/WasmFrameIterator.h
rename : js/src/asmjs/AsmJSSignalHandlers.cpp => js/src/asmjs/WasmSignalHandlers.cpp
rename : js/src/asmjs/AsmJSSignalHandlers.h => js/src/asmjs/WasmSignalHandlers.h
rename : js/src/asmjs/Wasm.h => js/src/asmjs/WasmTypes.h
extra : commitid : 4LBqZ9p8yXp
extra : rebase_source : b0b165b4be2a5ac4bca20d75d9561005e8f57020
2015-12-28 17:39:21 -06:00
Jakob Stoklund Olesen
2d7330a315 Bug 1233111 - Add a new ToUint8() function. r=efaust
This is needed for casting values into a SIMD.Uint8x16 lane.

--HG--
extra : rebase_source : 361feb40a7216cacf9e39c4e264b925cb06da540
2015-12-23 09:52:39 -08:00
Jon Coppeard
498b421261 Bug 1232672 - Use MOZ_WARN_UNUSED_RESULT to make hash table clients check for failure r=luke r=billm r=njn 2015-12-22 13:29:43 +00:00
Nick Fitzgerald
bc24ddcf02 Bug 1233101 - Use MOZ_LIKELY in js_new etc to help branch prediction; r=terrence 2015-12-18 12:05:14 -08:00
Nick Fitzgerald
ffd963dd3f Bug 1231763 - Extract breakdown parsing from JS::ubi::Census. r=jimb 2015-12-16 09:19:00 +01:00
Nicholas Nethercote
b23e4b2d7b Bug 1231256 (part 12) - Remove TraceableVectorOperations::canAppendWithoutRealloc. r=terrence.
It's unused.

--HG--
extra : rebase_source : ed5bda7e86e8f39ce3ac220f7cfe5d02cf4897a9
2015-12-09 15:51:31 -08:00
Jan de Mooij
1c94156bf7 Bug 1225396 part 2 - Fix ES6 iterator prototype chains. r=jorendorff 2015-12-09 22:54:44 -05:00
Nick Fitzgerald
4560db90e5 Bug 1170325 - Convert js::Vector into a template alias to mozilla::Vector with a single customized default argument. Also get rid of the CRTP support in mozilla::Vector (through mozilla::VectorBase) now that template aliasing is good enough, and make mozilla::Vector final so that people will use composition and not inheritance with it. (Inheritance plays poorly with movability and a few other things, in addition to messing up template argument deduction matching.) r=Waldo, patch sort of a tag-team between him and me 2015-07-13 12:42:52 -07:00
Jon Coppeard
d8ea08336c Bug 1229493 - Stop shell-only modules classes being reported as standard classes r=shu 2015-12-04 13:47:25 +00:00
Luke Wagner
3e2e979a8b Bug 1229642 - Odin: hoist some things into Wasm.h and simplify symbolic addresses (r=bbouvier)
--HG--
extra : rebase_source : 072480e2713f184b9dbac1e33d4ffb60af1c720c
2015-12-02 21:40:09 -06:00
Jon Coppeard
2ee97dbd00 Bug 1227567 - Optimise module namespace imports in Ion where we have type information r=shu 2015-12-02 10:10:26 +00:00
Steve Fink
ff55707b83 Bug 1225298 - Use GCHashMap for UniqueIdMap, r=terrence
--HG--
extra : rebase_source : 322f5b64eb3e3e37d3ab51ca813b05fe8e78e7bd
2015-11-18 17:37:03 -08:00
Nick Fitzgerald
aba02288a1 Bug 1226416 - Expose a method to get a node's set of immediately dominated nodes in the dominator tree; r=bz,sfink
This adds the `getImmediatelyDominated` method to `DominatorTree` which takes a
node id and returns the set of each node ids for every node that is immediately
dominated by the node with the given id. The results are sorted by greatest to
least retained size. In conjunction with the `root` attribute, this can be used
to traverse the whole dominator tree.
2015-11-30 17:38:06 -08:00
Terrence Cole
9c36f99a19 Bug 1226801 - None of the GCHashMap users require movable keys; r=fitzgen
--HG--
extra : rebase_source : d24e3f8c5cdfa050b166f224d76967b3f02287c2
2015-11-25 11:58:50 -08:00
Benjamin Bouvier
fb5678ed2a Bug 1225605: Store SIMD type descriptors on the global SIMD object rather than on the global; r=jolesen
--HG--
extra : rebase_source : ea5e9ace0782e01695ee266efdffad1c5769e26b
2015-11-20 10:52:33 +01:00
Terrence Cole
2f587b2fc3 Bug 1226687 - Part 1: Export a GCPolicy usable by JS::Heap; r=fitzgen
--HG--
extra : rebase_source : 7ac38143297ef92265faefe6ce800b6c55dcaa64
2015-11-20 13:53:19 -08:00
Nick Fitzgerald
11e1dd10a1 Bug 1226176 - Compute retained sizes in dominator trees and expose them to JavaScript; r=bz,sfink 2015-11-20 09:08:15 -08:00
Steve Fink
696fbb25f1 Bug 1225298 - Use GC policy mechanism for sweeping hashtable-based collections. r=terrence
--HG--
rename : js/public/TraceableHashTable.h => js/public/GCHashTable.h
extra : rebase_source : b3451b355680e384bc7803a30c585fcc457c20c7
extra : amend_source : 441813b8991c13abad251d95b4f2c9867312c39e
2015-11-17 11:33:15 -08:00
Nick Fitzgerald
caf9b0fa0e Bug 1226024 - Expose the root of the dominator tree to JavaScript; r=bz,sfink 2015-11-19 08:10:13 -08:00
Nick Fitzgerald
fb0a5049fc Bug 1225941 - Add a method for getting the set of nodes immediately dominated by another node; r=sfink
This commit adds the `JS::ubi::DominatorTree::getDominatedSet` method. It
returns a range that can be used to safely iterate over all the nodes
immediately dominated by the node used to get the range. The dominated sets are
eagerly computed when creating a `JS::ubi::DominatorTree` and stored in one big
contiguous array, with a side-table that keeps track of the start indices of
each individual dominated set within that contiguous array.
2015-11-19 08:10:13 -08:00
Terrence Cole
2f08c5931f Bug 1225237 - Use stable hashing for DOMExpandoSet; r=jonco
--HG--
extra : rebase_source : 56667af18db264805536e8e559c5dd8d8b2750b3
2015-11-17 11:32:53 -08:00
Nick Fitzgerald
1bcd4d95d4 Bug 1225588 - Expose DominatorTree to JavaScript; r=sfink,bz
This commit adds the DominatorTree.webidl interface, which is only exposed to
chrome JS. The interface is implemented by mozilla::devtools::DominatorTree,
which is a thin wrapper around JS::ubi::DominatorTree. This does not expose any
methods on the DominatorTree interface, those will come as follow up changesets.
2015-11-18 14:12:23 -08:00
Terrence Cole
7b03f08dcb Bug 1225233 - Make MovableCellHasher a public interface, usable by embedders; r=jonco
--HG--
extra : rebase_source : b485e16dc891f610359f7a10404184d631ff4b70
2015-11-17 11:31:52 -08:00
Terrence Cole
5a9e23aec9 Backout 02919b7d57d7 (Bug 1225233) for having regressed all the things.
--HG--
extra : rebase_source : 47a1afd6aff292442a0a552910230d9905686bf0
2015-11-17 16:55:46 -08:00
Terrence Cole
74d8258add Bug 1225233 - Make MovableCellHasher a public interface, usable by embedders; r=jonco
--HG--
extra : rebase_source : 7a6e74ecfdb791f0188d4b8e7b73ca9b2078c425
2015-11-17 11:31:52 -08:00
Terrence Cole
fff89323d3 Bug 1224404 - Use stable hashing for WeakMapPtr; r=jonco
--HG--
extra : rebase_source : 511ef32ad1bfdd4ee9d52fd569821ae395829bdf
2015-11-13 08:41:39 -08:00
Nick Fitzgerald
4e8cbd4024 Bug 961329 - Implement JS::ubi::DominatorTree; r=sfink
This commit adds the `JS::ubi::DominatorTree` class. It uses the simple,
engineered algorithm for finding immediate dominators described in "A Simple,
Fast Dominance Algorithm" by Cooper et al[0]. This commit does not expose
dominator trees to JS, or provide any means of walking the dominator tree. These
things are reserved for future changesets.

[0]: http://www.cs.rice.edu/~keith/EMBED/dom.pdf
2015-11-17 10:02:26 -08:00
Hannes Verschore
a893db58e6 Bug 1214508: SharedStubs - Part 3: Enable the getprop stubs in ionmonkey, r=jandem 2015-11-17 17:57:49 +01:00
Terrence Cole
cf984dfab1 Bug 1223918 - Use stable hashing for WatchPointMap; r=jonco
--HG--
extra : rebase_source : 24f858eff637994394e6e9ec0f5ba01add2fbbf7
2015-11-12 13:44:06 -08:00
Terrence Cole
80c5df8a70 Bug 1220310 - Generalize GC container trace function dispatch as GCPolicy; r=sfink
--HG--
extra : rebase_source : bf48dcfef48b74c1596a47decad9f52ea8a4bc2f
2015-11-03 07:08:05 -08:00
Tom Tromey
141af2d368 Bug 1160307 - capture async stack frames on Javascript timeline markers. r=fitzgen, r=smaug r=Paolo 2015-11-05 11:31:00 +01:00
Jan de Mooij
115d04ec63 Bug 1125423 part 5 - Remove innerObject/outerObject/thisValue Class hooks. r=luke 2015-11-06 19:03:52 +01:00
Jan de Mooij
a84c33ecb0 Bug 1125423 part 1 - Attach WindowProxies to globals instead of using innerObject/outerObject hooks. r=bz,luke 2015-11-06 19:03:51 +01:00
Nick Fitzgerald
704858e786 Bug 1220031 - Add JS::ubi::Node::scriptFilename; r=sfink 2015-11-04 05:49:33 -08:00
Jeff Walden
790d87d4be Bug 1208808 - Move time zone adjustment information out of JSRuntime, into global state protected by a spinlock. r=till
--HG--
extra : rebase_source : b412e298217a2857bf34b73b1128c97cc047e6af
2015-10-30 16:14:32 -07:00
Phil Ringnalda
b79efb4eaf Back out changeset 6e21339a66ed (bug 1208808) for bustage in the mislabelled and deceptive arm64 simulator
CLOSED TREE
2015-10-31 01:44:22 -07:00
Jeff Walden
1b692c0c1a Bug 1208808 - Move time zone adjustment information out of JSRuntime, into global state protected by a spinlock. r=till
--HG--
extra : rebase_source : 1c59ffd1509c52791ab737df338962cf2c68dbc0
2015-10-30 16:14:32 -07:00
Jon Coppeard
a6103d6c93 Bug 1219183 - Update comments that reference renamed thisObject hook r=shu 2015-10-30 09:50:06 +00:00
Terrence Cole
2ee6159bdb Bug 1219419 - Keep DefaultTracer simple for now; r=fitzgen
--HG--
extra : rebase_source : e9d040a6d574f5fa60158ff8521cde1cab08e14c
2015-10-28 13:42:16 -07:00
Boris Zbarsky
7ae3b58eb6 Bug 1039986. Make Function.prototype.toString work on Web IDL interface objects. r=jorendorff,peterv 2015-10-27 16:25:14 -04:00
Jon Coppeard
59be23d316 Bug 930414 - Replace |thisObject| object op with |thisValue| and use if for modules r=shu r=smaug 2015-10-21 10:21:44 +01:00
Jon Coppeard
ff7b5cb56e Bug 930414 - Implement module namespaces r=shu 2015-10-21 10:21:44 +01:00
Michael Wu
ed4b205b47 Bug 1212663 - Use doxygen style comments in jsapi, r=Waldo 2015-10-17 13:27:16 -04:00
Nick Fitzgerald
842b5596e6 Bug 1213436 - Reject core dumps with node IDs that don't fit in an IEEE 754 double; r=sfink 2015-10-13 11:59:00 +02:00
Nick Fitzgerald
040e2d5aab Bug 1211006 - Add Debugger.Source.prototype.canonicalId; r=ejpbruel 2015-10-13 09:42:39 -07:00
Nick Fitzgerald
f3032c8c01 Bug 1201620 - Make SavedFrame stacks structured cloneable; r=sfink 2015-10-12 13:29:48 -07:00
Morris Tseng
6c0c249c5a Bug 709490 - Part 3: Transfer OffscreenCanvas from mainthread to workers. r=baku, r=sfink
Thanks Jon Morton [:jmorton] (jonanin@gmail.com) for polishing patches.

--HG--
extra : rebase_source : 5cbf8b9f53b7d1978c6371dbdb3771f80b94a171
2015-10-12 11:21:03 +08:00
Lars T Hansen
38703f8d07 Bug 1212390 - fix lingering bugs around oomAtAllocation. r=jonco 2015-10-09 10:58:12 +01:00
Jon Coppeard
93caf76aac Bug 1212430 - Remove CrashAtUnhandlableOOM() and replace with AutoEnterOOMUnsafeRegion r=jandem 2015-10-08 10:49:49 +01:00
Jon Coppeard
7187bae5a8 Bug 1208665 r=Waldo a=abillings 2015-10-07 11:04:37 +01:00
Shu-yu Guo
76da4d1112 Bug 1202902 - Support non-syntactic extensible lexical scopes. (r=billm) 2015-10-06 14:00:29 -07:00
Shu-yu Guo
aedb453377 Bug 589199 - Make a global lexical scope and hook it up to JS entry points. (r=efaust) 2015-10-06 14:00:28 -07:00
Jon Coppeard
a758f19926 Bug 1209911 - Remove option to simulate OOM on all threads r=terrence
--HG--
extra : rebase_source : c03694b314165446ffa3a6ab4d70fea02c202055
2015-10-06 14:50:50 +01:00
Jon Coppeard
810fbfb206 Bug 1209911 - Make AutoEnterOOMUnsafeRegion ignore threads that are not simulating OOM r=terrence
--HG--
extra : rebase_source : 99b217832f10946adf18896a1bb064092bb0b7fd
2015-10-06 14:50:49 +01:00
Wes Kocher
7492fb02ac Merge inbound to central, a=merge 2015-10-05 13:02:21 -07:00
Wes Kocher
c1750b75c7 Backed out 11 changesets (bug 709490) for webgl-color-test.html failures a=backout
Backed out changeset fc04c5d43550 (bug 709490)
Backed out changeset cd8f9410d335 (bug 709490)
Backed out changeset 6e687c9143c1 (bug 709490)
Backed out changeset 9b20f2c833c4 (bug 709490)
Backed out changeset f9d130aea88e (bug 709490)
Backed out changeset fc513b410949 (bug 709490)
Backed out changeset acf6220b431a (bug 709490)
Backed out changeset 9bceaf913791 (bug 709490)
Backed out changeset 37fba20111e2 (bug 709490)
Backed out changeset 2285ce1596b8 (bug 709490)
Backed out changeset fb4e09920569 (bug 709490)
2015-10-05 08:28:25 -07:00
Nick Fitzgerald
ee543a3018 Bug 1209263 - Allow embedders to tell SpiderMonkey how to structured clone principals; r=bz
--HG--
extra : rebase_source : 04835c034431953344e83203e7753043461474ba
2015-10-02 16:44:00 +02:00
Morris Tseng
0e4c914203 Bug 709490 - Part 3: Transfer OffscreenCanvas from mainthread to workers. r=baku, r=sfink
Thanks Jon Morton [:jmorton] (jonanin@gmail.com) for polishing patches.

--HG--
extra : rebase_source : 8ee6656a9c2008482967962fed280ef78d0ff991
2015-10-05 10:50:16 +08:00
Nick Fitzgerald
30e17cfd82 Bug 1196461 - De-duplicate strings in heap snapshot core dumps; r=shu,jimb
This changeset replaces all of the

    // char16_t[]
    optional bytes someProperty = 1;

one- and two-byte string properties in the CoreDump.proto protobuf definition
file with:

    oneof {
        // char16_t[]
        bytes  someProperty    = 1;
        uint64 somePropertyRef = 2;
    }

The first time the N^th unique string is serialized, then someProperty is used
and the full string is serialized in the protobuf message. All following times
that string is serialized, somePropertyRef is used and its value is N.

Among the other things, this also changes JS::ubi::Edge::name from a raw pointer
with commented rules about who does or doesn't own and should and shouldn't free
the raw pointer to a UniquePtr that enforces those rules rather than relying on
developers reading and obeying the rules in the comments.
2015-09-30 16:03:31 -07:00
Jason Orendorff
deb2270515 Bug 1054756, part 5 - Remove Class::convert.
--HG--
extra : commitid : 6KCxWrCseSZ
extra : rebase_source : 63f3cd6ec1ade43c732ffd9b661fe6f2dca9eb4b
2015-03-20 16:28:59 -05:00
Jason Orendorff
e2eba49587 Bug 1054756, part 4 - Remove BaseProxyHandler::defaultValue. r=jandem.
--HG--
extra : commitid : 6Z8hk7yUjaS
extra : rebase_source : cc5bfa42ce5790b87681f254e15c0ec8c9ced98f
2015-03-20 14:03:24 -05:00
Jon Coppeard
204777d13d Bug 1207519 - Prevent HashTable shrink from ignoring allocation failures that may have been reported r=Waldo 2015-09-30 11:34:49 +01:00
Jon Coppeard
e189757ace Bug 1200642 - Fix some more OOM handling problems r=terrence 2015-09-30 11:34:49 +01:00
Jon Coppeard
3616fbd00c Bug 1200642 - Add OOM simulation to hastables r=terrence 2015-09-30 11:34:49 +01:00
Andrea Marchesini
83c3255308 Bug 1203920 - Get rid of JS_SetStructuredCloneCallbacks, r=sfink 2015-09-29 21:40:16 +01:00
Terrence Cole
fe83447e72 Bug 1196848 - Add Zone::uniqueIds to about:memory reports; r=njn
--HG--
extra : rebase_source : 313662129f131a9249b73232c600f34c92738078
2015-08-26 14:51:43 -07:00
Terrence Cole
a6855649ac Bug 1196847 - Part 2: Implement a cell hasher that uses unique id based hashes; r=jonco
--HG--
extra : rebase_source : 4d33add708a491e27492f9cdb63d98e76a7af94e
2015-08-26 14:51:35 -07:00
Terrence Cole
01fd1cc898 Bug 1196847 - Part 1: Allow storage of a unique id for a cell independent of address; r=jonco
* * *
imported patch rewrite_uid_on_ht_with_zone_sweeping

--HG--
extra : rebase_source : fc3a37b4ea6bbf32f8f55f56a1c4846be92c0164
2015-08-20 10:35:22 -07:00
Wes Kocher
8631de9c2b Backed out 13 changesets (bug 709490) for android webgl-color-test.html failures
Backed out changeset 5be7514914b6 (bug 709490)
Backed out changeset 04b6f94fbe8a (bug 709490)
Backed out changeset 00c0e85dd8cd (bug 709490)
Backed out changeset 221385b7b81a (bug 709490)
Backed out changeset ecc38c18734f (bug 709490)
Backed out changeset 22878c936384 (bug 709490)
Backed out changeset 0edcbb60eee3 (bug 709490)
Backed out changeset 5feceec2014b (bug 709490)
Backed out changeset 835b655cb873 (bug 709490)
Backed out changeset 6fbb4a3f8cf7 (bug 709490)
Backed out changeset a5f8646fa156 (bug 709490)
Backed out changeset 2ae1386916b3 (bug 709490)
Backed out changeset 6b29a2a0a8fb (bug 709490)
2015-09-29 08:57:36 -07:00
Morris Tseng
5bfbf77ee0 Bug 709490 - Part 3: Transfer OffscreenCanvas from mainthread to workers., r=baku, r=sfink 2015-09-29 11:51:24 +01:00
Terrence Cole
c4ccb272ae Backout cca86cd156cf (Bug 1196847) for regressing EarleyBoyer. 2015-09-28 14:57:16 -07:00
Terrence Cole
b5775180d1 Backout 74608aa063b9 (Bug 1196847) for regressing EarleyBoyer. 2015-09-28 14:56:57 -07:00
Jeff Walden
780b2875a9 Bug 1101561 - Fix generator bootstrapping (for legacy and star generators both) to be OOM-safe. r=jandem
--HG--
extra : rebase_source : a80a7ad7bbac563e489c8c110d9df40a26a161ca
2015-09-24 12:51:56 -07:00
Terrence Cole
0c90745b80 Bug 1196847 - Part 2: Implement a cell hasher that uses unique id based hashes; r=jonco
--HG--
extra : rebase_source : e1464d566ec7dbf85b1b9d861450906945057e23
2015-08-26 14:51:35 -07:00
Terrence Cole
a10a39f891 Bug 1196847 - Part 1: Allow storage of a unique id for a cell independent of address; r=jonco
* * *
imported patch rewrite_uid_on_ht_with_zone_sweeping

--HG--
extra : rebase_source : e0d01c24e9ea7cdb9660f5cac3b65699eb091cfd
2015-08-20 10:35:22 -07:00
Terrence Cole
9f3728184b Bug 1205454 - Consolidate the tagged pointer marking methods; r=sfink
--HG--
extra : rebase_source : 18d7fe3f1f7d652e07c18a6e40b1b88f0e36cef0
2015-09-17 10:57:55 -07:00
Jeff Walden
9bc7583ece Back out 62ab5e142af3, 387c21d5c4e3, e3138a3efe4a, d8b09e2a11f1, 8add4271e98c, and ead219581dbe for bustage. r=badness-10000 in a CLOSED TREE 2015-09-24 19:43:36 -07:00
Jeff Walden
2b52966dc7 Bug 1101561 - Fix generator bootstrapping (for legacy and star generators both) to be OOM-safe. r=jandem
--HG--
extra : rebase_source : 4508a3ec55595d62c29776715d82f46e2739a014
2015-09-24 12:51:56 -07:00
Nick Fitzgerald
b3dadc255e Bug 1206290 - Part 1: Implement a JS::ubi::PostOrder depth first traversal; r=sfink 2015-09-24 14:01:22 -07:00
Nick Fitzgerald
896a2e9849 Bug 1206290 - Part 0: Move js/UbiNodeTraverse.h to js/UbiNodeBreadthFirst.h; r=sfink
--HG--
rename : js/public/UbiNodeTraverse.h => js/public/UbiNodeBreadthFirst.h
2015-09-24 14:01:22 -07:00
Wes Kocher
b19d88b060 Backed out 7 changesets (bug 1206168, bug 1177318, bug 1054756) for hazard build failures CLOSED TREE
Backed out changeset e892727a373a (bug 1206168)
Backed out changeset 6c93d1044b7e (bug 1054756)
Backed out changeset 105433ce195b (bug 1054756)
Backed out changeset 13128a88f2b9 (bug 1054756)
Backed out changeset c250abf4fd17 (bug 1054756)
Backed out changeset fc9fef646a97 (bug 1054756)
Backed out changeset c8897f109a08 (bug 1177318)
2015-09-23 12:31:19 -07:00
Jason Orendorff
54e92d9beb Bug 1054756, part 5 - Remove Class::convert.
--HG--
extra : commitid : KrjkP1flM3c
extra : rebase_source : 8c367e3158528e92ac8ebc51521d32472f1e5bb1
2015-03-20 16:28:59 -05:00
Jason Orendorff
69f5edcebe Bug 1054756, part 4 - Remove BaseProxyHandler::defaultValue. r=jandem.
--HG--
extra : commitid : 2c3wdgbGsGs
extra : rebase_source : d7d00204286b855fc90e19ac85c74f046166b643
2015-03-20 14:03:24 -05:00
Nick Fitzgerald
54a8708a3a Bug 1182653 - Use JSRuntime* instead of JSContext* in ubi::Node infrastructure; r=sfink
This enables the use of ubi::Node in situations where a JSContext* is not
available, and paves the way for debugging utilities to dump shortest paths from
GC roots to a given ubi::Node that can be used while paused in a debugger.
2015-09-23 09:39:56 -07:00
Jon Coppeard
76c5197467 Bug 930414 - Add hook for HostResolveImportedModule r=shu 2015-09-23 15:47:39 +01:00
Jeff Walden
4046fe1490 Bug 1179003 - Convert the infallible objectClassIs proxy hook into a fallible getBuiltinClass hook that indicates class type via outparam. r=efaust, r=bz on DOM bits, r=billm on IPC bits
--HG--
extra : rebase_source : 6ddc3727c411fdfced6338e5e383a10572575f0f
2015-08-28 21:55:40 -07:00
Nick Fitzgerald
e1f7ac5d49 Bug 1199216 - Implement JS::ubi::Node::size for JSScript referents; r=sfink 2015-09-22 12:15:23 -07:00
Nick Fitzgerald
6085d9d0f0 Bug 1199215 - Implement JS::ubi::Node::size for JS::Symbol referents; r=sfink 2015-09-22 12:15:23 -07:00
Nick Fitzgerald
6f88dbdf6e Bug 1206288 - Remove JS::ubi::SimpleEdge and make JS::ubi::Edge a concrete class; r=shu 2015-09-22 11:34:30 -07:00
Carsten "Tomcat" Book
651a168616 merge mozilla-inbound to mozilla-central a=merge
--HG--
rename : toolkit/devtools/server/actors/styleeditor.js => devtools/server/actors/styleeditor.js
rename : toolkit/devtools/server/actors/stylesheets.js => devtools/server/actors/stylesheets.js
rename : toolkit/devtools/gcli/commands/screenshot.js => devtools/shared/gcli/commands/screenshot.js
2015-09-22 12:35:13 +02:00
J. Ryan Stinnett
4f1af0e003 Bug 912121 - Update misc. DevTools paths and comments. rs=devtools
--HG--
extra : commitid : BSf4D59s9HF
extra : rebase_source : 4d14e1aa3ad93bbb426861336e8b703bc1e0b3af
2015-09-21 12:07:31 -05:00
Jeff Walden
65b65a4999 Bug 1187234 - Throw a TypeError when Array.isArray is passed a revoked proxy. r=efaust 2015-08-23 01:10:24 -07:00
Jon Coppeard
b815d04f9b Bug 1201057 - Move AutoEnterOOMUnsafeRegion to Utility.h with the other OOM simulation infrastructure r=terrence 2015-09-21 14:31:51 +01:00
Nick Fitzgerald
8098307c50 Bug 1204584 - Ensure that entries created by AutoSPSEntry propogate their category information; r=djvj
This commit renames ProfileEntry::set{Js,Cpp}Frame methods to
ProfileEntry::init{Js,Cpp}Frame to highlight the fact that they are intended to
initialize the entry, and that setting other flags should happen after one of
these calls.
2015-09-19 11:19:07 +02:00
Tom Schuster
98ae187a52 Bug 603201 - Change GetProperty receiver argument to Value in JS. r=efaust 2015-09-18 00:14:33 +02:00
Terrence Cole
c5685d0363 Bug 1204594 - Use MOZ_RAII to replace GUARD_OBJECT where possible in the GC; r=sfink
--HG--
extra : rebase_source : 50eb4339b8fe16376c39a07978d61f6ea1f47eae
2015-09-15 12:12:26 -07:00
Nick Fitzgerald
89e4d96d13 Bug 1204613 - Add a static_assert that ProfileEntry::{Flags,Category} do not overlap; r=djvj
--HG--
extra : rebase_source : d5c6e873e2f10479b92da829d93af0a36bba6f82
2015-09-14 11:57:00 +02:00
Jakob Olesen
e9ff98b451 Bug 1204102 - Add missing includes and namespaces to UbiNodeCensus files. r=sfink
--HG--
extra : rebase_source : 3a6d3748a0d49c4070cf5b0d7b44df8ce5d748ac
2015-09-14 13:59:00 +02:00
Nick Fitzgerald
31d58123f4 Bug 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj 2015-09-14 12:15:12 -07:00
Nigel Babu
962c78b6e0 Backed out changeset 3fac2976a472 (bug 1204168) for build bustage
CLOSED TREE
2015-09-14 22:11:51 +05:30
Nick Fitzgerald
c65c4a0250 Bug 1204168 - Add the js::ProfileEntry::setCategory method; r=djvj 2015-09-14 09:19:59 -07:00
Michael Layzell
0097c41e01 Bug 1201190 - Part 3: Mark every consumer of GUARD_OBJECT as MOZ_RAII, r=ehsan 2015-09-12 16:53:33 -04:00
Christian Holler
3f7b44f628 Bug 1199203 - Add support for per-thread OOM testing. r=jonco 2015-09-11 16:11:56 +02:00
Nigel Babu
33d16f7c15 Backed out changeset ad5849c18324 (bug 1199203) for build bustage ON A CLOSED TREE 2015-09-10 08:26:52 +05:30
Christian Holler
f4d10e47aa Bug 1199203 - Add support for per-thread OOM testing. r=jonco 2015-09-10 03:46:45 +02:00
Terrence Cole
0716d4888f Bug 1199843 - Part 3: Strongly type JS::TraceChildren; r=jonco r=mccr8
--HG--
extra : rebase_source : c779897338dc4b73dca98517acb8d0eef7e0d7a5
2015-09-02 11:34:36 -07:00
Terrence Cole
eb27be9309 Bug 1199843 - Part 2: Use js::TraceChildren everywhere we don't need external linkage; r=jonco
--HG--
extra : rebase_source : 59ab475354a7d82dae761f55224da3402be59769
2015-09-02 09:01:02 -07:00
Terrence Cole
4955cf8ac2 Bug 1196925 - Remove the non-existing relocatable store buffer counts from about:memory; r=njn 2015-08-26 14:51:43 -07:00
Terrence Cole
e391ea26d3 Backout c9e469c6b915 (Bug 1196847) for regressing octane.
--HG--
extra : rebase_source : 5798a27913a55f86d4f1ca7068e1c9255514e9d0
2015-09-03 09:38:04 -07:00
Terrence Cole
d0d0a951de Backout 7f6585a46cd0 (Bug 1196847) for being on top of a regression.
--HG--
extra : rebase_source : 9c9b94cf6e514c603fa8e7964da1d51004326399
2015-09-03 09:37:19 -07:00