Commit Graph

602436 Commits

Author SHA1 Message Date
Aaron Klotz
2a9cc69e85 Bug 1460022: Part 11 - Update Win32 nsWindow to work with revised DLL interceptor interface; r=mhowell
--HG--
extra : rebase_source : 273ea15e8379a8ff51ab6d37d210c86a9d72b78c
2018-06-27 11:52:01 -06:00
Aaron Klotz
991d4389a0 Bug 1460022: Part 10 - Update crash reporter to work with revised DLL interceptor interface; r=dmajor
--HG--
extra : rebase_source : 58d231679430ee151f9adf9f6aec59f7e0be3019
2018-06-27 11:51:40 -06:00
Aaron Klotz
ca2a5b7f5d Bug 1460022: Part 9 - Update sandboxing code to work with revised DLL interceptor interface; r=bobowen
--HG--
extra : rebase_source : 03daf9a71dbeb6e27699dad0030a8baf831cbb56
2018-06-27 11:51:29 -06:00
Aaron Klotz
ecd4916dce Bug 1460022: Part 8 - Update DLL blocklist to work with revised DLL interceptor interface; r=mhowell
--HG--
extra : rebase_source : 04e2f3c3ea6916f43e54a7f8c992f6cbb4fb3286
2018-06-27 11:51:10 -06:00
Aaron Klotz
cc80cb14e0 Bug 1460022: Part 7 - Update plugin code to work with revised DLL interceptor interface; r=handyman
--HG--
extra : rebase_source : 277e237e80b513b055b55ef7fb5cace7f240ea95
2018-06-27 11:50:50 -06:00
Aaron Klotz
ee74c34ce2 Bug 1460022: Part 6 - Update GMP code to work with new DLL interceptor interface; r=cpearce
--HG--
extra : rebase_source : 17d7f30e7fc971fd8d2d3729c7d262cdc6a4c343
2018-06-27 11:49:49 -06:00
Aaron Klotz
b90ed7ab5d Bug 1460022: Part 5 - Update launcher process to work with new DLL interceptor interface; r=mhowell
--HG--
extra : rebase_source : 6b0f7abb908993afb77f3c90b57cb870e630f778
2018-06-27 11:49:30 -06:00
Aaron Klotz
63e70eee76 Bug 1460022: Part 4 - Update a11y code to reflect new interface for DLL interceptor; r=Jamie
--HG--
extra : rebase_source : ada28438a506edcd4a122ec2c99a742503baa945
2018-06-27 11:49:17 -06:00
Aaron Klotz
0ff30867ea Bug 1460022: Part 3 - Update TestDllInterceptorCrossProcess to reflect new interceptor interface; r=handyman
--HG--
extra : rebase_source : 208380bdaaf2c394c5d93cf2f0f8cb2a117b3e66
2018-06-27 11:48:45 -06:00
Aaron Klotz
9c86a6adcd Bug 1460022: Part 2 - Update TestDllInterceptor to use new DLL interceptor interface; r=handyman
In addition to updating the interface, this patch also significantly alters the
structure of this test. In particular, it removes the Test* functions in favour
of using template magic.

I did this because I noticed that, in the majority of cases, the stub function
was being called with all zero arguments, and then we check for the expected
error code. I thought that maybe we could replace that repetition with some
templates that instantiate a blank tuple that may then be applied to a callable
object.

See the (MAYBE_)TEST_HOOK* and TEST_DETOUR* macro definitions for detailed
information about how to use these things.

The test successfully completes with both 32-bit and 64-bit builds.

--HG--
extra : rebase_source : 95e9a3386c0a6c5f9f78b1e8fa5a88c1c30e9b51
2018-06-27 11:48:28 -06:00
Aaron Klotz
4cb1d86ef0 Bug 1460022: Part 1 - Modify DLL interceptor to use one-time initialization when setting hooks; r=handyman
This patch makes the interceptor's AddHook functions private, and converts
the stubs from simple function pointers into objects containing both the stub
function pointer, plus a INIT_ONCE sentinel.

Setting a hook now requires calling Set or SetDetour on the stub, which ensures
that the hook attempt happens once and only once.

The constructor for the new object is constexpr, so it should not generate
static initializers if it is declared statically.

Note that, as a corollary of the new behaviour, we no longer need to set guards
around any hook setting code. I have removed those when present.

--HG--
extra : rebase_source : 260ec9f99839468d9994186fddd7cf2b33e6c87d
2018-06-27 11:48:05 -06:00
Bas Schouten
a95db7c11a Bug 1473136: Cache mNeedsActiveLayer once for nsDisplayOpacity. r=mattwoodrow 2018-07-03 23:07:44 +00:00
Rok Garbas
2a544047c6 Bug 1471541 - switch to new tooltool url, r=jlund
--HG--
extra : rebase_source : 85cd6f1e78ec293d5c9fba8d41b31b5ca8bc521e
2018-07-03 15:35:58 -07:00
shindli
1384968ccc Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
rename : devtools/shared/gcli/commands/screenshot.js => devtools/server/actors/webconsole/screenshot.js
rename : devtools/shared/gcli/commands/screenshot.js => devtools/shared/webconsole/screenshot-helper.js
2018-07-04 01:35:17 +03:00
shindli
3d917e5382 Merge inbound to mozilla-central. a=merge
--HG--
rename : devtools/shared/gcli/commands/screenshot.js => devtools/server/actors/webconsole/screenshot.js
rename : devtools/shared/gcli/commands/screenshot.js => devtools/shared/webconsole/screenshot-helper.js
2018-07-04 00:56:24 +03:00
Boris Zbarsky
96d0b4cc2e Bug 1472829. Add use counters for document.open. r=smaug
The idea is to count non-no-op document.open and to count how many times that's
done with the replace argument set to "replace".
2018-07-03 17:48:53 -04:00
Narcis Beleuzu
04b4925170 Backed out 3 changesets (bug 1470528) for build bustages on WebRenderBridgeParent. CLOSED TREE
Backed out changeset 90513daef576 (bug 1470528)
Backed out changeset e438548991db (bug 1470528)
Backed out changeset f859daf8d8d9 (bug 1470528)
2018-07-04 00:41:14 +03:00
Ryan VanderMeulen
9e88581315 Bug 1473118 - Update pdf.js to version 2.0.661. r=bdahl 2018-07-03 15:15:46 -04:00
Ryan Hunt
c284332e41 Bug 1470528 - Implement CONTENT_FRAME_TIME for the webrender codepath. r=sotaro
This commit implements the CONTENT_FRAME_TIME metric for the webrender code
path. It follows the same structure as the previous commit implementing it for
the non-webrender code path.

MozReview-Commit-ID: 6aI5uISjgge

--HG--
extra : rebase_source : acbf83d0071e8932b5e96016e6e39e27a7b4da8c
extra : histedit_source : a0f93f80441e5f45c0113244d15400d0f53d9c92
2018-06-26 13:43:14 -05:00
Ryan Hunt
d34e6c84a0 Bug 1470528 - Implement CONTENT_FRAME_TIME for the non-webrender codepath. r=sotaro
This commit adds the CONTENT_FRAME_TIME metric which tracks the time from the beginning
of a paint in the content process until it is presented in the compositor.

There is existing logging for frame latency which tracks from the beginning of a refresh
tick until the frame is presented. This is undesirable for this probe as javascript and
layout can run in this time period. So this probe uses the existing infrastructure for
logging frame latency, but uses a start time from BeginTransaction in layer manager.

MozReview-Commit-ID: 5z9LS3tsZTY

--HG--
extra : rebase_source : cecb7149f50b2abe7a827dc20f1e8b8ade199258
extra : histedit_source : 581f8f38fc8335575d7275b903a8e1d6a9e5a369
2018-06-26 13:40:10 -05:00
Ryan Hunt
5ca70b4c61 Bug 1470528 - Add IsRootWebrenderBridgeParent method. r=kats
This commit adds a helper function for determining if the WebRenderBridgeParent
is for a content process and replaces uses with it appropriately.

MozReview-Commit-ID: 6YZhjYEYS3P

--HG--
extra : rebase_source : 8ecb1f9146376ac84b84680a5a3454200c940d6a
2018-06-26 13:37:31 -05:00
Nathan Froyd
b07d6639b8 Bug 1472806 - fix missing typename warning in COMPtrHolder.h; r=aklotz
MSVC permits the missing `typename` as an extension, whereas clang-cl warns.
This is easy to fix, so let's fix the warning noise.
2018-07-03 17:04:26 -04:00
Nathan Froyd
00e534b498 Bug 1472806 - fix microsoft template lookup extensions in interceptor code; r=aklotz
clang-cl complains about things like:

z:/build/build/src/obj-firefox/dist/include/mozilla/interceptor/VMSharingPolicies.h(53,50):  warning: use of identifier 'GetLocalView' found via unqualified lookup into dependent bases of class templates is a Microsoft extension [-Wmicrosoft-template]
      return TrampolineCollection<MMPolicy>(*this, GetLocalView(), GetRemoteView(),
                                                   ^

in various files in interceptor/, and since the warnings are in headers,
rather than in sources, they're rather annoying.  Let's fix this to be
standards-complaint and make clang-cl stop complaining.
2018-07-03 17:04:26 -04:00
Nathan Froyd
0b0f08aedb Bug 1472806 - fix -Wpessimizing-move warnings in Interceptor.cpp; r=aklotz
There's no need to invoke std::move here, because Get() is already
returning a temporary that can be moved into the RefPtr.
2018-07-03 17:04:27 -04:00
Bas Schouten
7f6794045e Bug 1472830: Reuse the work from ApplyOpacityToChildren when possible. r=mattwoodrow 2018-07-03 20:26:40 +00:00
Gijs Kruitbosch
09a107bc24 Bug 1469916, r=ckerschb,jkt
--HG--
extra : rebase_source : 180442deeef92f0e9202d76c5e4e46b630072d99
extra : source : be11a32900298eb6fd4d18ad21b9a699995254c3
2018-06-22 15:41:39 +01:00
David Parks
6a029ee77d Bug 1449388 - Send NPNVaudioDeviceStateChanged to plugins when any Windows audio device changes state. r=jimm
This message allows plugins to detect when any audio devices change state, even when running inside of our plugin sandbox.
2018-06-13 13:12:54 -07:00
André Bargull
2304809316 Bug 1464475 - Use HandleValue for setPendingException(). r=sfink 2018-06-25 07:52:47 -07:00
Dragan Mladjenovic
b04e015746 Bug 1467404 - [MIPS] Apply MacroAssembler::convertDoubleToInt32 fix form Bug 1465770 to MacroAssembler::convertDoubleToInt32 also. r=nbp 2018-07-03 15:08:48 -04:00
Jean-Yves Avenard
3df44232ab Bug 1471165 - P3. Update web-platform-tests results. r=bryce
Summary:
There are two tests failing:
Test that decodingInfo rejects if the video configuration contentType has more than one parameter
and
Test that decodingInfo rejects if the audio configuration contentType has more than one parameter

Our nsContentTypeParser doesn't provide an ability to count the number of parameters, only to retrieve one if the name is known.

Considering the scope of the extra work, we'll leave it as-is for now

Reviewers: bryce

Tags: #secure-revision

Bug #: 1471165

Differential Revision: https://phabricator.services.mozilla.com/D1835
2018-07-03 11:45:29 -07:00
Jean-Yves Avenard
9442cd0ea8 Bug 1471165 - P2. Add logging facilities. r=bryce
Reviewers: bryce

Tags: #secure-revision

Bug #: 1471165

Differential Revision: https://phabricator.services.mozilla.com/D1834
2018-07-03 11:45:29 -07:00
Jean-Yves Avenard
138b0b299d Bug 1471165 - P1. Simulate required MediaCapabilities members in optional dictionary. r=bz
Summary:
In order to allow for optional dictionaries with required members
See https://github.com/heycam/webidl/issues/76 for more information.

Reviewers: bzbarsky

Tags: #secure-revision

Bug #: 1471165

Differential Revision: https://phabricator.services.mozilla.com/D1833
2018-07-03 11:45:28 -07:00
Jean-Yves Avenard
cab83f1874 Bug 1409664 - P28. Extrapolate VP9 benchmark results for requested vp9 configuration. r=bryce
Summary:
Additionally, consider all videos <= 480p to be smooth and power efficient as:
1- Hardware decoding it typically not used for those
2- We can't do any better
3- Any machines should be able to do 480p

Depends on D1794

Reviewers: bryce

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1796
2018-07-03 11:45:28 -07:00
Jean-Yves Avenard
a867c82f1e Bug 1409664 - P27. Don't disable webm container for MSE::isTypeSupported when MediaCapabilities is enabled. r=bryce
Summary:
MediaCapabilities provide a finer detail on VP9 being supported or not. YouTube will use that information to determine which resolutions to support when using VP9

Depends on D1772

Reviewers: bryce

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1794
2018-07-03 11:45:27 -07:00
Jean-Yves Avenard
5a3da4d067 Bug 1409664 - P26. Use VP9 benchmark results to determine smoothness. r=bryce
Summary:
If the benchmark task hasn't run yet, we will assume smoothness for now.

Depends on D1771

Reviewers: bryce

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1772
2018-07-03 11:45:26 -07:00
Jean-Yves Avenard
75c2f6b7ce Bug 1409664 - P25. Don't use main thread with Benchmark . r=bryce
Summary:
Instead have it use its own task queue.

Depends on D1767

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1771
2018-07-03 11:45:26 -07:00
Jean-Yves Avenard
c6c5f35fa9 Bug 1409664 - P24. Make IsVP9DecodeFast usable on any thread. r=bryce
Summary:
This will allow to be called from the MediaCapabilities taskqueue if we find that a decoder won't be hardware accelerated.

It is still assumed that Benchmark::Init() was called at least once on the main thread.

Depends on D1628

Tags: #secure-revision

Differential Revision: https://phabricator.services.mozilla.com/D1767
2018-07-03 11:45:25 -07:00
Jean-Yves Avenard
5f7024ad4c Bug 1409664 - P23. Update wpt expected results. r=bryce
Summary:
Most tests will pass now.
The remaining tests failing are related to incompatibility with our bindings generator, and will be addressed in a later change.

Depends on D1719

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1628
2018-07-03 11:45:25 -07:00
Jean-Yves Avenard
1f1e9dbfe9 Bug 1409664 - P22. Create SPS/PPS extradata to better determine decoder capabilities. r=bryce
Summary:
The Apple VT decoder requires SPS+PPS at construction time. If not provided, in earlier macOS it used to give an error. In the current 10.13 it appears to work, however the decoder always report to be software only.

To properly determine the decoder capabilities, we construct a SPS NAL from the codec mimetype provided.

Details on the structure of the mimetype can be found in https://tools.ietf.org/html/rfc6381#section-3.3 and is a 1:1 match with the data found in the SPS.

Depends on D1718

Reviewers: bryce

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1719
2018-07-03 11:45:24 -07:00
Jean-Yves Avenard
c5bbea93f3 Bug 1409664 - P21. Retrieve H264 constraint flags with ExtractH264CodecDetails. r=bryce
Summary:
We'll need it to properly build a SPS/PPS extradata later. Also, change the types used. The original data is stored on two bytes ASCII, it will always fit in a uint8_t. Additionally, this is how those values are stored in a SPS.

Depends on D1678

Reviewers: bryce

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1718
2018-07-03 11:45:24 -07:00
Jean-Yves Avenard
cafd081573 Bug 1409664 - P20. Add BitWriter class. r=bryce
Summary:

Depends on D1633

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1678
2018-07-03 11:45:23 -07:00
Jean-Yves Avenard
cd7563c7fd Bug 1409664 - P19. Don't wrap H264 decoder in H264 converter. r=bryce
Summary:
By default, when creating a H264 decoder it is wrapped into a H264Converter which will only create the actual decoder once a valid SPS/PPS has been seen.
As creating valid SPS/PPS NALs isn't trivial, when all we care about are capabilities of such decoder, we do not wrap the decoder so that it will be immediately created.
We can then test its capabilities.

We only enable this on windows, as on mac we need to generate a SPS/PPS, otherwise the mac decoder always report that HW decoding is not enabled.

Depends on D1632

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1633
2018-07-03 11:45:23 -07:00
Jean-Yves Avenard
f07b7bee8b Bug 1409664 - P18. Properly pass KnowsCompositor object to decoder. r=bryce, r=bz
Summary:
To properly determine if a decoder is hardware accelerated, we must pass information about the compositor to the decoder.

Depends on D1631

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1632
2018-07-03 11:45:22 -07:00
Jean-Yves Avenard
34e1735ed0 Bug 1409664 - P17. Remove unused variables. r=bryce
Summary:
Silence warnings.

Depends on D1630

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1631
2018-07-03 11:45:22 -07:00
Jean-Yves Avenard
f278c2be62 Bug 1409664 - P16. Fix typo in variable name. r=bryce
Summary:

Depends on D1629

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1630
2018-07-03 11:45:21 -07:00
Jean-Yves Avenard
b763f84cf1 Bug 1409664 - P15. Fix canPlayType so that it checks codecs if provided. r=bryce
Summary:
For flac, mp3 and adts, if a codec was provided but wasn't supported in the container, it would have reported Maybe instead of No

Depends on D1628

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1629
2018-07-03 11:45:21 -07:00
Jean-Yves Avenard
88f93633b1 Bug 1409664 - P14. Provide more details for audio and video configuration. r=bryce, r=baku
Summary:
We now provides more detailed information for audio (check sampling rate and channels if provided).

And check for the power efficient attribute. We directly correlate this information with the decoder being hardware accelerated or not. All audio codecs are deemed to be power efficient.

Depends on D1626

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1627
2018-07-03 11:45:21 -07:00
Jean-Yves Avenard
df79cae335 Bug 1409664 - P13. Report the Apple's H264 decoder is hardware accelerated when not yet initialized. r=bryce
Summary:
We can't create a H264 VT decoder until we have all SPS/PPS NALs, which makes it tricky to generate when we only want to check if H264 is supported.
On mac, we can reasonable assume that hardware acceleration is always supported (though on a mac pro 2013 that isn't the case or hackintosh with nvidia cards).

Depends on D1625

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1626
2018-07-03 11:45:20 -07:00
Jean-Yves Avenard
0c1b59ee76 Bug 1409664 - P12. Don't attempt to play non-supported AAC sampling rate. r=padenot
Summary:
We know those sampling rate aren't supported and cause initialization errors later.

Depends on D1624

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1625
2018-07-03 11:45:20 -07:00
Jean-Yves Avenard
d346b32eb9 Bug 1409664 - P11. Add GetTracksInfo method to all MediaDecoder instances. r=bryce
Summary:
Allows to build an array ot TrackInfo built from the mimetype provided. This will allow to create dummy decoder to check that if they are supported and how well the decoder will perform.

Depends on D1623

Tags: #secure-revision

Bug #: 1409664

Differential Revision: https://phabricator.services.mozilla.com/D1624
2018-07-03 11:45:20 -07:00