Commit Graph

2192 Commits

Author SHA1 Message Date
Andreea Pavel
b0e30af17e Merge mozilla-inbound to mozilla-central. a=merge 2018-07-13 00:51:26 +03:00
Matt Howell
638dfe2577 Bug 1052582 Part 2 - Create and use a separate malloc arena for ArrayBuffer contents. r=sfink
MozReview-Commit-ID: 7IlFvr3hoA8

--HG--
extra : rebase_source : 862a259389e7085f4b5c6cb2b27d3f72627e36b3
2018-05-23 14:57:42 -07:00
Matt Howell
76ff0a0612 Bug 1052582 Part 1 - Support an arena parameter for js_pod_malloc and friends. r=sfink
This patch adds new functions taking the arena parameter rather than overloading
existing functions, because there are already overloads of calloc that take
two size_t parameters (which arena_id_t is an alias for), so it couldn't have
been done that way, and malloc and realloc needed to be consistent with calloc.

MozReview-Commit-ID: 1MUXoCUgJWO

--HG--
extra : rebase_source : 16261ba4e802efa0bc65878d490ae9b62aa35797
2018-06-29 13:06:14 -07:00
Kristen Wright
19310fa39a Bug 1466979 - Separate JS::ubi::EdgeVectorTracer and JS::ubi::SimpleEdgeRange into UbiNodeUtils.h r=jimb
Separated SimpleEdgeRange into the new UbiNodeUtils.h, updated build files, changed SimpleEdgeRange::init to SimpleEdgeRange::addTracerEdges, created bool addEdge to add new edges to the vector.
2018-05-31 14:13:00 -07:00
Wander Lairson Costa
a6edc697ce Bug 1473818: Fix global constructors count regression r=jonco
Bug 1465505 moved from PRJ_Now to mozilla::TimeStamp. As a side effect,
it introduced a few extra global constructors calls.

This patch fixes it.

MozReview-Commit-ID: 9VX83JZIyds

--HG--
extra : rebase_source : 01a22a8eea3ab224dbaa1a93d2a73ebb9ab6b6ea
2018-07-06 18:28:08 -03:00
Matthew Gaudet
5d0bf9c261 Bug 1469044: [Part 2] Remove remainder of MathCache r=jandem
--HG--
extra : rebase_source : 587d69130f2c6d50ca8e14bd0ccaf7a4f58285e8
2018-07-09 16:52:16 -04:00
Jan de Mooij
4da897f207 Bug 1468752 part 2 - Define Wrapper::wrapperHandler in Wrapper.h. r=bz
IsCrossCompartmentWrapper calls IsWrapper and then had an out-of-line call to Wrapper::wrapperHandler, but that's just loading the proxy handler and we already did that in IsWrapper. Having Wrapper::wrapperHandler in the header file means the compiler can compile IsCrossCompartmentWrapper much better.
2018-07-06 12:53:38 +02:00
Jan de Mooij
0e1a7bcb9f Bug 1468752 part 1 - Define js::IsCrossCompartmentWrapper in Wrapper.h. r=bz
js::UninlinedIsCrossCompartmentWrapper is used for some DEBUG asserts to avoid #include cycles.
2018-07-06 12:52:03 +02:00
Jeff Walden
90507ffb7a Bug 1426909 - Introduce a new mfbt/Utf8.h header for UTF-8-related functionality, including a UTF-8 code unit type that is compatible with, but doesn't directly interconvert with, |char|. r=froydnj
--HG--
extra : rebase_source : 00760186060d7e72fac783af3fc5595a6057feca
2018-01-11 11:29:53 -07:00
Wander Lairson Costa
4c52aa4d3f Bug 1465505: Replace PRMJ_Now() by mozilla::TimeStamp r=jonco
Notice as TimeStamp is not an integral type, it can't be wrapped by
mozilla::Atomic. However, we wrap it in MainThreadData to assure it only
is accessed from the main thread.

Another issue is that TimeStamp class does allow some operations on a
Null value, with assertions on debug builds.

MozReview-Commit-ID: 9GPNDUooQmI

--HG--
extra : rebase_source : e2b5fe81a4c5c696425583a04395f2ae79aeaccc
2018-07-04 16:55:11 -03:00
Jan de Mooij
a94a5f8023 Bug 1472132 - Don't inline non-scripted functions in Ion when constructing and new.target != the callee. r=anba 2018-07-02 18:34:02 +02:00
Jeff Walden
83a1c5a302 Fully privatize the contents of the JS::Value union now that it cannot be POD because it has a non-trivial default constructor. No bug, r=me as trivial
--HG--
extra : rebase_source : 222290ba211e2fbe1693498a42d43a2064af45b8
2018-06-26 16:18:55 -07:00
André Bargull
4db79fda8c Bug 1471931 - Part 5: Use MakeUnique in more places and replace manual js_delete with UniquePtr. r=sfink
--HG--
extra : rebase_source : cb6018da067352c1c1a04c3ff0385fa0cf70e020
2018-06-29 02:33:51 -07:00
Ted Campbell
ab67c3fb81 Bug 1471272 - Add [SMDOC] tags for in-source documentation. r=jandem,nbp
MozReview-Commit-ID: I038aYgvwe4
2018-06-28 15:23:25 -04:00
André Bargull
1eba073f7e Bug 1467438 - Part 4: Remove ScopedJSFreePtr, ScopedJSDeletePtr, and ScopedReleasePtr. r=sfink 2018-06-07 12:33:40 -07:00
Jon Coppeard
5aa3632b14 Bug 1468867 - Rename heap state checking functions r=sfink 2018-06-15 15:05:06 -07:00
Jan de Mooij
d4eded1ef6 Bug 1468252 part 4 - Add JSObject::nonCCWGlobal() and use it in a few places. r=luke
--HG--
extra : rebase_source : 095b86326a1911cf68956e4a4133bec4a8b1bdb9
2018-06-14 09:07:31 -07:00
Tom Schuster
9aeac2c930 Bug 1329321 - Add a soft-fail mechanism for JS ObjectOpResult. r=jorendorff
--HG--
extra : rebase_source : 168a0a678d62879dce0075ecedb8fb0703ceb8c1
2018-05-16 22:11:25 +02:00
Jan de Mooij
2b3ff5c90a Bug 1468219 - Rename JS_InitStandardClasses to JS::InitRealmStandardClasses, remove obj argument. r=anba
--HG--
extra : rebase_source : 5c092c37298e89096b85524e92d143ff2447f31f
2018-06-13 12:47:47 -07:00
Jan de Mooij
de211d96a6 Bug 1468137 - Remove JS_Get*Prototype APIs; use JS::GetRealm*Prototype instead. r=evilpie
--HG--
extra : rebase_source : 9d5e815b83b3a71ab3e74fc2c0e2feb1009f2af9
2018-06-13 12:47:40 -07:00
Steve Fink
bc2be79d2a Bug 1405374 - Register JS threads with the profiler, r=jonco
--HG--
extra : rebase_source : c29dffb341bff5e3f020ad0be6d48c045e178a5c
2018-06-07 15:37:08 -07:00
Jan de Mooij
6d0be5a5cf Bug 1466121 part 2 - Make Compartment and Zone classes instead of structs. r=luke
--HG--
extra : rebase_source : 1394dc86b035340f99c241f3ee1af5dd407bdb67
2018-06-07 16:45:04 +02:00
Jan de Mooij
f7fb3be6ec Bug 1466121 part 1 - Rename JSCompartment to JS::Compartment. r=luke
--HG--
extra : rebase_source : cd7140ecda54f0caa02a96f562167b3c9a107450
2018-06-07 16:44:40 +02:00
Jan de Mooij
156284156a Bug 1363214 - Remove JS::Realm/JSCompartment inheritance. r=jonco
--HG--
extra : rebase_source : ad63de7c6676532640659d1fccced7f83798e06d
2018-06-06 14:30:52 +02:00
Jon Coppeard
4d20a29316 Bug 1466792 - Update out-of-date memory allocation comments r=sfink 2018-06-06 10:54:59 +01:00
André Bargull
272b9eeecd Bug 1464845 - Remove js_strdup and JS_strdup. r=Waldo 2018-06-04 13:34:06 -07:00
Andreea Pavel
4ced6e8b2d Merge mozilla-central to autoland. a=merge 2018-06-03 07:27:01 +03:00
Emilio Cobos Álvarez
1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Jan de Mooij
112114fba6 Bug 1465163 - Some UbiNode changes for same-compartment realms. r=fitzgen 2018-06-01 19:23:06 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jan de Mooij
f3fe2d13d4 Bug 1465472 - Remove the atoms realm/compartment. r=jonco
Some of the less trivial changes:

* When we allocated a symbol, we used the atom realm's RNG to create a hash code [0]. Instead of this I added a RNG for this to the runtime.

* IsCompilingWasm returned true if the JitContext's realm is nullptr, but that's now also true when we initialize the trampolines stored in the atoms zone. To fix that I added a CompileZone* to JitContext, in addition to the CompileRuntime and CompileRealm, and we now check the zone instead of the realm in IsCompilingWasm.

* JSContext::hasEnteredRealm is only called in DEBUG builds so I made hasEnteredRealm and enterRealmDepth_ #ifdef DEBUG.
2018-05-31 12:53:26 +02:00
Jan de Mooij
ce3eb7d5c0 Bug 1464374 part 2 - Pass JS::Realm* instead of JSCompartment* to CallSetup. r=bz,luke
The principals are on the realm so we need a realm instead of a compartment. Also adds js::GetNonCCWObjectRealm to get the realm of a non-CCW object.
2018-05-31 11:28:48 +02:00
Jan de Mooij
09c4068fa0 Bug 1464134 part 1 - Fix various places to use Realm instead of JSCompartment. r=luke 2018-05-31 11:28:48 +02:00
Steve Fink
0680fed494 Bug 1464266 - Rename GCForReason to NonIncrementalGC, r=jonco
--HG--
extra : topic : GCForReason
extra : rebase_source : e81bf7bb8ca0824f8b63f25a46ccbe26c4002325
2018-05-24 16:19:18 -07:00
Jan de Mooij
45e968b1dd Bug 1464134 part 8 - Make IterateHeapUnbarriered and related code use realms instead of compartments. r=jonco 2018-05-30 20:14:19 +02:00
Jan de Mooij
31c08cb474 Bug 1464036 part 2 - Give JSID_EMPTY its own jsid tag and clean up jsid code a bit. r=jonco 2018-05-30 13:51:58 +02:00
Philip Chimento
fb2e0702aa Bug 1464912 - Add exposeToActiveJS specialization for JSString. r=sfink 2018-05-28 14:47:33 -07:00
Jan de Mooij
7148cd7d35 Bug 1464036 - Remove PropertyInfo constructor to keep MSVC from generating static initializers. r=bz
--HG--
extra : rebase_source : c59d1878615029c7c8b075f4ec288daef77414c6
2018-05-26 14:14:10 +02:00
Jon Coppeard
f00009e1f9 Bug 1459577 - Check expected types with static assertions in GCPolicy implementations r=jandem 2018-05-25 16:07:56 +01:00
Jon Coppeard
d3bd086af9 Bug 1460341 - Replace GCPolicy<T>::initial() with SafelyInitialized<T>() r=Waldo 2018-05-25 10:01:25 +01:00
Robin Templeton
d94dd48d6f bug 1366287 - Part 3: Define the BigIntObject class for BigInt wrapper objects. r=jwalden
--HG--
extra : rebase_source : 13c0fad1858df84252c4a796fcf3c2d2e08009a6
2018-05-11 19:43:45 -07:00
Robin Templeton
82800930df bug 1366287 - Part 2.1: Track GMP memory allocation from XPCOM. r=njn
Based on similar functionality for ICU. Define a GMPReporter class and
use its methods for libgmp allocation.

--HG--
extra : rebase_source : 4b536f8a331146109f1cbecf7246f5d4063ec457
2018-05-11 19:42:49 -07:00
Robin Templeton
de41c625dd Bug 1366287 - Part 1.0: Define a new BigInt primitive type, with a GDB prettyprinter, Rust binding support, and a new out-of-line TraceKind. (Disabled by default, implemented only incompletely, currently passing --enable-bigint will disable JITs, will be flipped on Eventually once every sub-aspect is in place, Don't Have A Cow, Man.) r=jwalden, r=Ms2ger, r=sfink
--HG--
extra : rebase_source : aa13bd94bc6157ff8134894e3ba2e7a2b53e28d9
2018-05-24 11:26:09 -07:00
Jon Coppeard
02d634159d Bug 1463723 - Remove ubi::Census' pointer to the atoms zone r=fitzgen 2018-05-24 09:40:46 +01:00
Steve Fink
e1fedf5974 Bug 1442722 - Move scope into JSStructuredData, r=baku,jorendorff
--HG--
extra : topic : clone.refactor
extra : rebase_source : 657bfd1a4c87de0a27c99e685adbf739c907ed6c
2018-04-03 11:17:33 -07:00
Steve Fink
8b2be29d0a Bug 1456512 - Move JS::operator==(GCCellPtr,GCCellPtr) to the global scope to avoid shadowing, r=jonco
--HG--
extra : topic : gray.crash
extra : rebase_source : 0d6f29c45607b980072286cdc77b8b57c9336aa1
2018-05-18 13:43:14 -07:00
Jeff Walden
0128813edd Bug 1462261 - Abandon the idea of HashTableEntry being "POD", make its constructor explicitly initialize HashTableEntry::keyHash, give it a destructor that destroys the stored T if the entry is live, and call both constructor and destructor in the necessary places. r=jandem
--HG--
extra : rebase_source : 99c72ac86fa32d683397c8060d58872617153976
2018-05-16 14:18:11 -07:00
Jeff Walden
5bd2e61e1d Bug 1462261 - Don't use AlignedStorage2 to implement HashTableEntry. r=jandem
--HG--
extra : rebase_source : 79e9c2287f8e443ff5da1c96f3707b8d066099fc
2018-05-16 13:29:52 -07:00
Jan de Mooij
f820ec7afa Bug 1461938 part 5 - Some atoms compartment/realm related changes. r=jonco 2018-05-18 15:18:23 +02:00
Jan de Mooij
969bbf2190 Bug 1461938 part 1 - Store JS::Realm* instead of JSCompartment* in JSContext. r=luke
--HG--
extra : rebase_source : 7af7e5854bdbe0d750a13e0e8c70a71c2c5f88c3
2018-05-17 18:02:40 +02:00