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

800 Коммитов

Автор SHA1 Сообщение Дата
Bryce Van Dyk c10bad5275 Bug 1540136 - P5: Handle if ChromiumCDMProxy is shutdown in the middle of init. r=cpearce
- Watch for if a proxy shuts down during init and if so, shutdown the CDM parent
  that is being initialized.
- Make ChromiumCDMParent only store a pointer to a ChromiumCDMProxy when it has
  successfully initialized. This avoid the lopsided relationship where a if a
  ChromiumCDMParent fails to initialize it may keep a pointer to a proxy, but
  the proxy will never have a reference to that CDM parent.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 15:07:49 +00:00
Bryce Van Dyk ee2feb5db5 Bug 1540136 - P4: Remove ChromiumCDMParent mMainThread as it is unused. r=cpearce
Differential Revision: https://phabricator.services.mozilla.com/D26207

--HG--
extra : moz-landing-system : lando
2019-04-09 15:07:19 +00:00
Bryce Van Dyk aed4a4bf6a Bug 1540136 - P3: ChromiumCDMProxy runs CDM init thennable code on the main thread. r=cpearce
This code is calling other code that expects to be on the main thread, and
having this on the main thread (now that the main thread is a serial event
target) makes it easier to reason about this and other main thread code. I.e.
this cannot be running during other main thread code.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 15:06:59 +00:00
Bryce Van Dyk 8fa2904e50 Bug 1540136 - P2: CDMProxy stores main thread as nsISerialEventTarget, rather than nsIEventTarget. r=cpearce
This gives us greater flexibility in using the main thread member to run
promises.

The site where we obtain the main thread returns a serial event target, so we're
not doing much more work here, we're just keeping the serial event target
interface, rather than converting to an event target interface.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 15:06:38 +00:00
Bryce Van Dyk 1def9c5ba7 Bug 1540136 - P1: Log more info in ChromiumCDMProxy dtor and Shutdown. r=cpearce
Also remove unneeded MOZ_COUNT_[CTOR|DTOR] macros. We already get similar
functionality from NS_INLINE_DECL_THREADSAFE_REFCOUNTING.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 15:05:01 +00:00
Khyati Agarwal 296a6514a0 bug 1520711 - EME key system constants are used with UTF-8 functions where ASCII functions would do r=hsivonen,jya
EME key system constants are used with UTF-8 functions where ASCII functions would do

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

--HG--
extra : moz-landing-system : lando
2019-04-09 08:02:24 +00:00
Sylvestre Ledru 03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu 24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru 399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Florian Quèze 12d23f5b8a Bug 1535010 - avoid unnecessary gmp directory creations during startup, r=cpearce.
Differential Revision: https://phabricator.services.mozilla.com/D23320

--HG--
extra : moz-landing-system : lando
2019-03-28 00:06:29 +00:00
Alex Gaynor 177fb00eba Bug 1375863 - fold MOZ_CONTENT_SANDBOX and MOZ_GMP_SANDBOX into MOZ_SANDBOX; r=jld,firefox-build-system-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D22975

--HG--
extra : moz-landing-system : lando
2019-03-18 22:31:59 +00:00
Bryce Van Dyk 8878cd41d3 Bug 1522547 - Log `this` in ChromiumCDMProxy logs, use PRIu32 where appropriate. r=cpearce
Because multiple ChromiumCDMProxy object may exist during a browser lifetime,
logging the value of `this` in their logs is useful for disambiguating log
statements, as well as matching ChromiumCDMProxy objects to pointers held by
other objects.

Update formatter usage in logs to prefer PRIu32 over %u when the underlying type
is uint32_t.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 16:21:24 +00:00
Bryce Van Dyk b1ba8b40cb Bug 1522547 - Differentiate GMPServiceParent and GMPServiceChild __CLASS__ macro. r=cpearce
The macros in these classes are used to output class names in logs.
Differentiating them helps make logs clearer.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 16:21:20 +00:00
Bryce Van Dyk a87066e5da Bug 1522547 - Add logging to GMPContentParent. r=cpearce
Use GMPLog.h in GMPContentPareant. Add logging to most functions. This logging
was added to aid in diagnosing a shutdown crash, but should be generally useful
to have.

Driveby touchup of arg name to ChromiumCDMDestroyed to match header.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 16:19:43 +00:00
Bryce Van Dyk a725d59770 Bug 1532354 - Remove virtual keyword on GMPServiceChild|GMPServiceParent::GetContentParent. r=cpearce
These functions already specify the override keyword. This change also makes
them more consistent with the overloaded versions of the same functions in these
classes.

Depends on D21968

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

--HG--
extra : moz-landing-system : lando
2019-03-05 00:32:07 +00:00
Bryce Van Dyk 6beff6688a Bug 1532354 - Remove unused DeleteGMPServiceParent class. r=cpearce
Bug 1352924 removed the usage of this class, so we can safely remove the dead
code.

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

--HG--
extra : moz-landing-system : lando
2019-03-05 00:31:27 +00:00
Bryce Van Dyk 0bc2120ed3 Bug 1532354 - Remove GMPServiceParent::ProcessPossiblePlugin decl as it is unimplemented. r=cpearce
Differential Revision: https://phabricator.services.mozilla.com/D21967

--HG--
extra : moz-landing-system : lando
2019-03-05 00:30:13 +00:00
Alex Gaynor 38a2064d1e Bug 1441651 - Part 2 - pass Shmem and ByteBuf by rvalref to Send* IPC methods; r=nika,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D19954

--HG--
extra : moz-landing-system : lando
2019-03-04 16:35:30 +00:00
Chris Pearce e0d0556cfa Bug 1528661 - Refactor CDM host file generation. r=bryce
There's a lot of duplication in the code to generate host files, particularly
in the MacOS code. So refactor out the common code into helpers, and make the
code higher level and easier to understand.

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

--HG--
extra : source : b379017fa026dbec2f326073db45083c880bf006
extra : histedit_source : 74805393e69dba5c47c8e5971046ce7b72468fd2
2019-02-18 18:13:58 +13:00
Chris Pearce 2674fe3acc Bug 1528661 - Pass paths to i686 xul and plugin-container binaries to CDM in host verification paths. r=bryce
On Windows on ARM64 we will run the x86 Widevine DLL in an x86
plugin-container.exe with an x86 xul.dll. We therefore should also pass the
paths to these binaries to the CDM in the host files instead of the aarch64
plugin-container.exe. We should still pass the aarch64 xul.dll to the CDM,
as that's in use by the aarch64 firefox.exe.

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

--HG--
extra : source : 4c22ddbf15b579a57d1790c1b4f6290e661da346
extra : histedit_source : 8f1f76f36c3a18681e8aa373e7cd117c41c11815
2019-02-15 21:27:01 +13:00
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Jeff Walden 7b8ce42e6e Bug 1453456 - Remove nsCRT::IsAscii(null-terminated string) in favor of mozilla::IsAsciiNullTerminated. r=froydnj 2019-02-25 12:22:24 -08:00
Masatoshi Kimura e25fbce870 Bug 1528651 - Re-enable warnings-as-errors on Windows in some directories. r=dmajor
--HG--
extra : source : ba86ea25070b37f4725834e1c2d9ec4c0783e119
2019-02-17 15:03:02 +09:00
Alex Gaynor 0f01791ffc Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Recv/Answer methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:43 +00:00
Alex Gaynor 984f0333ea Bug 1512990 - Part 3 - remove declarations of Alloc/Dealloc methods from IPDL protocol base class; r=froydnj
For cases where the class has direct calls (that is, we cast `this` to the
subclass before making the call) no longer declare Alloc/Dealloc methods on the
base class at all. This should ensure that slots for them are not generated in
vtables, and also allow the derived class to choose the method signature (e.g.
whether it wants to take something by reference or by value).

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:58:07 +00:00
Alex Gaynor 75c7d1fa76 Bug 1512990 - Part 2 - implement direct calls in the IPDL compiler; r=froydnj
When calling a Recv/Alloc/Dealloc method on most types, cast `this` to the
derived class.

There is a heuristic to figure out what the correct derived type is. There is a
blacklist of types which we can't do direct calls on for the moment, as well as
an override for types that do work with direct calls but which don't match the
heuristic.

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

--HG--
extra : moz-landing-system : lando
2019-02-06 15:57:37 +00:00
Jed Davis bcff2dd108 Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8
In order to enable asynchronous launch, destruction of
GeckoChildProcessHost (and its subclasses) has to be delayed until after
launching (or anything else that might be made asynchronous in the
future) has completed, to prevent use-after-free.  However, there are
other dependencies on process hosts always being destroyed on the I/O
thread, so refcounting would be difficult to use.

Instead, GeckoChildProcessHost now may not be destroyed directly, but
must go through a method that handles the scheduling.

There are also some minor cleanups to the affected headers (removed
duplicate access modifiers, and made PluginProcessParent final).

Depends on D18010

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

--HG--
extra : moz-landing-system : lando
2019-02-05 00:15:20 +00:00
Andrew McCreight f68a0b40f7 Bug 1522951 - Make ChromiumCDMProxy::mCrashHelper into a strong reference. r=jya
Refcounted objects should be put into refptrs when they are created.

This patch also moves the crash helper out of the object early in
Init, to maybe reduce the chance of a leak if it fails early.

This field is only used to pass in a value to the Init() method. It
can't be passed in directly because on Android there are two
implementations of CDMProxy, and MediaDrmCDMProxy doesn't take a crash
helper.

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

--HG--
extra : moz-landing-system : lando
2019-02-01 00:20:19 +00:00
arthur.iakab e91653a3fb Backed out changeset d37ccbbcd36d (bug 1522951) for Android build bustages on MediaDrmCDMProxy.h CLOSED TREE 2019-01-31 22:42:35 +02:00
Andrew McCreight 4ec91b01d2 Bug 1522951 - Get rid of ChromiumCDMProxy::mCrashHelper. r=jya
This field is only used to pass a pointer from the ctor to the Init()
method. Instead, just pass in the crash helper directly.

This avoids some problems with the existing code where the crash
helper is not AddRefed immediately after creation, which could lead to
leaks in some error cases.

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

--HG--
extra : moz-landing-system : lando
2019-01-31 20:14:31 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Bryce Van Dyk fedef4db1b Bug 1516660 - Add pattern encryption params to GMP IPDL and plumb to the CDM. r=cpearce
Note, we only pass the relevant IV across the IPC boundry. I.e. if the crypto
scheme is cenc we do not pass a constant IV (this is only used by cbcs), and
only pass per sample IVs. For cbcs we do the converse. This means in the CDM
child we're only receiving one IV, which should be appropriate for whatever
scheme (this is similar to how Chromium handle IVs being passed to the CDM).

The CDM child side now writes pattern information to samples it's preparing for
CDM.

With these changes we should be passing all the information required to handle
cbcs to the CDM.

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

--HG--
extra : moz-landing-system : lando
2019-01-14 20:24:57 +00:00
Bryce Van Dyk fa9d86fda5 Bug 1487416 - Replace mValid and mMode with mCryptoScheme for track and sample crypto structs. r=jya
Explicitly store the crypto scheme being used on our crypto structs to let us
differentiate between cenc and cbcs data. In doing so remove mMode and replace
mValid with IsEncrypted() for the following reasons:
- Different modes within the existing schemes are not currently utilized by the
  spec: the scheme implies mode. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by the spec --
  possibly if the isProtected flag which we were tracking with mMode, is
  ever changed to be more than a bool in the spec.
- mValid was typically used to check if these structs contained valid crypto
  data or not. With only one scheme this was often shorthand for 'IsEncrypted',
  but with multiple schemes what is considered valid data for one may not be for
  another. Do away with this and just explicitly have an 'IsEncrypted'.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 15:29:45 +00:00
Cosmin Sabou 15939f75f2 Backed out 6 changesets (bug 1487416) for causing Android build bustages on RemoteDataDecoder.cpp. CLOSED TREE
Backed out changeset 05bcc598e9fb (bug 1487416)
Backed out changeset b99936efbbc9 (bug 1487416)
Backed out changeset ee55b284223e (bug 1487416)
Backed out changeset d25449127f8f (bug 1487416)
Backed out changeset f7c201b7f9bc (bug 1487416)
Backed out changeset 233aedc8b42e (bug 1487416)
2019-01-10 23:37:20 +02:00
Bryce Van Dyk 1a3a965df3 Bug 1487416 - Replace mValid and mMode with mCryptoScheme for track and sample crypto structs. r=jya
Explicitly store the crypto scheme being used on our crypto structs to let us
differentiate between cenc and cbcs data. In doing so remove mMode and replace
mValid with IsEncrypted() for the following reasons:
- Different modes within the existing schemes are not currently utilized by the
  spec of implementation. Having a mode and a scheme could lead to confusion
  between the two. We can return mMode if ever needed by the spec.
- mValid was typically used to check if these structs contained valid crypto
  data or not. With only one scheme this was often shorthand for 'IsEncrypted',
  but with multiple schemes what is considered valid data for one may not be for
  another. Do away with this and just explicitly have an 'IsEncrypted'.

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

--HG--
extra : moz-landing-system : lando
2019-01-10 18:37:48 +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
Nico Grunbaum 998bea5c67 Bug 1515527 - log why GMPVideoEncoderParent::Encode fails r=dminor
Adds log statements for all the reasons that GMPVideoEncoderParent::Encode can fail

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

--HG--
extra : moz-landing-system : lando
2018-12-20 19:11:44 +00:00
Jean-Yves Avenard 48517afae6 Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics.

While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback.
As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 19:22:26 +00:00
Jean-Yves Avenard a3f78d31a5 Bug 1510265 - P2. Don't use AllPromiseType in GMPServiceParent. r=gerald
It's not needed, and only makes code harder to follow.

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

--HG--
extra : moz-landing-system : lando
2018-12-06 20:16:15 +00:00
Jean-Yves Avenard 44594dd77a Bug 1510265 - P1. Enforce template-parameter classes restrictions in MozPromise. r=gerald
And some required fixes to make things compile.

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

--HG--
extra : moz-landing-system : lando
2018-12-06 16:26:01 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Gabriele Svelto 566f669d07 Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D12728

--HG--
extra : moz-landing-system : lando
2018-11-26 14:49:44 +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
Jean-Yves Avenard 6f99745b62 Bug 1504531 - P1. Use forward references in MozPromiseHolder. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D10833

--HG--
extra : moz-landing-system : lando
2018-11-05 14:26:23 +00:00
Gabriele Svelto 266ef73c96 Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10251

--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
Bryce Van Dyk f88683aacf Bug 1496501 - Do not mark CDM input as unencrypted even if it has no encrypted bytes. r=cpearce
Bug 1494178 added code to mark samples with 0 encrypted ranges as unencrypted
before they were fed to the CDM. This was to catch issues where we could mark
such unencrypted samples as encrypted. However, the CDM expects certain samples
that are clear to still be marked as encrypted.

Specifically, WebM samples should be marked as encrypted if they are from an
encrypted track and have the signal byte's encryption bit set (a marker for if
the packet is encrypted), even if they have no encrypted ranges.

The WebM demuxer is already doing this. Further inspection and testing of the
mp4 demuxer shows it is behaving in line with Chromium's current mp4 parser,
which we can expect prepares its data sensibly for Widevine.

As the code removed here was added as a safety fallback, but is causing issues,
and as the demuxers already appear to be doing the right thing, the fallback
code can be removed.

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

--HG--
extra : moz-landing-system : lando
2018-10-08 22:34:32 +00:00
Nicholas Nethercote 8478f8d66e Bug 1489047 - Change almost all DOMString occurrences in XPIDL files to AString. r=nika
Because they have almost identical semantics.

--HG--
extra : rebase_source : ea9074bcac2a1d190b88a5d1afc15997593659b7
2018-09-06 18:02:43 +10:00