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

82583 Коммитов

Автор SHA1 Сообщение Дата
Nika Layzell a8265c4766 Bug 1711078 - Part 2: Mark immutable fields in principal types as const, r=ckerschb
This is a step towards separating the mutable state on principals from const
state which can be made threadsafe. The remaining mutable fields will either
need to be moved off of nsIPrincipal or made threadsafe to destroy (e.g. using
nsMainThreadPtrHandle) and stored behind a mutex.

Serialization is handled for most types using a separate Deserializer class,
like how it was handled with `nsIURI` mutators. SystemPrincipal wasn't changed
as the `Read` method is a no-op for that class.

Differential Revision: https://phabricator.services.mozilla.com/D115092
2021-05-17 20:50:09 +00:00
Nika Layzell c2a86c631c Bug 1711078 - Part 1: Stop using the component manager to create non-system principals, r=ckerschb
This is necessary to remove the Init methods from principals, allowing
immutable fields to be marked as const and clearly separated from mutable
fields to improve threadsafety.

Differential Revision: https://phabricator.services.mozilla.com/D115091
2021-05-17 20:50:08 +00:00
mr.robot 4156cf93da Bug 1688188: Replace GC parameters and zeal mode with auto classes in jsapi-tests r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D113592
2021-05-17 16:33:43 +00:00
Alex Lopez 455d9a088b Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).

Differential Revision: https://phabricator.services.mozilla.com/D109650
2021-05-17 16:15:58 +00:00
Jon Coppeard 5e87b4eae0 Bug 1711421 - Stop including jsfriendapi.h in the GC r=sfink
Depends on D115190

Differential Revision: https://phabricator.services.mozilla.com/D115191
2021-05-17 15:36:36 +00:00
Jon Coppeard 80b6c33b1c Bug 1711421 - Move SetPerformanceHint API to a new header file r=sfink
This API will eventually be removed, but for now give it its own header file.

Depends on D115189

Differential Revision: https://phabricator.services.mozilla.com/D115190
2021-05-17 15:36:35 +00:00
Jon Coppeard 6531658d49 Bug 1711421 - Stop including jsapi.h in the GC r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D115189
2021-05-17 15:36:35 +00:00
Matthew Gaudet 1760feba5b Bug 1709646 - Re-align stack comments in BytecodeEmitter.cpp r=yulia DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D114873
2021-05-17 15:34:34 +00:00
sploitem 99c79ccbb1 Bug 1710495 - Remove unused args from ReportInNotObjectError r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D115128
2021-05-17 15:32:12 +00:00
Jon Coppeard b7dc1c7729 Bug 1711423 - Move GC zeal APIs to GCAPI.h r=yulia
Depends on D115192

Differential Revision: https://phabricator.services.mozilla.com/D115193
2021-05-17 14:19:11 +00:00
Jon Coppeard 869464f64f Bug 1711423 - Move CustomAutoRooter to public/RootingAPI.h r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D115192
2021-05-17 10:06:27 +00:00
sploitem 7fd3a5acfd Bug 1695386 - Clean up BailoutKind::TooManyArgs UPDATE r=iain
Differential Revision: https://phabricator.services.mozilla.com/D115058
2021-05-14 16:19:38 +00:00
Tooru Fujisawa aecb7ccd93 Bug 1710984 - Part 2: Add marker at the end of Stencil XDR. r=tcampbell
Depends on D115047

Differential Revision: https://phabricator.services.mozilla.com/D115048
2021-05-14 05:56:07 +00:00
Tooru Fujisawa badc6f821c Bug 1710984 - Part 1: Validate the size of ImmutableScriptData also on non-debug build. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D115047
2021-05-14 05:56:07 +00:00
Iain Ireland cd97625308 Bug 1710830: Make testcase work with full parsing r=mgaudet
Each `let` apparently creates a new hop in the emitter that isn't reflected in the number of hops seen by WarpBuilder. The problem only shows up when full parsing. The simplest fix is to convert `let` to `var`; the resulting testcase still triggers the original bug in WarpBuilder, but doesn't break code coverage builds.

Differential Revision: https://phabricator.services.mozilla.com/D115072
2021-05-13 20:16:58 +00:00
Ted Campbell 6e3d6ed2c5 Bug 1710953 - Remove unnecessary std_Symbol variable. r=arai
GetIntrinsic ensures that using Symbol from self-hosting always gets the
original value so std_Symbol is not helpful. Add a simple test case just to
confirm this is safe.

Depends on D115028

Differential Revision: https://phabricator.services.mozilla.com/D115029
2021-05-13 00:01:08 +00:00
Ted Campbell 451710d727 Bug 1710953 - Set discard-source when compiling self-hosted source. r=arai
Instead of setting the realm-behaviour on the self-hosted realm, set it on the
CompileOptions directly when parsing. This is in preparation for removal of the
self-hosted Zone. Also set NoScriptRVal at same time.

Differential Revision: https://phabricator.services.mozilla.com/D115028
2021-05-13 00:01:08 +00:00
Dan Minor 0452666d00 Bug 1701695 - Add NumberFormat::TryCreate; r=tcampbell
This adds a fallible factory method to create new NumberFormat instances. This
allows us to report initialization errors at time of initialization, rather than
when format is called, and remove internal checks in the implementation for
successful initialization.

The existing fluent code assumes that creating a NumberFormat instance always
succeeds. This patch updates that code to handle failures.

Differential Revision: https://phabricator.services.mozilla.com/D114593
2021-05-12 17:22:51 +00:00
Dan Minor 5c3bfc1289 Bug 1701695 - Remove unused unitStyle parameter from intl_FormatNumber r=tcampbell,anba
Differential Revision: https://phabricator.services.mozilla.com/D112802
2021-05-12 17:22:50 +00:00
Dan Minor 9a7dcd3003 Bug 1701695 - Use intl::NumberFormat in SpiderMonkey r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D111888
2021-05-12 17:22:50 +00:00
Dan Minor 5f755ac1ab Bug 1701695 - Use intl::NumberFormatterSkeleton in PluralRules r=tcampbell
This temporarily adds intl::NumberFormatterSkeleton to the public API so that
we can use it in PluralRules. This allows us to remove the SpiderMonkey
NumberFormatterSkeleton implementation when we convert SpiderMonkey to use
intl::NumberFormat.

We can remove intl::NumberFormatterSkeleton from the public API when we
implement intl::PluralRules in Bug 1704509.

Differential Revision: https://phabricator.services.mozilla.com/D111887
2021-05-12 17:22:50 +00:00
Denis Palmeiro d2a8c4a659 Bug 1709139 - Replace JS pageload proportion probes with absolute time measurements and add new probes to measure GC and main thread parsing impact during page load. r=sfink,iain,smaug
Replace JS pageload proportion probes with absolute time measurements and add new probes to measure GC and main thread parsing impact during page load.

Differential Revision: https://phabricator.services.mozilla.com/D114388
2021-05-12 16:38:40 +00:00
Nicolas B. Pierron 338eedf93e Bug 1709135 - XDR: Make decoded content immutable. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D114627
2021-05-12 13:57:56 +00:00
Nicolas B. Pierron 965cab1dbc Bug 1458339 part 2 - Use shared memory to initialize the JS engine. r=smaug,tcampbell,necko-reviewers
This modification relies on the shared memory implemented in Bug 1698045 and on
the ability to encode and decode self-hosted content from Bug 1668361 to
optimize the JS engine initialization by making the parent process encode the
self-hosted stencil, such that all other runtime initialization would only have
to decode it, including content processes.

Differential Revision: https://phabricator.services.mozilla.com/D110578
2021-05-12 13:57:56 +00:00
Nicolas B. Pierron 6605d80bb3 Bug 1458339 part 1 - Add an API to set self-hosted XDR content. r=tcampbell
The JSRuntime already has an API to set the self-hosted content before the
initialization. This modification adds a proper API such that the rest of Gecko,
which does not have access to the JSRuntime implementation can use this
functions as well.

Differential Revision: https://phabricator.services.mozilla.com/D110577
2021-05-12 13:57:55 +00:00
Nicolas B. Pierron e7f32344ac Bug 1458339 part 0 - Simplify mozilla::GetBuildId to be safely called from any thread. r=tcampbell,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114127
2021-05-12 13:57:55 +00:00
Nicolas B. Pierron a4aef929a1 Bug 1698045 part 1 - Add xpc::SelfHostedShmem to hold shared memory for JS initialization. r=smaug,tcampbell,ipc-reviewers,jld
This change adds the ground work to share content provided by the JS engine of
the Parent process to initialize the JS engine of other threads and Content
processes.

The singleton class xpc::SelfHostedShmem is used to wrap the logic behind
holding the memory. The memory is initialized with `InitFromParent` or
`InitFromChild`. The memory is accessible using either the `Content` or
`Handle`.

The shared memory is transfered through the command line using
`mozilla::ipc::ExportSharedJSInit` and read using
`mozilla::ipc::ImportSharedJSInit` functions. The command line is used, as we
need the shared memory to be avilable for the JS engine initialization. The
command line is composed of a single command named `-jsInit` which is followed
by the handle (on Windows) and the length of the shared content.

The memory associated with the shared memory is cleared in `ShutdownXPCOM` after
closing all threads, and shuting down the JS engine. This is necessary as we
expect the JS engine to borrow content from the shared memory.

Differential Revision: https://phabricator.services.mozilla.com/D110576
2021-05-12 13:57:55 +00:00
Geoff Lankow a57f5cb1f1 Bug 1707711 follow-up - Delete lazy getter XPCOMUtils._scriptloader before replacing it. r=Standard8
XPCOMUtils._scriptloader is a read-only getter if it's never been called. Assigning a value to it throws an exception and breaks Thunderbird Mochitest.

Differential Revision: https://phabricator.services.mozilla.com/D114802
2021-05-12 10:50:36 +00:00
Jan de Mooij 6f3447697d Bug 1710627 - Optimize BaseShape tracing in TraceCycleCollectorChildren. r=jonco
Most of the time, all shapes in the shape lineage will have the same BaseShape,
so we only need to trace its children once.

Differential Revision: https://phabricator.services.mozilla.com/D114851
2021-05-12 08:46:51 +00:00
Tooru Fujisawa 0d43848d7a Bug 1702948 - Part 2: Do not expose ghost functions to debugger. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D110921
2021-05-12 07:09:17 +00:00
Tooru Fujisawa fdcabb7590 Bug 1702948 - Part 1: Delazify function in DebuggerScript#parameterNames getter. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D110801
2021-05-12 07:09:17 +00:00
Paul Bone ca5b034b04 Bug 1629064 - pt 3. Notify the observer service of GCs for testing r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105419
2021-05-12 06:46:08 +00:00
Jan de Mooij fcba0b6914 Bug 1682504 part 3 - Shrink ICEntry and ICFallbackStub. r=iain
This moves the pcOffset field from ICEntry to ICFallbackStub, and removes the
ICEntry* pointer from ICFallbackStub. Both of these classes are now one word smaller.

Because ICEntry and ICFallbackStubs are now both stored as ICScript arrays, we can
go from one to the other with some pointer arithmetic. This is pretty fast and
only has to happen on slower paths.

Another option would be to merge ICEntry and ICFallbackStub, but that complicates
the Baseline Interpreter code, especially on 32-bit platforms where the combined
size is not a nice power-of-two. With this patch we can use BaseIndex there.

Differential Revision: https://phabricator.services.mozilla.com/D114723
2021-05-12 05:33:15 +00:00
Jan de Mooij 6b47f74c17 Bug 1682504 part 2 - Remove ICStubIterator and ICStubConstIterator. r=iain
These iterators are fairly complicated (the patch deletes > 130 lines of code) and
they were only used in a few places.

This simplifies the next patch a bit.

Depends on D114721

Differential Revision: https://phabricator.services.mozilla.com/D114722
2021-05-12 05:33:14 +00:00
Jan de Mooij b88dab62ca Bug 1682504 part 1 - Remove maybeICEntryFromPCOffset. r=iain
There was just one caller left, the CacheIR health report code, and it can be
changed to iterate over the JitScript's ICEntries instead.

Differential Revision: https://phabricator.services.mozilla.com/D114721
2021-05-12 05:33:14 +00:00
Iain Ireland 4a1575f61a Bug 1710089: Add ensureBallast in walkEnvironmentChain r=mgaudet
We need the x_n variables in the testcase so that there are enough hops.

OOM handling delenda est.

Differential Revision: https://phabricator.services.mozilla.com/D114883
2021-05-12 02:02:40 +00:00
Iain Ireland 6df666df46 Bug 1709216: Add copyToScratchValueRegister to fix x86 r=jandem
`useFixedValueRegister` was unused (since bug 1673553 part 94, I think), so I cannibalized it for spare parts.

Differential Revision: https://phabricator.services.mozilla.com/D114769
2021-05-12 01:54:40 +00:00
Iain Ireland 8ea2e29ac0 Bug 1709216: Transpile SameValueResult r=jandem
Depends on D114258

Differential Revision: https://phabricator.services.mozilla.com/D114259
2021-05-12 01:54:39 +00:00
Iain Ireland 6430272bab Bug 1709216: Rename SameValue MIR op r=jandem
Rename this to make room for the next patch to use that name when transpiling SameValueResult.

Depends on D114257

Differential Revision: https://phabricator.services.mozilla.com/D114258
2021-05-12 01:54:39 +00:00
Iain Ireland 69e3be7a1c Bug 1709216: Optimize polymorphic Object.is in CacheIR r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D114257
2021-05-12 01:54:38 +00:00
Iain Ireland 6a9bab4543 Bug 1710140: Improve test coverage of inlined bailout code r=jandem
While removing dead code I accidentally broke getters and setters, and noticed that only setters currently have coverage (ion/bug765454.js), so I'm adding a testcase for bailing out inlined getters as well.

Driveby: I've had a local patch floating around for a while to tweak trial inlining jitspew, but I've been too lazy to open a bug and land it; this is just related enough to justify folding it in.

Differential Revision: https://phabricator.services.mozilla.com/D114768
2021-05-11 18:22:47 +00:00
Tom Schuster 4730da25ee Bug 1710126 - Use the PropertyDescriptor constructors for NativeGetOwnPropertyDescriptor. r=jandem
I am not sure if we should preserve parts of the accessor comment, because
the constructor always create complete descriptor now.

In the future switching GetPropertyAttributes to return JS::PropertyAttributes
seems like a good idea.

Depends on D114838

Differential Revision: https://phabricator.services.mozilla.com/D114839
2021-05-11 17:29:18 +00:00
Tom Schuster f6a5d6a829 Bug 1710126 - Create complete AccessorDescriptors. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D114838
2021-05-11 17:29:18 +00:00
Nicolas B. Pierron 04f4547d44 Bug 1678316 - testJitABICalls: Always use the alignment of the pointee-type when computing offsets. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D114852
2021-05-11 16:50:26 +00:00
Steve Fink 6b0b853571 Bug 1694538 - Convert gcWeakKeys from <weakmap, key> tuples that require an extra lookup, to <ptr to color, target> tuples that simplify the code substantially r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D106226
2021-05-11 14:18:38 +00:00
Ted Campbell 2d6468e9da Bug 1707792 - Process _SetCanonicalName in BytecodeEmitter. r=arai
Instead of manipulating the uncloned self-hosted function at runtime, process
the _SetCanonicalName call during BCE and save it in ScriptStencil.  This
will later lead to directly instatiating self-hosted clones from a stencil
rather than cloning from the self-hosting realm.

Differential Revision: https://phabricator.services.mozilla.com/D113456
2021-05-11 12:48:21 +00:00
Ted Campbell 4c7975cc2f Bug 1707792 - Store self-hosted canonical name in extended slot. r=jandem
Now, when _SetCanonicalName is used, store the canonical name on the extended
slot instead of clobbering the display name.  This ensures the function names
in the self-hosted realm match their binding names and the original source
code for better clarity.  Instead we apply the canonical name during function
cloning where special cases already needed to exist to find the "original"
name. The net result should be easier to understand.

Differential Revision: https://phabricator.services.mozilla.com/D113455
2021-05-11 12:48:21 +00:00
Brindusan Cristian efd8dfd0cf Backed out 9 changesets (bug 1701695) for causing xpcshell failures in test_messagecontext.js. CLOSED TREE
Backed out changeset e88dd41c0a90 (bug 1701695)
Backed out changeset 823ed70ef5fe (bug 1701695)
Backed out changeset 11f97bc74622 (bug 1701695)
Backed out changeset fdf12ac55593 (bug 1701695)
Backed out changeset abcf774d3b58 (bug 1701695)
Backed out changeset 4239fe67d69f (bug 1701695)
Backed out changeset 216472b634b9 (bug 1701695)
Backed out changeset 89ff5f91d8e9 (bug 1701695)
Backed out changeset 9c0dbc73dad2 (bug 1701695)
2021-05-11 15:25:46 +03:00
Dan Minor 7a648a32c3 Bug 1701695 - Add NumberFormat::TryCreate; r=tcampbell
This adds a fallible factory method to create new NumberFormat instances. This
allows us to report initialization errors at time of initialization, rather than
when format is called, and remove internal checks in the implementation for
successful initialization.

The existing fluent code assumes that creating a NumberFormat instance always
succeeds. This patch updates that code to handle failures.

Differential Revision: https://phabricator.services.mozilla.com/D114593
2021-05-11 11:37:40 +00:00
Dan Minor 1a58fca1ce Bug 1701695 - Remove unused unitStyle parameter from intl_FormatNumber r=tcampbell,anba
Differential Revision: https://phabricator.services.mozilla.com/D112802
2021-05-11 11:37:39 +00:00