- Aug 03, 2022
-
-
Ben Dean-Kawamura authored
Generate the C++ and JS code to handle UniFFI bindings. The WebIDL code is completely static and doesn't need to be generated. There's support for both synchronus and async functions, but we haven't decided the how we want this to be configured. In practice, almost all functions will need to be async, so for now we're just forcing all functions to be. The `uniffi-bindgen-gecko-js` crate builds the binary that generates the bindings. This binary needs to be fed a list of UDL files, the path of the .cpp file to generate, and the directory to generate .jsm files in (and also all of those arguments again, but for the test fixtures). This is quiet a horrible UI, but it's going to be wrapped in a mach command. The `uniffi-js` directory contains shared C++ code for `uniffi-bindgen-gecko-js`. As much as possible we tried to put the functionality here and have the generated code simply forward function calls here. Still Todo: - CallbackInterfaces - Custom and external types - Datetime and TimeInterval Differential Revision: https://phabricator.services.mozilla.com/D144472
-
William Durand authored
Bug 1782766 - Constraint the max height of the list of extensions in the unified extensions panel. r=Itiel,desktop-theme-reviewers Differential Revision: https://phabricator.services.mozilla.com/D153486
-
negin authored
Differential Revision: https://phabricator.services.mozilla.com/D152663
-
Emilio Cobos Álvarez authored
Differential Revision: https://phabricator.services.mozilla.com/D153474
-
Emilio Cobos Álvarez authored
Differential Revision: https://phabricator.services.mozilla.com/D153633
-
Iain Ireland authored
In some but not all clang builds, for reasons I haven't been able to fully pin down, the existing patch stack fails to build with an error about trying to access a private constructor. An over-simplified version of the code: In `regexp-parser.h` (V8 code): ``` // A class with a templated static method. class RegExpParser { template <class CharT> static bool VerifyRegExpSyntax(..., const CharT* input, ...); }; ``` In `regexp-parser.cc` (V8 code): ``` // A templated class template <typename CharT> class RegExpParserImpl { private: RegExpParserImpl(const CharT* ...); // A friend declaration for the templated static method friend bool RegExpParser::VerifyRegExpSyntax<CharT>(..., const CharT*, ...); } // Two instantiations of the templated class template class RexExpParserImpl<uint8_t> template class RexExpParserImpl<base::uc16> // The implementation of the templated static method template <class CharT> bool RegExpParser::VerifyRegExpSyntax(..., const CharT*, ...) { // A call to the private constructor, which should be allowed // because of the friend declaration RexExpParserImpl( ...) } // Two instantiations of the templated static method template bool RegExpParser::VerifyRegExpSyntax<uint8_t>(...); template bool RegExpParser::VerifyRegExpSyntax<base::uc16>(...); ``` In `RegExpAPI.cpp` (our code), we call `RegExpParser::VerifyRegExpSyntax`. This triggers a compiler error in the `build-linux64-base-toolchains-clang/debug` job, but not in any other job. I can't figure out what the difference is. I've tried adding explicit casts to guarantee that `RegExpAPI.cpp` calls `VerifyRegExpSyntax` with an already instantiated template parameter (uint8_t or base::uc16), but that didn't fix anything. After several failed iterations, I've fallen back on the approach of changing the friend declaration to `friend class v8::internal::RegExpParser`, which solves the problem. I haven't upstreamed this patch yet; it's small, hacky, and unsatisfying enough that I'm willing to patch our local copy and see if I can get to the bottom of this mystery next time I update irregexp. Differential Revision: https://phabricator.services.mozilla.com/D153526
-
Iain Ireland authored
Depends on D152913 Differential Revision: https://phabricator.services.mozilla.com/D152914
-
Iain Ireland authored
V8 rewrote some stack overflow code to fix their equivalent of bug 1775005. These changes support that fix. Differential Revision: https://phabricator.services.mozilla.com/D152913
-
Iain Ireland authored
`Zone` is the V8 equivalent of LifoAlloc. A zone-allocated SmallVec is used in `regexp-parser.cc`. Differential Revision: https://phabricator.services.mozilla.com/D152912
-
Iain Ireland authored
Differential Revision: https://phabricator.services.mozilla.com/D152911
-
Iain Ireland authored
A bunch of code was moved upstream from the `v8::internal` namespace into the `v8::base` namespace. Adjust accordingly. Differential Revision: https://phabricator.services.mozilla.com/D152910
-
Iain Ireland authored
Another change made to support early errors in V8. Differential Revision: https://phabricator.services.mozilla.com/D152909
-
Iain Ireland authored
Differential Revision: https://phabricator.services.mozilla.com/D152908
-
Iain Ireland authored
While refactoring this code, upstream V8 removed their own need to have `Isolate` as a friend class of `RegExpStack`. We need to be able to reach inside RegExpStack for a couple of reasons, so we use `ExternalReference`, which is still a friend class (to support ExternalReference::TopOfRegExpStack, which is used in V8's macroassembler code). Since ExternalReference already exists, I'm also using it for the memory accounting code. Differential Revision: https://phabricator.services.mozilla.com/D152907
-
Iain Ireland authored
While adding support for syntax-parsing / early errors, V8 pushed the allocation of the named capture array one level outward, which lets us skip the creation of the FixedArray completely. The awkward sorting requirement is also present in V8: compare https://github.com/v8/v8/blob/main/src/regexp/regexp.cc#L507-L508. Differential Revision: https://phabricator.services.mozilla.com/D152906
-
Iain Ireland authored
IsCharacterInRangeArray is translated from the version in `imported/regexp-macro-assembler.h`, with more comments and adjustments to make callWithABI work. Differential Revision: https://phabricator.services.mozilla.com/D152905
-
Iain Ireland authored
Preparing for the next patch Depends on D152903 Differential Revision: https://phabricator.services.mozilla.com/D152904
-
Iain Ireland authored
V8 added an enum class instead of using raw chars. Drive-by: Mark CanReadUnaligned as const. Depends on D152902 Differential Revision: https://phabricator.services.mozilla.com/D152903
-
Iain Ireland authored
This patch was generated by running import-irregexp.py. Depends on D152901 Differential Revision: https://phabricator.services.mozilla.com/D152902
-
Iain Ireland authored
Differential Revision: https://phabricator.services.mozilla.com/D152901
-
Sandor Molnar authored
Backed out 5 changesets (bug 1782771) for causing assertion failures in js/src/builtin/String.cpp CLOSED TREE Backed out changeset 52d2623e6704 (bug 1782771) Backed out changeset 7dfac88ea495 (bug 1782771) Backed out changeset 9b75089ec05e (bug 1782771) Backed out changeset f1dd237d41ef (bug 1782771) Backed out changeset 939921da7183 (bug 1782771)
-
Sandor Molnar authored
Backed out changeset 54c8b5fb832f (bug 1773583) for causing browser-chrome failures in browser/components/newtab/test/browser/browser_aboutwelcome_multistage_experimentAPI.js
-
Sandor Molnar authored
-
Gavin Suntop authored
Differential Revision: https://phabricator.services.mozilla.com/D152793
-
André Bargull authored
Improves `s.substring(1)` from: ``` 10 constant 0x1 29 minmax constant10:Int32 stringlength27:Int32 30 minmax minmax29:Int32 stringlength27:Int32 31 minmax minmax29:Int32 stringlength27:Int32 32 sub minmax31:Int32 minmax30:Int32 [int32] 33 substr tostring26:String minmax30:Int32 sub32:Int32 ``` to: ``` 10 constant 0x1 29 minmax constant10:Int32 stringlength27:Int32 30 sub stringlength27:Int32 minmax29:Int32 [int32] 31 substr tostring26:String minmax29:Int32 sub30:Int32 ``` Differential Revision: https://phabricator.services.mozilla.com/D153493
-
André Bargull authored
Improves `s.substr(0, 3)` from: ``` 10 constant 0x0 11 constant 0x3 32 minmax constant11:Int32 stringlength28:Int32 33 compare minmax32:Int32 constant10:Int32 Le 34 test compare33:Bool block10 block11 35 constant string 3df1f0729800 37 substr tostring27:String constant10:Int32 minmax32:Int32 39 phi constant35:String substr37:String ``` to: ``` 10 constant 0x0 11 constant 0x3 32 minmax constant11:Int32 stringlength28:Int32 33 substr tostring27:String constant10:Int32 minmax32:Int32 ``` Differential Revision: https://phabricator.services.mozilla.com/D153492
-
André Bargull authored
Improves `s.substring(0, 3)` from: ``` 10 constant 0x0 11 constant 0x3 31 minmax constant11:Int32 stringlength28:Int32 32 compare constant10:Int32 minmax31:Int32 Lt 33 test compare32:Bool block9 block10 36 phi minmax31:Int32 constant10:Int32 37 phi constant10:Int32 minmax31:Int32 38 sub phi37:Int32 phi36:Int32 [int32] 39 substr tostring27:String phi36:Int32 sub38:Int32 ``` to: ``` 10 constant 0x0 11 constant 0x3 31 minmax constant11:Int32 stringlength28:Int32 32 substr tostring27:String constant10:Int32 minmax31:Int32 ``` Differential Revision: https://phabricator.services.mozilla.com/D153491
-
André Bargull authored
Bug 1782771 - Part 2: Fold min(x, min(y, z)) to min(c, z) with compile-time constant c=min(x, y). r=jandem Improves `s.slice(0, 3)` from: ``` 10 constant 0x0 11 constant 0x3 34 minmax constant11:Int32 stringlength28:Int32 36 minmax minmax34:Int32 constant10:Int32 37 substr tostring27:String constant10:Int32 minmax36:Int32 ``` to: ``` 10 constant 0x0 11 constant 0x3 34 minmax constant11:Int32 stringlength28:Int32 36 substr tostring27:String constant10:Int32 minmax34:Int32 ``` Differential Revision: https://phabricator.services.mozilla.com/D153490
-
André Bargull authored
The change removes a MMinMax in `s.substring(0, 3)`: ``` 10 constant 0x0 11 constant 0x3 31 minmax constant10:Int32 stringlength28:Int32 32 minmax constant11:Int32 stringlength28:Int32 33 compare minmax31:Int32 minmax32:Int32 Lt 34 test compare33:Bool block9 block10 37 phi minmax32:Int32 minmax31:Int32 38 phi minmax31:Int32 minmax32:Int32 39 sub phi38:Int32 phi37:Int32 [int32] 40 substr tostring27:String phi37:Int32 sub39:Int32 ``` After: ``` 10 constant 0x0 11 constant 0x3 31 minmax constant11:Int32 stringlength28:Int32 32 compare constant10:Int32 minmax31:Int32 Lt 33 test compare32:Bool block9 block10 36 phi minmax31:Int32 constant10:Int32 37 phi constant10:Int32 minmax31:Int32 38 sub phi37:Int32 phi36:Int32 [int32] 39 substr tostring27:String phi36:Int32 sub38:Int32 ``` More improvements for `s.slice(0, 3)`: ``` 10 constant 0x0 11 constant 0x3 32 minmax constant10:Int32 stringlength28:Int32 35 minmax constant11:Int32 stringlength28:Int32 37 sub minmax35:Int32 minmax32:Int32 [int32] 38 minmax sub37:Int32 constant10:Int32 39 substr tostring27:String minmax32:Int32 minmax38:Int32 ``` After: ``` 10 constant 0x0 11 constant 0x3 34 minmax constant11:Int32 stringlength28:Int32 36 minmax minmax34:Int32 constant10:Int32 37 substr tostring27:String constant10:Int32 minmax36:Int32 ``` Differential Revision: https://phabricator.services.mozilla.com/D153489
-
Sandor Molnar authored
Backed out 2 changesets (bug 1779205) for causing browser-chrome failures in gfx/thebes/gfxPlatform.cpp CLOSED TREE Backed out changeset ea288d88571f (bug 1779205) Backed out changeset 186424c5f4ea (bug 1779205)
-
Barret Rennie authored
Differential Revision: https://phabricator.services.mozilla.com/D148444
-
Ziran Sun authored
Bug 1783006 - Calculate the track sizes with the contain intrinsic block size if available. r=emilio When block size is initially indefinite but later was determined by the contain intrinsic size, we calculate the track sizes using the contain intrinsic block size. Differential Revision: https://phabricator.services.mozilla.com/D153623
-
Matthew Gaudet authored
Differential Revision: https://phabricator.services.mozilla.com/D152917
-
fabrice authored
Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato Differential Revision: https://phabricator.services.mozilla.com/D152575
-
Brad Werth authored
Bug 1780470 Part 2: Reduce the amount of time spent in video telemetry test. r=media-playback-reviewers,alwu Differential Revision: https://phabricator.services.mozilla.com/D153287
-
Nicolas B. Pierron authored
This patch changes the x86/x64 backend to: - avoid unaligned write of int32_t, unaligned read of uintptr_t values. - replace typed pointer arithmetic by byte offsets only. - add comments with opcode when patching assembly. Differential Revision: https://phabricator.services.mozilla.com/D153597
-
Barret Rennie authored
This also removes the import of Services.jsm since it is no longer required as of bug 1667455. Differential Revision: https://phabricator.services.mozilla.com/D153130
-
Julian Descottes authored
Compare https://github.com/json5/json5/compare/v2.1.0%E2%80%A6v2.2.1 Differential Revision: https://phabricator.services.mozilla.com/D153602
-
Charlie Humphreys authored
Differential Revision: https://phabricator.services.mozilla.com/D152926
-
Nika Layzell authored
This patch changes how BrowsingContextGroups track CrossOriginIsolated status such that it should be more consistently tracked and easier to assert in the places which depend on it. In the new state of the world, a flag is stored within the BCG's ID which tracks whether it was created for cross-origin isolated documents, and that is also checked when making decisions about how to isolate initial about:blank documents, and whether to allow certain changes to CrossOriginOpenerPolicy. This flag is stashed within the ID, as it needs to be preserved if the BCG is destroyed and then re-created from the ID (which may be e.g. round-tripped through JS code). I also considered making the ID be a string instead, to make it easier to include extra information like this, and more clear where the information is stored, however :kmag generally preferred using a bit within the integer ID. These new assertions should now be less likely to spuriously fail due to a DocShell disappearing or similar as well, which should help fix the original issue. Differential Revision: https://phabricator.services.mozilla.com/D152695
-