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

721070 Коммитов

Автор SHA1 Сообщение Дата
Platon Pronko 299c1ddce1 Bug 1640745 - fix NewChannelId so that ids fit into safe JS integer range r=necko-reviewers,valentin
On Linux PID_MAX_LIMIT is 2^22. By default pid_max was set to 2^15, but
systemd since version 243 sets it to 2^22.
nsHttpHandler::NewChannelId uses PID shifted by 32 bits to generate
channelId, and that results in values greater than 2^53.
Such values are fine for uint64_t, but when we pass channelId to
devtools it gets converted to JavaScript floats, and values greater
than 2^53 get errors in lower two bits. This in turn leads to much
sorrow, like request id collisions or "no headers for this request".

This patch shifts the PID by one bit less, resulting in channelIds
that always fit into safe JavaScript integer range for all PIDs.

Differential Revision: https://phabricator.services.mozilla.com/D85990
2020-08-06 07:25:06 +00:00
Andi-Bogdan Postelnicu 1ead43f591 Bug 1657299 - First step of refactor `static-analysis` integration, making it more modular. r=marco
Add a modular approach for the integration of `static-analysis` module in order
to be able to share components of it with other modules, like the integration of
`clangd` in `vscode` where we need to have access to the configuration of `clang-tidy`
in order to have `in-ide` `static-analysis` messages.
In this initial step we make a separate module for the clang-tidy configuration.

Differential Revision: https://phabricator.services.mozilla.com/D85979
2020-08-06 06:51:16 +00:00
Andi-Bogdan Postelnicu 9e73e83509 Bug 1657301 - Reformat `static-analysis` with `black`. r=sylvestre
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85985
2020-08-05 13:32:46 +00:00
Andi-Bogdan Postelnicu 60cc6f8d69 Bug 1656740 - Integrate `clangd` in `vscode` for C++ language support. r=froydnj
In order to have a cross platform ide for C++ language support we've added `clangd`
extenssion and artifact part of `vscode` suite.
To generate the configuration you simply run:
`./mach ide vscode `.

Differential Revision: https://phabricator.services.mozilla.com/D85416
2020-08-06 06:25:17 +00:00
Csoregi Natalia cefc5b2c94 Backed out changeset c2583743d4eb (bug 1654149) for bustage on ObjLiteral.cpp. CLOSED TREE 2020-08-06 09:55:40 +03:00
André Bargull 09dc689cd0 Bug 1657100 - Part 5: Optimise IsPossiblyWrappedRegExpObject in CacheIR. r=jandem
Similar to part 1 and part 2 only optimises when no wrappers are used.

Differential Revision: https://phabricator.services.mozilla.com/D85855
2020-08-06 06:16:29 +00:00
André Bargull 3c00c4c610 Bug 1657100 - Part 4: Use assertions to check intrinsics are called with the correct arguments. r=jandem
Use assertions for consistency with other intrinsics which are already asserting
that the correct number of arguments with the correct types are used.

Differential Revision: https://phabricator.services.mozilla.com/D85854
2020-08-05 11:46:18 +00:00
André Bargull f427e31098 Bug 1657100 - Part 3: Remove emitNativeCalleeGuard for intrinsics. r=jandem
The first intrinsics optimised in CacheIR were still using emitNativeCalleeGuard.
Later one we've removed this guard.

Differential Revision: https://phabricator.services.mozilla.com/D85853
2020-08-05 11:46:06 +00:00
André Bargull d77a1da52f Bug 1657100 - Part 2: Optimise PossiblyWrappedTypedArrayLength in CacheIR. r=jandem
Similar to part 1 only optimises when called without a wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D85852
2020-08-05 11:45:38 +00:00
André Bargull 3dd1477b76 Bug 1657100 - Part 1: Optimise Intrinsic(PossiblyWrapped)ArrayBufferByteLength in CacheIR. r=jandem
Similar to Ion only optimise the case when the object isn't actually a wrapper.

We don't have a separate MArrayBufferByteLength MIR node, so use the same
approach as used in IonBuilder and use a fixed slot load to optimise the
call.

Differential Revision: https://phabricator.services.mozilla.com/D85851
2020-08-05 11:44:55 +00:00
Tooru Fujisawa bf6672e967 Bug 1654149 - Add dumpStencil shell-builtin. r=tcampbell
Add dump method to stencil-related structs, that dumps the struct as JSON,
and `dumpStencil()` shell-builtin as a consumer.

Some structs have dumpFields method, given that JSONPrinter only provide
beginObjectProperty/endObject to print a property with an object value.

There's some design decision about when to use string-representation and when
to use object.
Currently simple single-field struct like ScopeIndex uses string-representation
like "ScopeIndex(0)", and ScriptAtom also uses string-representation.

There's an exception in ScriptAtom case in DumpScriptThing,
that we need to differentiate string and string-representation of other
structs, and for simplicity, ScriptAtom case uses object with "type" property,
and other single-field structs use string-representation.

The current dumpStencil does not dump CompilationInfo.asmJS (FIXME) and
ScriptStencil.immutableScriptData.

Most of ScriptStencil.immutableScriptData field can be dumped by `dis()`
function.

Differential Revision: https://phabricator.services.mozilla.com/D86042
2020-08-06 05:57:12 +00:00
Csoregi Natalia c2fc6d2bb6 Backed out 2 changesets (bug 1639153) for bustage on MacroAssembler.h. CLOSED TREE
Backed out changeset 296b7f5a0713 (bug 1639153)
Backed out changeset f68854b70d6a (bug 1639153)
2020-08-06 09:31:45 +03:00
Dmitry Bezhetskov f0c92ad490 Bug 1639153 - Part 2: Preserve callee and caller tls'es. r=lth
This is a followup patch for removing Frame::tls.
Now, we are preserving caller's and callee's tls'es for all possible cross-instance calls in the previously allocated abi slots.
We also use preserved tls values to restore the caller's tls in Ion. Baseline doesn't need this because it restores the caller tls from its private stack slot after the call.

Differential Revision: https://phabricator.services.mozilla.com/D82888
2020-08-06 05:23:07 +00:00
Dmitry Bezhetskov 827e244302 Bug 1639153 - Part 1: Reserve two slots after stack arguments for the future tls preservation. r=lth
We are going to remove Frame::tls and support trampolines for indirect calls, so we need to get rid of using Frame::tls.
In this and the followup patches I will iteratively remove all dependencies of Frame::tls and remove it eventually.

In this patch I changed wasm ABI to allocate two stack slots after stack args to preserve caller's and callee's tls'es in the near future.

Differential Revision: https://phabricator.services.mozilla.com/D82881
2020-08-06 04:57:48 +00:00
Erik Nordin d78a8c8c6a Bug 1656587 - Retrieve Default Printer Name Using CUPS r=AlaskanEmily
Differential Revision: https://phabricator.services.mozilla.com/D85628
2020-08-06 04:28:01 +00:00
Cosmin Sabou 1fd1260b5e Backed out 4 changesets (bug 1623764) for mochitest failures on test_movement_by_characters.html. CLOSED TREE
Backed out changeset f927522d89bc (bug 1623764)
Backed out changeset c100eb8ae430 (bug 1623764)
Backed out changeset 1147ded16458 (bug 1623764)
Backed out changeset 7af572ec5edf (bug 1623764)
2020-08-06 08:09:42 +03:00
Cosmin Sabou 5839aca91c Backed out changeset 7b46f9754641 (bug 1587653) for bc failures browser_protections_lockwise.js. 2020-08-06 07:59:52 +03:00
Butkovits Atila a35dac29ec Backed out changeset 9086f10df485 (bug 1657107) for build bustage at MacIOSurface.cpp. CLOSED TREE 2020-08-06 07:31:22 +03:00
Mike Hommey 99e6857e74 Bug 1657446 - Fix lint error after bug 1656044. r=nalexander
mozbuild.configure.ConfigureError: `help` should contain "{Enable|Disable}" because of non-constant default

Differential Revision: https://phabricator.services.mozilla.com/D86123
2020-08-06 03:19:41 +00:00
Mike Hommey 7347ccb900 Bug 1657446 - Fix co_lnotab for large offsets in Lint._raise_from. r=nalexander
Contrary to python2, python3 considers the values in cl_lnotab to be signed
integers, so with python3, offsets larger than 127 would be encoded in a way
that would make them wrong, or worse, negative.

Differential Revision: https://phabricator.services.mozilla.com/D86122
2020-08-06 04:07:14 +00:00
Mike Hommey d0d43d8f9b Bug 1657446 - Fix noise when running mozbuild/test/configure/lint.py with unittest.main. r=nalexander
Namely:
  build/moz.configure/old.configure:21: DeprecationWarning: invalid escape sequence \s
  build/moz.configure/old.configure:26: DeprecationWarning: invalid escape sequence \s
  python/mozbuild/mozbuild/configure/__init__.py:433: ResourceWarning: unclosed file <_io.BufferedReader...>
  python/mozbuild/mozbuild/configure/lint.py:120: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

Differential Revision: https://phabricator.services.mozilla.com/D86121
2020-08-06 03:19:08 +00:00
Botond Ballo 202b6af1f3 Bug 1657482 - Work around an unused variable warning. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D86133
2020-08-06 04:02:57 +00:00
Erik Nordin 566afa226a Bug 1656384 - Retrieve Printers using CUPSPrinterList on macOS r=jwatt,AlaskanEmily
Differential Revision: https://phabricator.services.mozilla.com/D85623
2020-08-06 01:42:13 +00:00
Itiel 2f84734040 Bug 1656706 - Fix prefixed properties being displayed incorrectly in the Compatibility panel, for RTL r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D85663
2020-08-06 03:36:28 +00:00
Matt Woodrow 64cfd65a62 Bug 1657107 - Use YUV22 format for uploading videos to IOSurfaces instead of NV12. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D86081
2020-08-06 03:36:53 +00:00
Karl Tomlinson 1637fad094 Bug 1634200 add crashtest with AudioWorkletNode after unload r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D85974
2020-08-06 01:12:43 +00:00
Kagami Sascha Rosylight 0f2d254487 Bug 1623764 - Part 4: Stop at hard linebreaks when eat_space_to_next_word r=emilio,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D85923
2020-08-06 01:18:52 +00:00
Kagami Sascha Rosylight d41518f2d3 Bug 1623764 - Part 3: Expose IsLineWrapped via LineInfo r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85922
2020-08-05 13:24:22 +00:00
Kagami Sascha Rosylight 0df495e2fe Bug 1623764 - Part 2: Add mSawInlineCharacter to PeekWordState r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85921
2020-08-05 13:24:14 +00:00
Kagami Sascha Rosylight f970ee62bd Bug 1623764 - Part 1: Destruct ILineIterator from where it's initialized r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D85920
2020-08-05 13:24:02 +00:00
Matthew Noorenberghe f158fda60e Bug 1587653 - Include breached logins in about:protections without a Monitor account and if PP is logged in. r=ewright
Also separate the Lockwise/Monitor data collection to map to the cards

Differential Revision: https://phabricator.services.mozilla.com/D85642
2020-08-06 01:17:28 +00:00
Severin e6e6f0c2ad Bug 1655010 - pmgr doorhanger now suggests logins from different subdomains;r=MattN
Differential Revision: https://phabricator.services.mozilla.com/D86098
2020-08-06 01:27:33 +00:00
Kartikaya Gupta 65de9cd97f Bug 1251612 - Sanitize layer transforms before computing stddev. r=botond
Depends on D86017

Differential Revision: https://phabricator.services.mozilla.com/D86018
2020-08-05 20:48:56 +00:00
Kartikaya Gupta a76f7ee9a1 Bug 1251612 - Make test_smoothness a plain mochitest. r=botond
Also modernize it a tiny bit. This also adjusts the conditions under which
the test is run, and keeps it disabled on CI for now since it's not clear
this will provide value from being run in CI at the moment (fails a lot).

Differential Revision: https://phabricator.services.mozilla.com/D86017
2020-08-05 20:47:55 +00:00
Kartikaya Gupta 39167fa7cd Bug 1251612 - Support the GetFrameUniformity API in content processes. r=botond,froydnj
This moves the IPC mechanism from PCompositorBridge to PLayerTransaction/
PWebRenderBridge, so that it can be used by content processes like the other
test APIs. It still only produces actual data for the layers backend; for
WR it will just return empty datasets.

Differential Revision: https://phabricator.services.mozilla.com/D86016
2020-08-05 21:42:06 +00:00
Gerald Squelart b0647eab4e Bug 1657174 - Added more targeted assertions around multiple thread de-registrations - r=mstange
`MOZ_RELEASE_ASSERT(registeredThread == TLSRegisteredThread::RegisteredThread(lock));` is failing on Android, probably as a follow-up to bug 1651086, which allowed multiple registrations (to fix a problem with yet-unknown root cause).
This assertion is too broad to help find the issue because at this point:
- If `FindCurrentThreadRegisteredThread()` is not null, `TLSRegisteredThread::RegisteredThread()` should also not be null, and it should equal `FindCurrentThreadRegisteredThread()`, from the first succesful `profiler_register_thread()`.
- If `FindCurrentThreadRegisteredThread()` is null, `TLSRegisteredThread::RegisteredThread()` should be null as well, from the first `profiler_unregister_thread()`.

So this patch splits this assertion into multiple more targeted ones to check the above, and also some extra assertions after de-registration, to ensure that both `FindCurrentThreadRegisteredThread()` and `TLSRegisteredThread::RegisteredThread()` are null.

Differential Revision: https://phabricator.services.mozilla.com/D86118
2020-08-06 00:55:20 +00:00
Chris Fallin d53b8b620f Bug 1656638: Add Wasm compile- and run-time telemetry to track Wasm compiler performance. r=lth
This patch adds telemetry to measure the time spent in Wasm compilers
and in the code that they generate (actually, all JS and Wasm code).

For simplicity, it measures wallclock time as a proxy for CPU time.
Furthermore, it measures runtime for all JS and Wasm code, and all
native functions invoked by the JS or Wasm code, by timing from
top-level entry to exit. This is for efficiency reasons: we do not want
to add a VM call in the transition stubs between native and JS or JS and
Wasm; that would be a Very Bad Thing for performance, even for a Nightly
build instrumented with telemetry. Because of that, it's difficult to
separate JITted JS and JITted Wasm runtime, but observing their sum
should still be useful when making comparisons across compiler changes
because absolute reductions will still be visible.

The plumbing is somewhat awkward, given that Wasm compilers can run on
background threads. It appears that the telemetry-callback API that
SpiderMonkey includes to avoid a direct dependency on the Gecko
embedding had artificially limited the callback to main-thread use only.
This patch removes that limitation, which is safe at least for Gecko;
the telemetry hooks in Gecko are thread-safe (they take a global mutex).
That way, the background threads performing compilation can directly add
telemetry incrementally, without having to pass this up through the main
thread somehow.

Finally, I have chosen to add the relevant metrics as Scalar telemetry
values rather than Histograms. This is because what we are really
interested in is the sum of all these values (all CPU time spent in
compilation + running Wasm code); if this value goes down as a result of
a Wasm compiler change, then that Wasm compiler change is good because
it reduces CPU time on the user's machine. It is difficult to add two
Histograms together because the bins may have different boundaries. If
we instead need to use a binned histogram for other reasons, then we
could simply report the sum (of all compiler time plus run time) as
another histogram.

Differential Revision: https://phabricator.services.mozilla.com/D85654
2020-08-06 01:28:45 +00:00
alwu 96afc7c19e Bug 1657224 - add a pref to control stopping media after media reaches to the end. r=chunmin
In bug1654045, we would stop controlling media once media reaches to the end. Considering some user might still want to control media by pressing media keys even if it has ended, so adding a pref to control this abilitiy.

Differential Revision: https://phabricator.services.mozilla.com/D85930
2020-08-05 23:12:16 +00:00
alwu 405d662683 Bug 1657223 - turn off deactivation timer by default. r=chunmin
The deactivation timer introduces an uncertainty of when user can control media, but instead of removing that, I want to add a pref to control it and disable it by default because I can still think of some benefit of this ability.

Differential Revision: https://phabricator.services.mozilla.com/D85928
2020-08-05 23:09:21 +00:00
Simon Fraser 27e5ba55f3 Bug 1648051 Task resource monitor r=mtabara,tomprince
I've left the monitor disabled for now, so that we can have a smaller pushes for enabling and disabling it if needed. It should allow more fine grained control.

We may also want to include extracting the monitor tool from a github version instead, and also removing the assumption and it being forked from the parent, so that it's instead given a process ID to treat as the parent it should watch.

Differential Revision: https://phabricator.services.mozilla.com/D84374
2020-08-06 01:21:24 +00:00
Botond Ballo a567e90f69 Bug 1657482 - Modernize some loops. r=kats
Use some structured binding goodness while we're at it.

Depends on D86083

Differential Revision: https://phabricator.services.mozilla.com/D86084
2020-08-06 00:23:26 +00:00
Botond Ballo 3f272150c2 Bug 1657482 - Avoid unnecessary map lookups. r=kats
Depends on D86082

Differential Revision: https://phabricator.services.mozilla.com/D86083
2020-08-06 00:22:33 +00:00
Botond Ballo e5d1fb494e Bug 1657482 - Use unique_ptr rather than raw new/delete. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D86082
2020-08-06 00:21:55 +00:00
sotaro e9d5876fef Bug 1657262 - Fix TextureFlags::WAIT_HOST_USAGE_END handling r=mattwoodrow
TextureClient that has TextureFlags::WAIT_HOST_USAGE_END needs to receive NotifyNotUsed from host side.

Differential Revision: https://phabricator.services.mozilla.com/D85962
2020-08-06 00:56:20 +00:00
Karl Tomlinson 5195905845 Bug 1634200 don't create a new global when the Worklet is finished r=padenot
When the worklet has already received the notification to shut down, there
will be no further notfication to release another global.

Differential Revision: https://phabricator.services.mozilla.com/D85975
2020-08-06 01:06:03 +00:00
John Lin 7ab9a436b9 Bug 1651088 - ensure ExoPlayer instance operate on a single thread. r=geckoview-reviewers,snorp
The threading model described in the javadoc (ExoPlayer.java#92 in tree)
requires that the player is accessed from a single thread. However current
GeckoHlsPlayer implementation violates this rule and uses the player from
Gecko main thread and other media task queues. Introduce methods to execute
code asynchronously and synchronously for GeckoHlsPlayer to follows the rule.
Also add comments documenting thread usages for some instance variables and
assertions in the begining of methods that need to be on the player thread
to help debugging.

Differential Revision: https://phabricator.services.mozilla.com/D85668
2020-08-05 20:04:30 +00:00
Sam Foster b2564497a9 Bug 1656298 - Line up the rows and columns in the print UI. r=mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D85950
2020-08-06 00:45:19 +00:00
Erik Nordin 7c1c60fb4d Bug 1656379 - Rename nsCUPSShim function pointers r=AlaskanEmily,jwatt
Differential Revision: https://phabricator.services.mozilla.com/D85491
2020-08-06 00:12:07 +00:00
Jan-Ivar Bruaroey 4a8b5ea5a8 Bug 1654248 - Fix missing telemetry reporting of WEBRTC_CALL_DURATION, and stop counting renegotiations in WEBRTC_CALL_COUNT_2. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D85042
2020-08-05 23:47:46 +00:00
Butkovits Atila 26b13464c2 Backed out changeset c8123a3e4249 (bug 1656638) for build bustages at Runtime.h. CLOSED TREE 2020-08-06 02:49:14 +03:00