Commit Graph

744251 Commits

Author SHA1 Message Date
Cosmin Sabou
44c81ed9bb Backed out changeset 028bc12edb76 (bug 1688815) for causing ContentPrincipal related xpcshell crashes. 2021-02-09 21:47:11 +02:00
Andrei Oprea
b398609d29 Bug 1691526 - Enable 'os' level targeting for Nimbus Experiment r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D104545
2021-02-09 19:38:18 +00:00
Oriol Brufau
5fd39ec8e5 Bug 1691480 - Remove remnants of isLastMultiSelectChange. r=Gijs
In bug 1580003 I missed two calls that still use isLastMultiSelectChange.
This parameter has no effect and can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D104427
2021-02-09 19:08:45 +00:00
André Bargull
96aca3d0d0 Bug 1670044 - Part 9: Allow "*" for module export names. r=yulia
We can now remove the "*" restriction from `moduleExportName()`.

Differential Revision: https://phabricator.services.mozilla.com/D101014
2021-02-09 19:05:36 +00:00
André Bargull
b2885adaaf Bug 1670044 - Part 8: Use null for star-imports and exports. r=yulia,tcampbell
The "Arbitrary module namespace identifier names" spec PR allows to use "*" as
a module export name, so we can no longer use that specific string to denote
star-imports/exports. Probably the easiest way to work around this new
restriction is to replace "*" with a nullptr string.

Spec change: https://github.com/tc39/ecma262/pull/2155

Differential Revision: https://phabricator.services.mozilla.com/D101013
2021-02-09 19:05:36 +00:00
André Bargull
96e2220bd1 Bug 1670044 - Part 7: Add separate ImportNamespaceSpec and ExportNamespaceSpec parse nodes. r=yulia,tcampbell
The approach to use "*" for namespace imports/exports no longer works with
module export names. As an alternative add separate ImportNamespaceSpec and
ExportNamespaceSpec parse nodes. They're currently still implemented as binary
nodes, but the next part will change this.

Differential Revision: https://phabricator.services.mozilla.com/D101012
2021-02-09 19:05:35 +00:00
André Bargull
38e8e4ba47 Bug 1670044 - Part 6: Inline ModuleBuilder::appendExportFromEntry. r=yulia,tcampbell
Inline `ModuleBuilder::appendExportFromEntry()` in preparation for the next
part. The `computeLineAndColumn()` call can be moved to the top, because
`spec->pn_pos.begin` is equal to `localNameNode->pn_pos.begin` by construction,
cf. `FullParseHandler::newImportSpec()`.

Drive-by changes:
- Use `auto*` in more places.
- Drop `frontend::` which is redundant with `using namespace js::frontend`.
- Remove the `if (exportName)` check in `ModuleBuilder::appendExportEntry()`,
  because `exportName` is never a nullptr.

Differential Revision: https://phabricator.services.mozilla.com/D101011
2021-02-09 19:05:35 +00:00
André Bargull
821267e218 Bug 1670044 - Part 5: Move import declaration parsing to GeneralParser. r=yulia
Import declaration parsing was implemented in `Parser` instead of
`GeneralParser`, which required to add access to several other parsing methods
from `GeneralParser` to `Parser`. We can avoid this by simply moving `import`
declaration parsing into `GeneralParser`.

Differential Revision: https://phabricator.services.mozilla.com/D101010
2021-02-09 19:05:35 +00:00
André Bargull
e36f9064e1 Bug 1670044 - Part 4: Add PerHandlerParser::processImport(). r=yulia
Add `PerHandlerParser::processImport()` similar to the existing `processExport()`
method in preparation for part 5.

Differential Revision: https://phabricator.services.mozilla.com/D101009
2021-02-09 19:05:34 +00:00
André Bargull
af72d9a63d Bug 1670044 - Part 3: Split namedImportsOrNamespaceImport() into namedImports() and namespaceImport(). r=yulia
Splits the `namedImportsOrNamespaceImport()` method into `namedImports()` and
`namespaceImport()`. `namedImportsOrNamespaceImport()` didn't contain any shared
code, so it seems better to split it into two separate methods to avoid an
extra nesting level.

Differential Revision: https://phabricator.services.mozilla.com/D101008
2021-02-09 19:05:34 +00:00
André Bargull
f8f399ef52 Bug 1670044 - Part 2: Enable test262 tests. r=yulia
Enable all tests marked with "arbitrary-module-namespace-names".

Differential Revision: https://phabricator.services.mozilla.com/D101007
2021-02-09 19:05:33 +00:00
André Bargull
a291358f26 Bug 1670044 - Part 1: Implement "Arbitrary module namespace identifier names" proposal. r=yulia
The spec change adds a new `ModuleExportName` production to allow exporting/importing
module bindings using string literals. The strings can contain any characters except
unpaired surrogates (i.e. standalone lead or trail surrogates).

`ModuleExportName` can be used in import declarations:
- `import {ModuleExportName as IdentifierName} from ModuleSpecifier`

In export batch declarations:
- `export* as ModuleExportName from ModuleSpecifier`

When exporting local bindings:
- `export {IdentifierName as ModuleExportName}`

And when re-exporting bindings:
- `export {IdentifierName as ModuleExportName} from ModuleSpecifier`
- `export {ModuleExportName as IdentifierName} from ModuleSpecifier`
- `export {ModuleExportName as ModuleExportName} from ModuleSpecifier`
- `export {ModuleExportName} from ModuleSpecifier`

Support for "*" as a ModuleExportName is added in a later part.

Spec change: https://github.com/tc39/ecma262/pull/2154

Differential Revision: https://phabricator.services.mozilla.com/D101000
2021-02-09 19:05:33 +00:00
Sean Feng
1e9dccf15f Bug 1667836 - Enable PerformanceEventTiming tests in Nightly r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102039
2021-02-09 18:54:49 +00:00
Sean Feng
6523069aac Bug 1667836 - Fix some bugs in PerformanceEventTiming related tests r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102038
2021-02-09 18:54:49 +00:00
Sean Feng
b03a010048 Bug 1667836 - Implement EventCounts Interface r=smaug
This interface is part of PerformanceEventTiming.

Spec: https://wicg.github.io/event-timing/#sec-event-counts

Differential Revision: https://phabricator.services.mozilla.com/D102037
2021-02-09 18:54:48 +00:00
Sean Feng
a7786149e0 Bug 1667836 - Allow performance event entries can only be retrieved by PerformanceObserver r=smaug
Performance event entries should only be retrieved by
PerformanceObserver, so it can't be retrieved by using
Performance.GetEntries* APIs.

Differential Revision: https://phabricator.services.mozilla.com/D102036
2021-02-09 18:54:48 +00:00
Sean Feng
e67df4e76f Bug 1667836 - Add an event-timing test to ensure target is set to null for shadow DOM r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104104
2021-02-09 18:54:48 +00:00
Sean Feng
228f53a393 Bug 1667836 - Implement PerformanceEventTiming Interface r=smaug
Spec: https://wicg.github.io/event-timing/#sec-performance-event-timing

Differential Revision: https://phabricator.services.mozilla.com/D102035
2021-02-09 18:54:47 +00:00
Sean Feng
3ae0be12e8 Bug 1667836 - Add CC support to LinkedList r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103798
2021-02-09 18:54:47 +00:00
Sean Feng
0c6204c1bd Bug 1667836 - Use nsAtom for entry comparison in GetEntriesByType r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103908
2021-02-09 18:54:46 +00:00
Sean Feng
4c30f0fb30 Bug 1667836 - Make performance entries may have different should add entry algorithm r=smaug
According to https://w3c.github.io/timing-entrytypes-registry/#registry,
unlike other performance entries, `event` and `first-input` entries have
their own algorithms to determine whether it can be added to observers.
This patch factors some code to allow such algorithms can be
implemented.

Differential Revision: https://phabricator.services.mozilla.com/D102034
2021-02-09 18:54:46 +00:00
Christoph Kerschbaumer
71b1d5722d Bug 1688815: Update GetSiteOriginNoSuffix() to handle view-source correctly. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D102200
2021-02-09 18:54:28 +00:00
André Bargull
1b0e359028 Bug 1638295 - Part 11: Re-enable "forEffect" optimisation for Atomics fetch operations. r=jandem
Atomic fetch operations are effectful, which means they're attached to a resume
point. And because a resume point counts as a use, the "forEffect" optimisation
was never triggered. This is a regression from bug 1146364.

This optimisation is especially useful for atomic operations on BigInts, because
it allows us to omit the allocation of the result BigInt.

`WarpCacheIRTranspiler::emitAtomicsBinaryOp()` pushes `undefined` on the stack
when the "forEffect" optimisation is used, which should be okay because the
result is directly popped from the stack again.

ARM64:
Add the implementation for `LAtomicTypedArrayElementBinopForEffect` which is now
required to be present.

Depends on D104174

Differential Revision: https://phabricator.services.mozilla.com/D104175
2021-02-09 18:51:51 +00:00
André Bargull
d0faa07cfc Bug 1638295 - Part 10: Remove TruncateToInt32Policy. r=jandem
The type policy is no longer used.

Depends on D104173

Differential Revision: https://phabricator.services.mozilla.com/D104174
2021-02-09 18:51:50 +00:00
André Bargull
8ac3f40e51 Bug 1638295 - Part 9: Inline Atomics.{add,and,or,sub,xor} with BigInt64 typed arrays. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D104173
2021-02-09 18:51:50 +00:00
André Bargull
b0bb286a5a Bug 1638295 - Part 8: Inline Atomics.exchange with BigInt64 typed arrays. r=jandem
Depends on D104171

Differential Revision: https://phabricator.services.mozilla.com/D104172
2021-02-09 18:51:49 +00:00
André Bargull
082df128fd Bug 1638295 - Part 7: Prepare AtomicReadModifyWrite operations for BigInt support. r=jandem
Updates CacheIR for AtomicReadModifyWrite operations to support BigInt results.

Similar to part 3, add a temporary `supportBigInt` flag which will later be
removed again.

Depends on D104170

Differential Revision: https://phabricator.services.mozilla.com/D104171
2021-02-09 18:51:49 +00:00
André Bargull
e847169526 Bug 1638295 - Part 6: Inline Atomics.compareExchange with BigInt64 typed arrays. r=jandem
Similar to the previous parts, CacheIR always calls into the VM and only Warp
performs the operation in inline assembly.

TypePolicy.cpp:
- Add `TruncateToInt32OrToBigIntPolicy` similar to the existing `TruncateToInt32Policy`.
- `TruncateToInt32Policy` will be removed at the end of this patch series.

CodeGenerator.cpp:
Add `createBigIntOutOfLine()` so we can call it from "CodeGenerator-x86.cpp".

x86:
The lack of free registers makes it necessary to use the stack more often to
temporarily save some registers.

Depends on D104167

Differential Revision: https://phabricator.services.mozilla.com/D104170
2021-02-09 18:51:48 +00:00
André Bargull
29f8066bf0 Bug 1638295 - Part 5: Inline Atomics.store with BigInt64 typed arrays. r=jandem
For CacheIR we're using an ABI call, because each platform has specific register
requirements we don't want to handle in CacheIR.

ARM32 and x86:
Reuse the existing WASM functions for `MacroAssembler::atomicStore64()`.

x86-only:
We're running out of registers, so we have to reuse `edx` as an additional temp
register.

ARM64 and x64:
Call `MacroAssembler::store64()` with an explicit memory barrier.

Differential Revision: https://phabricator.services.mozilla.com/D104167
2021-02-09 18:51:48 +00:00
André Bargull
5fde9f5ba5 Bug 1638295 - Part 4: Inline Atomics.load with BigInt64 typed arrays. r=jandem
For CacheIR we're using a VM call, because each platform has specific register
requirements we don't want to handle in CacheIR.

ARM32 and x86:
Reuse the existing WASM functions for `MacroAssembler::atomicLoad64()`.

ARM64 and x64:
Call `MacroAssembler::load64()` with an explicit memory barrier.

Depends on D104165

Differential Revision: https://phabricator.services.mozilla.com/D104166
2021-02-09 18:51:48 +00:00
André Bargull
702ec8ca96 Bug 1638295 - Part 3: Add a temporary flag to AtomicsMeetsPreconditions to enable BigInt for some operations. r=jandem
This flag will be removed again at the end of this patch series. The flag
makes it possible to perform piecewise updates to allow BigInt inputs without
breaking the not yet updated functions.

Depends on D104164

Differential Revision: https://phabricator.services.mozilla.com/D104165
2021-02-09 18:51:47 +00:00
André Bargull
0aa124bc0e Bug 1638295 - Part 2: Add ScaleFromScalarType to convert from Scalar::Type to Scale. r=jandem
Small helper to abbreviate `ScaleFromElemWidth(Scalar::byteSize(type))` to just
`ScaleFromScalarType(type)`. Later patches will also use this new function.

Differential Revision: https://phabricator.services.mozilla.com/D104164
2021-02-09 18:51:47 +00:00
André Bargull
54940b2ee7 Bug 1638295 - Part 1: Reduce code duplication when converting or unboxing operands in type policies. r=jandem
Move common code for converting operands into `ConvertOperand` and for unboxing
operands into `UnboxOperand`. Part 6 will also use `ConvertOperand`.

Differential Revision: https://phabricator.services.mozilla.com/D104162
2021-02-09 18:51:46 +00:00
Butkovits Atila
0305f603dc Bug 1677540 - disable test browser_async_remove_tab.js for frequent failures. r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104539
2021-02-09 18:47:29 +00:00
Christoph Kerschbaumer
2b003274b2 Bug 1687342: Blocked-URI in CSP reports should be URI before redirects with ref removed r=freddyb,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D103450
2021-02-09 18:42:03 +00:00
Christoph Kerschbaumer
d14708a4c5 Bug 1542194: Update blocked-uri in CSP reporting by treating frame naviations as redirects r=freddyb,dveditz
Differential Revision: https://phabricator.services.mozilla.com/D103697
2021-02-09 18:41:59 +00:00
Ted Campbell
ddf3fdc90c Bug 1691570 - Replace ScriptSourceHolder with RefPtr<ScriptSource> r=jandem
Now that ScriptSource has no tracing requirements, we can replace the custom
wrapper time with a more gecko-friendly RefPtr.

Differential Revision: https://phabricator.services.mozilla.com/D104478
2021-02-09 18:33:31 +00:00
alwu
8efed25b78 Bug 1690416 - remove HTMLMediaElement::ReportCanPlayTelemetry(). r=bryce,Gijs,webidl,mccr8
The actual telemetry probes has been removed by this, so this function is no longer reporting any result and we can remove it.

[1] https://phabricator.services.mozilla.com/D37313

Differential Revision: https://phabricator.services.mozilla.com/D103846
2021-02-09 18:27:33 +00:00
Simon Giesecke
fbfee61619 Bug 1688833 - Change remaining references to LookupForAdd to WithEntryHandle and remove LookupForAdd. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104400
2021-02-09 18:19:47 +00:00
Simon Giesecke
846d039c3c Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/payments. r=edenchuang
Differential Revision: https://phabricator.services.mozilla.com/D104224
2021-02-09 18:19:47 +00:00
Simon Giesecke
815d5d72c3 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/serviceworkers. r=dom-worker-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D104192
2021-02-09 18:19:46 +00:00
Simon Giesecke
5a4b6bc937 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in modules/libpref. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D104196
2021-02-09 18:19:46 +00:00
Simon Giesecke
8528e2fa1d Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/commandhandler. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D104232
2021-02-09 18:19:45 +00:00
Simon Giesecke
ba07b1d2f5 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/clients. r=janv
Differential Revision: https://phabricator.services.mozilla.com/D104231
2021-02-09 18:19:45 +00:00
Simon Giesecke
2a318a3a15 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/broadcastchannel. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D104230
2021-02-09 18:19:45 +00:00
Simon Giesecke
8ae4e0da81 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/animation. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D104229
2021-02-09 18:19:44 +00:00
Simon Giesecke
ba3b6a2b06 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/console. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D104228
2021-02-09 18:19:44 +00:00
Simon Giesecke
8efcd9e1fd Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/events. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D104227
2021-02-09 18:19:44 +00:00
Simon Giesecke
91f2fa3021 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/html. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D104226
2021-02-09 18:19:43 +00:00
Simon Giesecke
08b7f7db76 Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/media/ogg. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D104225
2021-02-09 18:19:43 +00:00