Commit Graph

2761 Commits

Author SHA1 Message Date
Jon Coppeard
f88eca81a5 Bug 1585921 - Use root marking functions to trace unbarriered pointers in GCPolicy traits since this is only safe when we're marking roots r=sfink
The root marking functions have assertions that will catch this being used outside of heap marking.

Differential Revision: https://phabricator.services.mozilla.com/D48534

--HG--
extra : moz-landing-system : lando
2019-10-09 10:30:02 +00:00
Jon Coppeard
f5b3722028 Bug 1585921 - Remove unnecessary static trace methods which are never called r=sfink
GCPolicy<T> calls the instance method for these types so these static methods aren't required.

Differential Revision: https://phabricator.services.mozilla.com/D48533

--HG--
extra : moz-landing-system : lando
2019-10-09 10:27:15 +00:00
Tom Ritter
117e232bdc Bug 1576254 - Add isSystemOrAddonPrincipal to JSPrincipal and nsJSPrincipals r=luke
Finally, here we add the virtual method isSystemOrAddonPrincipal to the
JSPrincipal object.

We also add it to nsJSPrincipal (where it has an easy implementation), and
to carry classes that are used by JS tests and the shell.

Differential Revision: https://phabricator.services.mozilla.com/D47477

--HG--
extra : moz-landing-system : lando
2019-10-04 17:37:36 +00:00
Tom Ritter
754ebbc4d7 Bug 1576254 - Add a wasmForTrustedPrinciples bool onto ContextOptions that (currently) behaves the exact same as the wasm bool r=luke
In a future commit we will tie this boolean to its own preference value, but here we
initialize it with the same value as the wasm boolean.

We also update wasm::HasSupport to check the to-be-added isSystemOrAddonPrincipal()
method on JSPrincipals to determine which member (wasm or wasmForTrustedPrinciples)
to consult.

Differential Revision: https://phabricator.services.mozilla.com/D47472

--HG--
extra : moz-landing-system : lando
2019-10-04 17:35:46 +00:00
Tom Ritter
206eea6eb4 Bug 1576254 - Move Clamping and Jittering from RealmCreationOptions to Behaviors r=luke
CreationOptions are intended to be immutable and not change during realm operation.
Behaviors change, and clamping/jittering should reside on behaviors.

Differential Revision: https://phabricator.services.mozilla.com/D43296

--HG--
extra : moz-landing-system : lando
2019-10-04 17:35:26 +00:00
Paul Bone
ba0077d908 Bug 1530251 - Rename DefaultNurseryBytes -> DefaultNurseryMaxBytes r=jonco
Also:
 * Update the DefaultNurseryMaxBytes comment
 * Fix the shell parameter handling.

Differential Revision: https://phabricator.services.mozilla.com/D47869

--HG--
extra : moz-landing-system : lando
2019-10-03 05:51:28 +00:00
Bogdan Tara
f9d30e06a7 Backed out 2 changesets (bug 1530251) for rust failures CLOSED TREE
Backed out changeset e03401a358a6 (bug 1530251)
Backed out changeset 42913778b66a (bug 1530251)
2019-10-02 14:49:23 +03:00
Paul Bone
5415399846 Bug 1530251 - Rename DefaultNurseryBytes -> DefaultNurseryMaxBytes r=jonco
Also:
 * Update the DefaultNurseryMaxBytes comment
 * Fix the shell parameter handling.

Differential Revision: https://phabricator.services.mozilla.com/D47869

--HG--
extra : moz-landing-system : lando
2019-10-02 11:25:40 +00:00
Boris Zbarsky
773e6fd997 Bug 1584431 part 1. Add a way to call js::StringEqualsAscii with a known length. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D47390

--HG--
extra : moz-landing-system : lando
2019-09-28 04:24:46 +00:00
Jeff Walden
bc8075d8e4 Bug 1582348 - Fill out the body of |SetUpWritableStreamDefaultController|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46403

--HG--
extra : moz-landing-system : lando
2019-09-28 03:16:16 +00:00
Dorel Luca
0027809f96 Backed out 6 changesets (bug 1582348) for build bustage in streams/WritableStreamOperations.cpp
Backed out changeset bb2e05de0638 (bug 1582348)
Backed out changeset c5b476005983 (bug 1582348)
Backed out changeset 0d8e86bb06d0 (bug 1582348)
Backed out changeset 7628d3f14514 (bug 1582348)
Backed out changeset 728075c80f4d (bug 1582348)
Backed out changeset 4ceb625e5eb0 (bug 1582348)
2019-09-28 04:22:58 +03:00
Jeff Walden
96ad82e40d Bug 1582348 - Fill out the body of |SetUpWritableStreamDefaultController|. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46403

--HG--
extra : moz-landing-system : lando
2019-09-28 01:01:15 +00:00
Ted Campbell
12e0243df6 Bug 1547824 - Add Value::unboxGCPointer helper for JS::Value. r=iain
Abstracts the pointer unboxing pattern for both NUNBOX32 and PUNBOX64
formats. This also encapsulates some of the spectre mitigations.

Differential Revision: https://phabricator.services.mozilla.com/D46326

--HG--
extra : moz-landing-system : lando
2019-09-19 23:56:53 +00:00
Ted Campbell
6e05e62cb0 Bug 1547824 - Change JS::Value from union to class. r=jwalden
Now that all the bad type-punning is gone, JS::Value has a single
asBits_ field and we should use a class aggregate type instead.

Differential Revision: https://phabricator.services.mozilla.com/D46325

--HG--
extra : moz-landing-system : lando
2019-09-19 23:56:55 +00:00
Ted Campbell
86d5bde949 Bug 1547824 - Remove js::Value::payload union from 32-bit platforms. r=iain
Use well-defined conversions on the asBits_ instead. This removes union
arms entirely. They are slighly useful for debugging, but we don't have
that on our 64-bit platforms and the gdb helpers can already help us
out.

Differential Revision: https://phabricator.services.mozilla.com/D46324

--HG--
extra : moz-landing-system : lando
2019-09-19 23:56:57 +00:00
Ted Campbell
0021ec7f24 Bug 1547824 - Remove js::Value::payload union from 64-bit platforms. r=iain
Use well-defined conversions on the asBits_ instead. The remaining union
arms were not even helpful for debuggers so we remove entirely.

Differential Revision: https://phabricator.services.mozilla.com/D46323

--HG--
extra : moz-landing-system : lando
2019-09-19 23:56:59 +00:00
Tom Tung
be1286818d Bug 1562663 - P4a - Deny sharing memery by default for DataClonePolicy; r=nika,lth
Differential Revision: https://phabricator.services.mozilla.com/D45187

--HG--
extra : moz-landing-system : lando
2019-09-26 13:27:25 +00:00
Henri Sivonen
4cc848414e Bug 1578339 - Use SIMD accelerated encoding conversions in SpiderMonkey. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D44470

--HG--
extra : moz-landing-system : lando
2019-09-26 12:45:00 +00:00
Jeff Walden
ef9d1b4371 Bug 1582348 - Add the most skeleton WritableStream class imaginable. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46397

--HG--
extra : moz-landing-system : lando
2019-09-23 23:57:58 +00:00
Jeff Walden
d05c6fe9fd Bug 1582348 - Add a realm creation option controlling whether WritableStream is enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46396

--HG--
extra : moz-landing-system : lando
2019-09-23 23:57:49 +00:00
Matthew Gaudet
eae20d8f2c Bug 1580378 - Support enabling parser deferred allocation mode on shell command line r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D45556

--HG--
extra : moz-landing-system : lando
2019-09-20 16:26:52 +00:00
Jon Coppeard
ad4df9ae33 Bug 1581574 - Remove Heap<T> write barrier and rely on existing read barrier to make incremental marking work r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D46133

--HG--
extra : moz-landing-system : lando
2019-09-20 10:09:19 +00:00
Jan de Mooij
7081cf6275 Bug 1577280 - Add a script filename validation callback. r=tcampbell
This is a process-wide callback that can be used by embedders to block parsing
or decoding of scripts that are considered unsafe.

Differential Revision: https://phabricator.services.mozilla.com/D44620

--HG--
extra : moz-landing-system : lando
2019-09-20 07:41:30 +00:00
Gurzau Raul
6bd9ca2b13 Backed out 4 changesets (bug 1547824) for build bustage at vm/Interpreter.h on a CLOSED TREE.
Backed out changeset f87ca6d25d62 (bug 1547824)
Backed out changeset 261a25ae16e2 (bug 1547824)
Backed out changeset d2df23e104f1 (bug 1547824)
Backed out changeset 0188973c2b10 (bug 1547824)
2019-09-20 02:52:10 +03:00
Jeff Walden
8542e72e2a Bug 1582345 - Add a RealmCreationOption to control whether readable-stream support for BYOB readers is enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46395

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:56 +00:00
Jeff Walden
7583592954 Bug 1582345 - Add a RealmCreationOption controlling whether support for ReadableStreams of type "bytes" is enabled. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D46394

--HG--
extra : moz-landing-system : lando
2019-09-19 21:23:39 +00:00
Ted Campbell
d62aa85533 Bug 1547824 - Add Value::unboxGCPointer helper for JS::Value. r=iain
Abstracts the pointer unboxing pattern for both NUNBOX32 and PUNBOX64
formats. This also encapsulates some of the spectre mitigations.

Differential Revision: https://phabricator.services.mozilla.com/D46326

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:06 +00:00
Ted Campbell
248faef2dc Bug 1547824 - Change JS::Value from union to class. r=jwalden
Now that all the bad type-punning is gone, JS::Value has a single
asBits_ field and we should use a class aggregate type instead.

Differential Revision: https://phabricator.services.mozilla.com/D46325

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:05 +00:00
Ted Campbell
80b4dc297a Bug 1547824 - Remove js::Value::payload union from 32-bit platforms. r=iain
Use well-defined conversions on the asBits_ instead. This removes union
arms entirely. They are slighly useful for debugging, but we don't have
that on our 64-bit platforms and the gdb helpers can already help us
out.

Differential Revision: https://phabricator.services.mozilla.com/D46324

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:05 +00:00
Ted Campbell
80c3890f81 Bug 1547824 - Remove js::Value::payload union from 64-bit platforms. r=iain
Use well-defined conversions on the asBits_ instead. The remaining union
arms were not even helpful for debuggers so we remove entirely.

Differential Revision: https://phabricator.services.mozilla.com/D46323

--HG--
extra : moz-landing-system : lando
2019-09-19 21:12:05 +00:00
Ted Campbell
a7526cb49d Bug 1575055 - Avoid duplicating CompileOptions constructor code. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D42562

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:53 +00:00
Ted Campbell
b47af937d5 Bug 1575055 - Remove redundant overrides in ReadOnlyCompileOptions. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D42561

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:46 +00:00
Ted Campbell
559cc45195 Bug 1575055 - Unify JS::CompileOptions::canLazilyParse and forceFullParse_. r=jandem
If either the Realm or the request needs full-parsing, we disable lazy
parsing.

Differential Revision: https://phabricator.services.mozilla.com/D42560

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:42 +00:00
Ted Campbell
5aa2fa2264 Bug 1575055 - Privatize js::CompileOptions::strictMode. r=jandem
We already have an accessor to make sure this is can only be set but not
cleared so hide the underlying storage.

Differential Revision: https://phabricator.services.mozilla.com/D42559

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:35 +00:00
Ted Campbell
f6f8dc5112 Bug 1575055 - Remove unused CompileOptions::setIntroductionScript. r=jandem
We should always use setIntroductionInfo instead.

Differential Revision: https://phabricator.services.mozilla.com/D46294

--HG--
extra : moz-landing-system : lando
2019-09-18 15:05:28 +00:00
Henri Sivonen
83795d9c41 Bug 1561567 - Introduce rope-walking conversion from JS strings to UTF-8 in a byte span. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D41941

--HG--
extra : moz-landing-system : lando
2019-09-18 08:28:24 +00:00
Jon Coppeard
185aa0ee73 Bug 1579202 - Type cell pointer store buffers to simplify implementation r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D44894

--HG--
extra : moz-landing-system : lando
2019-09-06 10:12:59 +00:00
Chris Fallin
52eacd2891 Bug 1575350: Move JSScript side-tables from Realm to Zone. r=tcampbell,jonco
Also closes bug 1576216: update ZoneStats and RealmStats memory
accounting for this change.

Differential Revision: https://phabricator.services.mozilla.com/D42977

--HG--
extra : moz-landing-system : lando
2019-08-29 22:28:20 +00:00
Will Hawkins
9e72ec1f8d Bug 1551313: Insert profiler markers when preferences are accessed. r=squib,gregtatum
Reviewers: squib, mstange, gregtatum

Reviewed By: squib, gregtatum

Subscribers: julienw, Fallen, reviewbot, mixedpuppy, mstange

Bug #: 1551313

Differential Revision: https://phabricator.services.mozilla.com/D39796

--HG--
extra : rebase_source : e7e0b41b2a4c6f7228f3d6c19ede1fe2e4e42343
extra : histedit_source : 55daf5b19e4f262f522339b5b00ee31130abbf1b
2019-08-23 13:12:51 +03:00
Brian Hackett
6f70f1e367 Bug 1572596 Part 1 - Add source URLs slot to global objects which is cleared on shrinking GC, r=jonco.
Differential Revision: https://phabricator.services.mozilla.com/D41682

--HG--
extra : moz-landing-system : lando
2019-08-22 00:07:41 +00:00
Jon Coppeard
266f4c6efb Bug 1575175 - Rename memory counter classes now they're used for both GC and malloc heaps r=sfink
This renames:
  HeapSize::gcBytes -> bytes (it's not just for GC heaps any more)
  ZoneThreshold -> HeapThreshold (to go with HeapSize)
  HeapThreshold::triggerBytes -> bytes (what else could it be?)

I renamed the ZoneAllocator members to make them more uniform/consitent so we now have gcHeapSize/gcHeapThreshold, mallocHeapSize/mallocHeapThreshold etc.

I also renamed the heap threshold classes.

Differential Revision: https://phabricator.services.mozilla.com/D42868

--HG--
extra : moz-landing-system : lando
2019-08-21 15:14:31 +00:00
Jon Coppeard
057ec26442 Bug 1575251 - Remove some unnecessary uses of shadow::Zone r=allstarschh
Differential Revision: https://phabricator.services.mozilla.com/D42667

--HG--
extra : moz-landing-system : lando
2019-08-20 18:52:58 +00:00
Jon Coppeard
45a3b432c0 Bug 1574098 - Remove unused defines from Class.h r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D42086

--HG--
extra : moz-landing-system : lando
2019-08-15 13:04:43 +00:00
Jon Coppeard
d4f47d27ad Bug 1573844 - Remove references to js::Class and remove the alias r=tcampbell
The final huge patch. This is a search-and-replace removal of js::Class followed by clang-format and removal of the alias from TypeDecls.h.

Depends on D41986

Differential Revision: https://phabricator.services.mozilla.com/D41987

--HG--
extra : moz-landing-system : lando
2019-08-14 19:13:12 +00:00
Jon Coppeard
41d076b49e Bug 1573844 - Remove js::Jsvalify and js::Valueify r=tcampbell
Depends on D41984

Differential Revision: https://phabricator.services.mozilla.com/D41985

--HG--
extra : moz-landing-system : lando
2019-08-14 17:18:54 +00:00
Jon Coppeard
66fc30ba53 Bug 1573844 - Remove js::Class definition and alias JSClass to it r=tcampbell,mccr8
JSClass contained void* members corresponding to the internal pointer members of js::Class. This stores the internal members in JSClass and removes js::Class.

This leaves js::Class aliased to JSClass while we remove references to it. I also aliased Jsvalify and Valueify into global scope temporarily to make this compile. These get removed in the following patches.

I had to remove a few functions which now don't compile with js::Class being the same type as JSClass.

Differential Revision: https://phabricator.services.mozilla.com/D41983

--HG--
extra : moz-landing-system : lando
2019-08-15 08:32:22 +00:00
Jon Coppeard
e22ceecec6 Bug 1573508 - Replace internal references to js::ClassOps with JSClassOps and remove the alias r=tcampbell
Another big patch. This a search-and-replace followed by mach clang-format, and removal of the js::ClassOps alias from Class.h.

Differential Revision: https://phabricator.services.mozilla.com/D41761

--HG--
extra : moz-landing-system : lando
2019-08-14 10:00:05 +00:00
Jon Coppeard
74f39034b7 Bug 1573508 - Remove js::ClassOps in favour of JSClassOps now these are the same r=tcampbell
This removes the original js::ClassOps but leaves it aliased to JSClassOps so everything compiles for now.

Differential Revision: https://phabricator.services.mozilla.com/D41759

--HG--
extra : moz-landing-system : lando
2019-08-13 23:36:55 +00:00
Andrew McCreight
be5f1ce737 Bug 1559489, part 2 - Split out the back half of RemapWrapper into a new method. r=tcampbell
I need it for the final patch.

Differential Revision: https://phabricator.services.mozilla.com/D38341

--HG--
extra : moz-landing-system : lando
2019-08-13 19:09:46 +00:00
Jon Coppeard
992d6b6ce5 Bug 1570905 - Rework the GC triggers to make the incremental trigger the default and the non-incremental trigger some factor of this r=sfink?
Differential Revision: https://phabricator.services.mozilla.com/D41606

--HG--
extra : moz-landing-system : lando
2019-08-13 08:40:36 +00:00