The ability to run arbitrary JS can cause various problems. This replaces the callback
with a different mechanism to avoid this.
Differential Revision: https://phabricator.services.mozilla.com/D159513
Rather than having the enterprise policy push engine information to the search service, this pulls it from the policies whilst initialisation is in progress. This will ensure the search service always has the correct information for policy engines even if the search settings file is modified.
Differential Revision: https://phabricator.services.mozilla.com/D156538
be -> 3c8745190eebdaf65c610afd5c5425c5ef983c77
fa -> a15c081ae88b3585f8f5cc6d1f43a43ea04edb70
fi -> f87f007d4e0abd017e2630cfea4119ff563d92e9
ia -> 8c3b1edf8234fe4e496730b876f2e206dde97fef
it -> 1f5a60dacce5f17316f49a8948a2dae776ec65be
ko -> 415518dc0f7429beb2b3123fc87cef680367b3c7
sat -> 4fc520df5eab7b08216462cdde2dad2f5b2d70d2
tg -> 0bd1031b8b92da806751b72cd03180f48928cf10
This patch tries to cover a few things :-
1) The `location` object now also maintains an optional `sourceActorId` property
2) `selectSource` now takes an optional `sourceActor` argument which is used to
augument the `location` object and passed to `selectLocation` then onto
`loadSourceText` function to load the specific source text.
3) A new selector `getFirstSourceActorForGeneratedSource` to select the source actor to load the
source text.
4) `LoadSourceText`now always track the selected source actor (which should load the source text)
each time a location is selected.
Differential Revision: https://phabricator.services.mozilla.com/D155952
It restores `Selection` with `AutoSelectionRestorer` instance created first.
Therefore it does not want the callers (currently, only
`HTMLEditor::HandleOutdentAtSelection` only) change `Selection` after doing it
without special reasons. Therefore, it shouldn't return last caret point
suggestion which is not a good point to put caret actually. Then, callers
do not need to handle it as they've never done.
Differential Revision: https://phabricator.services.mozilla.com/D159231
Some profiling of tcampbell's React benchmark [1] shows 6.1 million calls to
js::frontend::GeneralTokenStreamChars<..>::getFullAsciiCodePoint, using 110.57
million instructions (x86_64). That comes out to only 18 insns per call,
which suggests the method is a good candidate for inlining, but it isn't
inlined.
Merely parking an inline annotation on it doesn't help much, because it gets
inlined into js::frontend::TokenStreamSpecific<..>::getCodePoint, but that
isn't inlined into *its* caller(s), so the 6.1 million calls move to
::getCodePoint instead.
This patch requests inlining for both ::getFullAsciiCodePoint and
::getCodePoint and adds some MOZ_NEVER_INLINE annotations to ensure that cold
paths *don't* get inlined into these two, to reduce code bloat and avoid
excessive register pressure.
IsAscii functions in mfbt/TextUtils.h have been marked inline as a precaution;
this probably isn't necessary.
Run time with config [2] is reduced from 0.390 seconds to 0.379 seconds
(2.8% speedup, best of 50 runs), and from 0.402 to 0.396 seconds
(median of 50 runs).
Instruction count falls from 3511.8 million to 3395.8 million, and the number
of data accesses from 1563.7 million to 1487.4 million -- a 4.8% reduction
that is probably caused by avoidance of save/restore sequences in the inlined
fns.
[1] https://github.com/mozilla-spidermonkey/matrix-react-bench
[2] Fedora 35, x86_64, Intel Core i5 1135G7 at 4 ish GHz
configure: --disable-debug --enable-optimize="-g -O2"
run: --no-threads
Differential Revision: https://phabricator.services.mozilla.com/D159500
This commit moves crash tests from dom/mathml and layout/mathml into
testing/web-platform/tests/mathml/crashtests/mozilla, trying to do only
minimal changes (i.e. use 'test-wait' instead of 'reftest-wait' and
fix whitespace errors). lint errors are ignored for usage of
setTimeout as well as the invalid XML file testing bug 289180.
Regarding 400157.xhtml, it uses special powers to trigger a
zoom changes. It could probably be tweaked to convert to a mochitest or
rely on a different dynamic change. However, this was testing a crash for
the `<mfenced>` element in nsMathMLmfencedFrame whose code has been
completely removed, so it's now hard to reproduce the original crash.
Also that makes the test no longer very useful, so we just remove it.
Differential Revision: https://phabricator.services.mozilla.com/D159491
I saw something like a 5% improvement to the Elm, React, and React-Redux
subtests of speedometer with this, with maybe a 1% overall Speedometer
improvement, although the confidence is lower.
Differential Revision: https://phabricator.services.mozilla.com/D158983
Calls in original asm.js source code that result in function calls at the wasm level
require preservation of the original JS line number. This metadata is through a
callSiteLineNums vector which needs to be iterated through exactly in sync between
the compiler and bytecode generator. We have this logic in ion, but for some reason
it also exists in baseline, even though baseline is never used (and won't be) for
asm.js code.
This commit removes logic related to line numbers from baseline, simplifying the
logic. Previously, we needed to consume the potential line number at the beginning
of the instruction, then propagate it to wherever the function call would be. Now
we can just read the bytecode offset of the current instruction whenever we need
it.
Differential Revision: https://phabricator.services.mozilla.com/D159201
This commit fixes actionable clang-tidy warnings in js/src/wasm.
There are some slight functional changes here, but nothing major.
Most of the issues are:
* Mismatched decl/def arg names
* Redundant if (cond) return true; else return false;
* Unsigned to signed is implementation defined
* Unnused definitions
* Typedef instead of using
* Uninitialized definitions
There are still a bunch of clang-tidy warnings, but they're
cases where our style is not matched with clang-tidy.
Differential Revision: https://phabricator.services.mozilla.com/D159194
An exception handling tag `(tag $name)` will nearly always have at
least one param for communicating the pointer to the thrown exception.
We should increase the inline storage in this vector so that we
don't have to allocate in this case. We do this already with the
ValTypeVector used in this class.
Differential Revision: https://phabricator.services.mozilla.com/D159191
`osfile` is deprecated and `./mach lint -l eslint` shows warning message for
it. So I would like to replace it with `PathUtils`.
Differential Revision: https://phabricator.services.mozilla.com/D159343
Also assure that unregistering an accessible removes the right one and
doesn't confuse the attached document with the detached one.
Add stderr output to Accessible::DebugPrint in Android as well.
Differential Revision: https://phabricator.services.mozilla.com/D157528
Calls in original asm.js source code that result in function calls at the wasm level
require preservation of the original JS line number. This metadata is through a
callSiteLineNums vector which needs to be iterated through exactly in sync between
the compiler and bytecode generator. We have this logic in ion, but for some reason
it also exists in baseline, even though baseline is never used (and won't be) for
asm.js code.
This commit removes logic related to line numbers from baseline, simplifying the
logic. Previously, we needed to consume the potential line number at the beginning
of the instruction, then propagate it to wherever the function call would be. Now
we can just read the bytecode offset of the current instruction whenever we need
it.
Differential Revision: https://phabricator.services.mozilla.com/D159201
This commit fixes actionable clang-tidy warnings in js/src/wasm.
There are some slight functional changes here, but nothing major.
Most of the issues are:
* Mismatched decl/def arg names
* Redundant if (cond) return true; else return false;
* Unsigned to signed is implementation defined
* Unnused definitions
* Typedef instead of using
* Uninitialized definitions
There are still a bunch of clang-tidy warnings, but they're
cases where our style is not matched with clang-tidy.
Differential Revision: https://phabricator.services.mozilla.com/D159194
An exception handling tag `(tag $name)` will nearly always have at
least one param for communicating the pointer to the thrown exception.
We should increase the inline storage in this vector so that we
don't have to allocate in this case. We do this already with the
ValTypeVector used in this class.
Differential Revision: https://phabricator.services.mozilla.com/D159191