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

1474 Коммитов

Автор SHA1 Сообщение Дата
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