Commit Graph

74 Commits

Author SHA1 Message Date
Peter Van der Beken
af82496fc7 Bug 1639310 - Remove unnecessary implicitJSContext annotations. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D76020
2020-05-19 20:48:21 +00:00
Boris Zbarsky
f31fe5e910 Bug 1619112 part 3. Pass UTF8 strings to MaybeRejectWithType/RangeError promise methods. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D65539

--HG--
extra : moz-landing-system : lando
2020-03-06 21:05:48 +00:00
Boris Zbarsky
9b0b56bfc7 Bug 1612213 part 3. Switch Promise::RejectWithDOMException consumers to new convenience methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61269

--HG--
extra : moz-landing-system : lando
2020-02-03 20:37: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
0cbc6daf1f Bug 1589285 part 3. Use the new GetString methods for Web IDL enums in various places. r=edgar
The idea is to stop directly accessing EnumTypeValues::strings in type-unsafe
ways from consumer code.

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

--HG--
extra : moz-landing-system : lando
2019-10-17 23:40:57 +00:00
Boris Zbarsky
013f0714ce Bug 1581278 part 5. Stop incorrectly rejecting promises in EME. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D46387

--HG--
extra : moz-landing-system : lando
2019-09-20 14:20:48 +00:00
Bryce Van Dyk
1a6e4112f0 Bug 1522547 - Log in MediaKeySession dtor. r=cpearce
Differential Revision: https://phabricator.services.mozilla.com/D21982

--HG--
extra : moz-landing-system : lando
2019-03-05 16:21:30 +00: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
Andrew McCreight
837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Boris Zbarsky
1914ffc8ec Bug 1450167. Stop using atom-or-string for event names in the listener manager. r=smaug
Now that we support atoms off the the main thread, we can just use atoms.
2018-07-24 18:15:19 -04:00
Jeff Gilbert
5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez
c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Chris Pearce
da0df79d86 Bug 1426291 - Use DataMutex<T> to synchronize CDMCaps. r=jwwang
MozReview-Commit-ID: NLnoItNZKP

--HG--
extra : rebase_source : 39dd374343989350897aa3ab22b46fb554be17a9
2017-12-20 16:16:50 +13:00
Chris Peterson
45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Andrew McCreight
78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Masatoshi Kimura
9865b2fdeb Bug 1369020 - Remove nsContentUtils::ConvertStringFromEncoding and nsContentUtils::CheckForBOM. r=hsivonen
MozReview-Commit-ID: E0w8BsP1Rof

--HG--
extra : rebase_source : db95e1e7fc60c9b9c8e6d7fcc5329421ec97e811
2017-06-16 21:11:03 +09:00
Chris Pearce
caac622c6d Bug 1315850 - Implement CDM persistent sessions. r=gerald
This is required for the browser clearing persistence tests to pass.

MozReview-Commit-ID: Ai9qc6Ds1IG

--HG--
extra : rebase_source : 80c2133e26742410fda983e3c18c35736fc013d0
2017-03-09 19:09:43 +13:00
Chris Pearce
2edfe89f04 Bug 1345680 - Add ToString(MediaKeySessionType) functions. r=jwwang
MozReview-Commit-ID: 68aAdTYqCon

--HG--
extra : rebase_source : a733a46e5dac671c996ab5bf57fa2a27c364b40e
2017-03-09 12:19:58 +13:00
Tom Tromey
5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Jay Harris
e247a308ba Bug 1335555 - Removes a call to telemetry that is no longer needed r=cpearce
MozReview-Commit-ID: Fmi29mNFBL4

--HG--
extra : rebase_source : 257dc20cdac0d4c6b54ca934e03fcdc07d1b2898
2017-02-01 14:15:15 +13:00
Jay Harris
076ff58095 Bug 1335555 - Begins removing MediaKeySession.keySystem r=cpearce,smaug
MozReview-Commit-ID: fCrVx8Xd90

--HG--
extra : rebase_source : 69429ca0d6a781f4462bac68145e1341fc31ae6f
2017-02-01 13:36:56 +13:00
Chris Pearce
c4a0c6d738 Bug 1324925 - Backed out changeset 229e1278d976. r=backout
MozReview-Commit-ID: NnHo7YXFls
2017-01-27 12:30:33 +13:00
Chris Pearce
896b86d2fb Bug 1324926 - Log expiration in terms of hours remaining in MediaKeySession.SetExpiration(). r=gerald
MozReview-Commit-ID: 4D3qXmCOZrh

--HG--
extra : rebase_source : 51f06be11bd0b990ba662cb69f1c691ffa6b32c5
2016-12-21 11:49:26 +13:00
Chris Pearce
55e0da876c Bug 1324926 - Convert other EME/GMP byte logging from Base64 to Hex. r=gerald
This is marginly more readable.

MozReview-Commit-ID: DWJNFXxI7Vd

--HG--
extra : rebase_source : cb29271f3942db63da2b815e81977f98ec955968
2016-12-21 10:37:09 +13:00
Wes Kocher
5401734deb Backed out 4 changesets (bug 1324926) for windows build bustage a=backout
Backed out changeset e57acea9a4ab (bug 1324926)
Backed out changeset 3a5fc19f492b (bug 1324926)
Backed out changeset 1694d0248f1a (bug 1324926)
Backed out changeset b0a59896aa01 (bug 1324926)
2016-12-20 16:53:41 -08:00
Chris Pearce
6b9f2d3717 Bug 1324926 - Log expiration in terms of hours remaining in MediaKeySession.SetExpiration(). r=gerald
MozReview-Commit-ID: 4D3qXmCOZrh

--HG--
extra : rebase_source : f8a732162d4d53b51c236daa1008f88a310026d1
2016-12-21 11:49:26 +13:00
Chris Pearce
d71275d786 Bug 1324926 - Convert other EME/GMP byte logging from Base64 to Hex. r=gerald
This is marginly more readable.

MozReview-Commit-ID: DWJNFXxI7Vd

--HG--
extra : rebase_source : bfc694c51a8f1de28a6a11155f0c3e6b723ff153
2016-12-21 10:37:09 +13:00
Chris Pearce
8e41b15452 Bug 1324925 - Convert GMPTimestamp to epoch seconds in GMPDecryptorChild::ExpirationChange(). r=gerald
MozReview-Commit-ID: 8tSl2kIQc1w

--HG--
extra : rebase_source : c10839a0df68716b2370e15645470442b0b69922
2016-12-21 11:52:16 +13:00
Chris Pearce
20b6c3ec6b Bug 1314445 - Don't pass CDM version to MediaKey*. r=gerald
We don't need this, and we don't seem to be using this anyway.

MozReview-Commit-ID: 7NCRO94PN3m

--HG--
extra : rebase_source : de91b099e5e536eb321584990f18025e08c7cc78
2016-11-02 11:56:30 +13:00
Chris Pearce
b691c3f403 Bug 1310879 - Remove EME persistent-license sessions. r=gerald
This removes the ability for ClearKey to instantiate persistent-license
sessions using the EME APIs.

MozReview-Commit-ID: FXj5YORxpas

--HG--
extra : source : b69b2435f1059a5c7b1dd26947ea500b381ec7f0
2016-10-18 15:42:02 +13:00
Chris Pearce
8685a93e46 Bug 1313202 - Update MediaKeySession.close() to match EME spec. r=gerald
MozReview-Commit-ID: JgzOaACDUfc

--HG--
extra : rebase_source : 35ce6986bdc7e486b757df53fc59a63fb97014c3
2016-10-27 11:37:27 +13:00
Chris Pearce
ea73ebebc8 Bug 1311848 - Don't call ConnectPendingPromiseIdWithToken in MediaKeySession::Load. r=kikuo
We don't need to call MediaKeys::ConnectPendingPromiseIdWithToken() on the
MediaKeySession::Load() path, we already know the session Id, and we've already
removed the session from the list of pending sessions in Load().

MozReview-Commit-ID: KBiEsY95Csi

--HG--
extra : rebase_source : aadc3204409df35e4bbcb9532c530f860681afd1
2016-10-21 10:52:26 +13:00
Chris Pearce
22b1ca7b53 Bug 1311864 - Reject MediaKeySession::Load() for non temporary session types. r=kikuo
We are required to do this by the draft EME spec.

MozReview-Commit-ID: FnIEFgVId1z

--HG--
extra : rebase_source : 23042d3acda6cfcb379db457224d648dc955f688
2016-10-21 11:43:05 +13:00
Kilik Kuo
ede59e2ecf Bug 1310936- Provide a map to get pending MediaKeySession by promise Id correctly. r=cpearce
MozReview-Commit-ID: 34BL4GYoC1A

--HG--
extra : rebase_source : 4dffdf8da32412a6812716de9edbf685235ce442
2016-10-20 15:28:09 +08:00
Kilik Kuo
4eecda6d84 Bug 1310958 - Reject promise with correct error in MediaKeySession::Load. r=cpearce
MozReview-Commit-ID: JuWGZCMfW6x

--HG--
extra : rebase_source : 59a9957cd3d37c0ef81cd6bc09f7b6eda3afac7b
2016-10-18 17:31:51 +08:00
Chris Pearce
ef74aeb8a8 Bug 1308076 - Use PsshParser to validate CENC init data. r=jwwang
Now that we can link gmp-clearkey's PSSH parser into Gecko, we can
simply use that inside MediaKeySession to validate that the CENC
init data matches the spec.

This change enforces that CENC init data uses the common system Id.
As far as I can tell, Widevine only uses that now.

MozReview-Commit-ID: HrlKQHcv5DI

--HG--
extra : source : f61138f1030e87026eb432e83d36e46c81e55b33
2016-10-06 23:17:44 +13:00
Chris Pearce
a52e1adba5 Bug 1308076 - Validate keyids json format. r=smaug
Use a WebIDL dict to define the "keyids" EME init data format, and
then use that to parse and validate incomint "keyids" EME init data
and ensure it's in the expected JSON format, i.e.:

https://w3c.github.io/encrypted-media/format-registry/initdata/keyids.html

This means we now pass the "generateRequest() with too short key ID."
case of encrypted-media-generate-request-disallowed-input.html
(upstream that is, our local copy of that WPT is out of sync).


MozReview-Commit-ID: 6W7j2a9Bg7E

--HG--
extra : source : fed2a26df89a5c2a600a6e6d1ab63ab86706fc45
2016-10-06 17:57:08 +13:00
Chris Pearce
1678efebbf Bug 1308076 - Basic validation of EME initData. r=jwwang
Implement more of MediaKeySession.generateRequest() to validate initData before
passing to CDM.

Also throw TypeErrors when initData is not valid, as per the spec.

Only trivial validation happens here, I'll add more comprehensive validation in
subsequent patches.

MozReview-Commit-ID: 3jTOsJNvRDo

--HG--
extra : source : d023aec75d1ef1486116510efcc31e2b587e6e50
2016-10-06 17:54:36 +13:00
Chris Pearce
f40bbc42f7 Bug 1305552 - Add telemetry to track uses of MediaKeySession.generateRequest. r=francois,gerald
This allows us to track how often EME CDMs are used, rather than just created.
The telemetry I added in bug 1304207 is reports whenever a CDM is created, but
some sites, such as the Shaka Player demo site, create CDMs without using them,
so that telemetry isn't a great measure in helping us detect when CDMs aren't
being used. Whereas the telemetry added here will report when the CDMs are used
to negotiate a license, i.e. when the CDMs are actually being used.


MozReview-Commit-ID: ExMIcIIBvS1
2016-09-27 15:01:06 +13:00
Chris Pearce
39789bfc59 Bug 1304250 - Implement MediaKeySession.onmessage. r=smaug
MozReview-Commit-ID: FDpvsoFwy6C

--HG--
extra : rebase_source : d569107d6c473d24800e2e4c97d6408ac81eb09b
2016-09-21 14:56:20 +12:00
Chris Pearce
a509ea65bc Bug 1304249 - Implement MediaKeySession.onkeystatuseschange. r=smaug
MozReview-Commit-ID: 1LnDi1MmXi2

--HG--
extra : rebase_source : e12a4085ad2462f1157ab4ea0552a239cd7499dc
2016-09-21 14:31:15 +12:00
James Cheng
c6899c4863 Bug 1290830 - [Part2] Remove the GMP types using genral types instead. r=cpearce
MozReview-Commit-ID: 3EKwTNPddI1

--HG--
extra : rebase_source : 00f7267a76ad299b52d02b16425bb266ee58985b
2016-08-02 15:05:21 +08:00
Kaku Kuo
a6ed727230 Bug 1292091 - Part 2 - replace MaybeResolve(JS::UndefinedHandleValue) with MaybeResolveWithUndefined(); r=bz
MozReview-Commit-ID: KNbxVcCVqts

--HG--
extra : transplant_source : %1D%18%E5%C9o%F0%29%E7%E0%93%EEcR%C7B%3BeX%B3%87
2016-08-09 17:15:13 +08:00
Chris Pearce
1ea9b742f5 Bug 1278198 - Update EME code to reflect new WebIDL name changes. r=gerald
MozReview-Commit-ID: EssCsJxBBwt

--HG--
extra : rebase_source : 154746eca911e2250f3fa94a6a2d4b2624910e50
2016-07-04 14:14:01 +12:00
Kyle Huey
91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Chris Pearce
0840e7ba6a Bug 1230272 - Remove version suffix from keySystem string reported by MediaKey*.keySystem attribute. r=gerald 2015-12-04 17:35:40 +13:00
Chris Pearce
9654972991 Bug 1230026 - Support 'webm' initDataType format for MP4 ClearKey initData. r=gerald 2015-12-04 07:24:11 +13:00
Chris Pearce
220ccc0478 Bug 1223980 - Add iterable<ArrayBuffer,MediaKeyStatus> to MediaKeyStatusMap. r=bz 2015-11-24 13:13:21 +13:00