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

51 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 00cd5d4380 Bug 1619112 part 5. Stop accepting nsAString in ErrorResult error-throwing. r=smaug
Callers should pass in UTF-8, since that's what the JS engine ends up with in the end anyway.

The various URL changes are because NS_NewURI converts incoming nsAString to
UTF-8 anyway.  So we might as well do that up-front and then use the UTF-8
string for both the NS_NewURI call and the error-reporting if it fails.

Differential Revision: https://phabricator.services.mozilla.com/D65543

--HG--
extra : moz-landing-system : lando
2020-03-06 21:08:02 +00:00
Boris Zbarsky c878a8bb26 Bug 1619112 part 2. Pass char literals instead of char16_t literals into ErrorResult throwing methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65538

--HG--
extra : moz-landing-system : lando
2020-03-06 21:04:58 +00:00
Boris Zbarsky 05327f8a52 Bug 1613978. Allow passing u"...", not just nsAStrings, to templated ThrowType/RangeError. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D62061

--HG--
extra : moz-landing-system : lando
2020-02-10 13:08:48 +00:00
Boris Zbarsky 1395be1f23 Bug 1613013 part 3. Annotate TypeErrors and RangeErrors from WebIDL implementations with the method they come from. r=peterv
Please review the changes to Errors.msg very carefully.  I caught a number of
mistakes there in self-review (e.g. not renumbering replacement markers
correctly when I added {0} to the beginnings of strings), and my confidence
that I caught them all is only middling.

A few lines (MSG_USELESS_SETTIMEOUT, MSG_TYPEDARRAY_IS_DETACHED,
MSG_NOT_SUBMIT_BUTTON) were removed from Errors.msg either because they were
already unused or because they either were single-user constant strings or
became such in the new setup and we could just use the string version of
ThrowTypeError.

Differential Revision: https://phabricator.services.mozilla.com/D61523

--HG--
extra : moz-landing-system : lando
2020-02-06 21:22:32 +00:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

Differential Revision: https://phabricator.services.mozilla.com/D60327

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

Differential Revision: https://phabricator.services.mozilla.com/D60323

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Boris Zbarsky fb61b9fd86 Bug 1609861 part 5. Stop using NS_ERROR_DOM_TYPE_ERR in IsTypeSupported. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D60223

--HG--
extra : moz-landing-system : lando
2020-01-17 16:19:12 +00:00
Sylvestre Ledru 8d2f0d1b1f Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D54686

--HG--
extra : moz-landing-system : lando
2019-11-26 14:35:02 +00:00
Alex Chronopoulos 9d8f974b73 Bug 1594181 - Reset external variable properly on destruction. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D52639

--HG--
extra : moz-landing-system : lando
2019-11-18 10:42:40 +00:00
Alex Chronopoulos dbabae6629 Bug 1596064 - Remove any access on the database when pref is off. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D52984

--HG--
extra : moz-landing-system : lando
2019-11-15 10:59:50 +00:00
Boris Zbarsky b544880d43 Bug 1581278 part 4. Stop incorrectly rejecting promises in MediaCapabilities. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D46385

--HG--
extra : moz-landing-system : lando
2019-09-19 02:03:07 +00:00
Alex Chronopoulos 966ab066dc Bug 1580112 - Stop updating the database when the value has not changed. r=alwu
In most of the cases, the value to be stored is the same as the existing value, which does not require an update to the database. Setting something in the database requires disk access. By using this we avoid accessing the disk in the majority of the cases.

Differential Revision: https://phabricator.services.mozilla.com/D45504

--HG--
extra : moz-landing-system : lando
2019-09-11 20:21:51 +00:00
Alex Chronopoulos e8c7250170 Bug 1571821 - Use total frames instead of parsed frames to calculate benchmark. r=alwu
The problem reproduces when the system is loaded and the decoder is dropping most of the frames. When there are two benchmark calculations close to each other, the measured parsed frames of the first calculation can be buffered in the decoder and reported as dropped frames on the second calculation. Then on the second calculation, the number of dropped frames can be greater than the parsed frame which will hit the assert. The number of total frames is a better measure since it counts the frames that appeared in the in VideoSink plus the total dropped frames.

Differential Revision: https://phabricator.services.mozilla.com/D44478

--HG--
extra : moz-landing-system : lando
2019-09-09 20:08:59 +00:00
Alex Chronopoulos 55d8678fc1 Bug 1573184 - Add unit test to DecoderBenchmark. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D41581

--HG--
extra : moz-landing-system : lando
2019-08-14 10:41:25 +00:00
Alex Chronopoulos dca6336ea7 Bug 1573184 - Add gtests to BenchmarkStorage classes. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D41580

--HG--
extra : moz-landing-system : lando
2019-08-14 10:41:18 +00:00
Cosmin Sabou 60accf3a0d Backed out 4 changesets (bug 1573184) for causing build bustages on TestOpusParser.cpp.
Backed out changeset dd058b64c376 (bug 1573184)
Backed out changeset a56fabd724f6 (bug 1573184)
Backed out changeset ffd7b6d1c83e (bug 1573184)
Backed out changeset 7b2f517fe428 (bug 1573184)
2019-08-13 20:42:37 +03:00
Alex Chronopoulos 30ba1491fb Bug 1573184 - Add unit test to DecoderBenchmark. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D41581

--HG--
extra : moz-landing-system : lando
2019-08-13 10:09:04 +00:00
Alex Chronopoulos 590d647d81 Bug 1573184 - Add gtests to BenchmarkStorage classes. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D41580

--HG--
extra : moz-landing-system : lando
2019-08-13 05:14:22 +00:00
Alex Chronopoulos 060c64a502 Bug 1572043 - Check the version of the stored benchmarks when a video decoder is initialized.r=jya
Introduce a static method to call the CheckVersion method of the IPDL protocol from the content process. Every time a video decoder is initialized, the method is called to verify the version of the stored benchmark entries.

Differential Revision: https://phabricator.services.mozilla.com/D41003

--HG--
extra : moz-landing-system : lando
2019-08-13 09:54:27 +00:00
Alex Chronopoulos 04185356f6 Bug 1572043 - Introduce a check version method in the benchmark storage IPDL protocol.r=jya
The new protocol method transfers the database name and the version number from the content to the parent process. Then the parent process retrieves the stored version number from the database and compares it to the provided version number. If they are the same it stops there, otherwise it erases all the entries from the database and stores the new version number.

Differential Revision: https://phabricator.services.mozilla.com/D41002

--HG--
extra : moz-landing-system : lando
2019-08-13 09:29:19 +00:00
Alex Chronopoulos ef37f88221 Bug 1572043 - Introduce a method to clear all the entries of a database.r=jya
Add a new method in the key-value wrapper (KeyValueStorage) to clear all the entries of a database.

Differential Revision: https://phabricator.services.mozilla.com/D41001

--HG--
extra : moz-landing-system : lando
2019-08-13 05:05:40 +00:00
Sylvestre Ledru 645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D41559

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Alex Chronopoulos dae984b098 Bug 1530996 - Use the new storage mechanism to save the current playback benchmark. r=jya
Create an event in MediaFormatReader the will signal to the HTMLMediaElement to initiate a new storing according to the latest VideoInfo. Also when the application is shutting down, trigger a new storing early enough, before all the events are disconnected.

Differential Revision: https://phabricator.services.mozilla.com/D38316

--HG--
extra : moz-landing-system : lando
2019-08-06 09:25:45 +00:00
Alex Chronopoulos db7dd624ec Bug 1530996 - Use the benchmark class from MediaCapabilities. r=jya
Make use of the new DecoderBenchmark class in MediaCapabilities instead of the old Benchmark mechanism.

Differential Revision: https://phabricator.services.mozilla.com/D38315

--HG--
extra : moz-landing-system : lando
2019-08-06 09:24:40 +00:00
Alex Chronopoulos d95b52b77f Bug 1530996 - Store the benchmark calculated from the frame statistics. r=jya
Create a class that gets the video properties and the frame statistics, calculates the score in percentage for that video playback, creates a key string according to video properties and trigger the storage of the score.

The video properties used are the resolution, the frame rate and the bitdepth.

For the key, a range of levels has been created for each property and the video is categorised on the closest levels. The key consists of the various levels like: "ResolutionLevel5-FrameRateLevel1-8bit".

Finaly, it uses the IPDL protocol to store the pair of the score and the key.

Differential Revision: https://phabricator.services.mozilla.com/D38314

--HG--
extra : moz-landing-system : lando
2019-08-06 09:24:36 +00:00
Alex Chronopoulos a930f0bdd1 Bug 1530996 - Create the IPC protocol to access the database from the content process. r=jya
The database is accessible from the parent process due to to the sandbox thus it is required an IPDL protocol that will transfer the queries and the results

Differential Revision: https://phabricator.services.mozilla.com/D38313

--HG--
extra : moz-landing-system : lando
2019-08-06 09:24:34 +00:00
Alex Chronopoulos 9533dca8e9 Bug 1530996 - Create a wrapper around kvstore module. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D38312

--HG--
extra : moz-landing-system : lando
2019-08-06 09:23:28 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Nicholas Nethercote d839ef58db Bug 1562331 - Make media.* static prefs follow the naming convention. r=KrisWright
This also removes the following prefs, because they're unused:
- media.autoplay.allow-muted pref
- media.autoplay.blackList-override-default

Differential Revision: https://phabricator.services.mozilla.com/D36396

--HG--
extra : rebase_source : 0570540496302b3efedadf4d5115ee5422d5c279
2019-06-28 14:09:05 +10:00
Jean-Yves Avenard 2060818e84 Bug 1533252 - P4. Serialize all the video MediaCapabilities queries. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D23653

--HG--
extra : moz-landing-system : lando
2019-03-15 13:54:19 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru 804b8b8883 Bug 1204606 - Reformat of dom/media r=jya
# skip-blame

Differential Revision: https://phabricator.services.mozilla.com/D12251

--HG--
extra : moz-landing-system : lando
2018-11-19 13:25:37 +00:00
Jean-Yves Avenard 31ed9de297 Bug 1504643 - Enforce template-parameter classes restrictions in MozPromise. r=gerald
Make thorough use of move semantic for MozPromise using nsTArray

Differential Revision: https://phabricator.services.mozilla.com/D11346

--HG--
extra : moz-landing-system : lando
2018-11-09 15:45:31 +00:00
Dorel Luca c34d2cd0fa Backed out changeset 157be32d85fe (bug 1504643) for conflicts while backing out bug 1471535 2018-11-09 12:13:54 +02:00
Jean-Yves Avenard c30e8ca9f0 Bug 1504643 - Enforce template-parameter classes restrictions in MozPromise. r=gerald
Make thorough use of move semantic for MozPromise using nsTArray

Differential Revision: https://phabricator.services.mozilla.com/D11346

--HG--
extra : moz-landing-system : lando
2018-11-09 08:41:45 +00:00
Boris Zbarsky 64298b1913 Bug 1493798. Update the MediaCapabilities dictionaries to follow the spec more closely. r=jya
This partially backs out bug 1471165 now that we don't enforce a default value
for dictionary-typed members of dictionaries.

Differential Revision: https://phabricator.services.mozilla.com/D6876

--HG--
rename : testing/web-platform/meta/media-capabilities/decodingInfo.html.ini => testing/web-platform/meta/media-capabilities/encodingInfo.html.ini
rename : testing/web-platform/tests/media-capabilities/decodingInfo.html => testing/web-platform/tests/media-capabilities/encodingInfo.html
extra : moz-landing-system : lando
2018-09-26 19:19:47 +00:00
Jean-Yves Avenard c964f8fa02 Bug 1484242 - P3. Have MediaCapablities use GlobalAllocPolicy for creating decoders. r=bryce
This ensures on platform that requires it, that only a single decoder at a time are used, in effect serialising all the MediaCapabilities.decodingInfo requests.

Differential Revision: https://phabricator.services.mozilla.com/D3679
2018-08-21 15:20:54 +02:00
Jean-Yves Avenard c8fdce3c1e Bug 1482197 - P1. Fix variable name in MediaCapabilities. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D3054
2018-08-10 19:02:03 +02:00
Jean-Yves Avenard a33b077ff8 Bug 1474943 - Enable VP9 benchmark logic when using a non intel GPU on mac. r=mattwoodrow
In bug 1404042, we determined that video playback of software based surface was very slow and power hungry when using the intel GPU, but was working okay when using the dGPU (either AMD or nVidia)

So always return false in IsVP9DecodeFast when the current GPU is an Intel, as well as return a benchmark score of 0

Force a new run of the benchmarking by bumping the version number.

Differential Revision: https://phabricator.services.mozilla.com/D2075

--HG--
extra : moz-landing-system : lando
2018-07-12 08:52:55 +00:00
Coroiu Cristina 25882d4b33 Backed out changeset 73baf9b38fb8 (bug 1474943) for build bustage at builds/worker/workspace/build/src/dom/media/Benchmark.cpp on a CLOSED TREE 2018-07-12 11:28:41 +03:00
Jean-Yves Avenard 5e29e3ed59 Bug 1474943 - Enable VP9 benchmark logic when using a non intel GPU on mac. r=mattwoodrow
In bug 1404042, we determined that video playback of software based surface was very slow and power hungry when using the intel GPU, but was working okay when using the dGPU (either AMD or nVidia)

So always return false in IsVP9DecodeFast when the current GPU is an Intel, as well as return a benchmark score of 0

Force a new run of the benchmarking by bumping the version number.

Differential Revision: https://phabricator.services.mozilla.com/D2075

--HG--
extra : moz-landing-system : lando
2018-07-12 01:03:09 +00: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 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 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 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 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 24fc82476b Bug 1409664 - P4. Provide basic MediaCapabilities support. r=bryce
Summary:
The information returned is identical to
1- canPlayType() for file
2- MediaSource.isTypeSupported for media-source
3- MediaRecorder.isTypeRecorder() for recordings.

Depends on D1616

Tags: #secure-revision

Bug #: 1409664

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