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

28 Коммитов

Автор SHA1 Сообщение Дата
Cosmin Sabou 28a4757c10 Backed out changeset 13ed73c1c335 (bug 1551615) for causing wpt leaks in Gecko Media Process. 2020-04-02 01:20:13 +03:00
Bryce Seager van Dyk 3b7d4c0469 Bug 1551615 - Make PGMPContent protocol refcounted. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D68904

--HG--
extra : moz-landing-system : lando
2020-03-31 15:37:27 +00:00
Nika Layzell d9b972bae8 Bug 1570369 - Part 8: Use IPDL refcounted for PGMPVideo{Encoder,Decoder}, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D40261

--HG--
extra : moz-landing-system : lando
2019-08-08 16:46:40 +00:00
Nika Layzell c67bb3eb29 Bug 1570369 - Part 4: Use IPDL refcounted for PChromiumCDM, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D40255

--HG--
extra : moz-landing-system : lando
2019-08-08 16:46:31 +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
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
James Cheng bd88dbe2fe Bug 1403804 - P1 - Remove PGMPDecryptor.ipdl and its related code from code base. r=cpearce
MozReview-Commit-ID: 4mxdcvnRl3W

--HG--
extra : rebase_source : 4c047fa94448bdde302f4b325f786f1d1b904388
2017-09-28 11:40:30 +08:00
Bill McCloskey d6affd5261 Bug 1365098 - Convert NS_GetCurrentThread uses in dom/media (r=cpearce)
MozReview-Commit-ID: DUPt6xj49zz
2017-06-12 20:20:08 -07:00
Chris Pearce 0901ad8256 Bug 1315850 - Ask the GMPService for the GMP thread in GMPParent::ChildTerminated. r=gerald
When we shutdown the browser while the GMPService is active we can end up
leaking a GMPParent, GeckoMediaPluginServiceParent, and a Runnable. I tracked
this down to the runnable dispatched to the GMP thread in
GMPParent::ChildTerminated(). The dispatch of this runnable is failing as we
are dispatching the runnable to a reference of the GMP thread which we have
previously acquired, but that thread is now shutdown. So the dispatch fails,
and if you look in nsThread::DispatchInternal() you'll see that we deliberately
leak the runnable if dispatch fails! The runnable leaking means that the
references it holds to the GMPParent and the GMP service parent leak.

The solution in this patch is to not cache a reference to the GMP thread on the
GMPParent; instead we re-request the GMP thread from the GMPService when we
want it. This means that in the case where the browser is shutting down,
GMPParent::GMPThread() will return null, and we'll not leak the runnable. We'll
then follow the (hacky) shutdown path added in bug 1163239.

We also need to change GMPParent::GMPThread() and GMPContentParent::GMPThread()
to return a reference to the GMP thread with a refcount held on it, in order
to ensure we don't race with the GMP service shutting down the GMP thread
while we're trying to dispatch to in on shutdown.

MozReview-Commit-ID: CXv9VZqTRzY

--HG--
extra : rebase_source : e507e48ee633cad8911287fb7296bbb1679a7bcb
2017-03-24 13:38:00 +13:00
Chris Pearce e140103fca Bug 1315850 - Add PChromiumCDM.ipdl for Widevine CDM. r=gerald
The implementations of this protocol will be stubbed out in later patches.

MozReview-Commit-ID: 622CB1BOoR9

--HG--
extra : rebase_source : b796bfb4c0d0d2872787043e3b9fc83a0e6b09ea
2017-02-23 11:51:00 +13:00
Chris Pearce af0e6c4ab5 Bug 1329543 - Remove PGMPAudioDecoder. r=gerald
MozReview-Commit-ID: nwW4s4MtJX

--HG--
extra : rebase_source : 95079ac628f301f8ceb8b5540c7ea95a15deb931
2017-01-14 16:14:32 +08:00
Chris Pearce 4fa2a5c829 Bug 1316215 - Block GMPContentParent close while a GMPService::GetContentParent is being processed. r=gerald
When GMPService::GetContentParent returns a MozPromise, we end up failing in
test_peerConnection_scaleResolution.html with e10s enabled because we Close()
the GMPContentParent twice. The test causes two GMPVideoEncoderParents to
be created. When the number of IPDL actors on the GMPContentParent reach 0,
we close the IPC connection. With GetContentParent() returning a MozPromise,
it's more async, and so we can end up requesting the content parent in order
to create the second GMPVideoEncoderParent, but while we're waiting for
the promise to resolve the previous GMPVideoEncoderParent is destroyed and
the GMPContentParent closes its IPC connection. Then the GetContentParent
promise resolves, and that fails to operate correctly since it's closed its
IPC connection.

My solution here is to add a "blocker" that prevents the GMPContentParent from
being shutdown while we're waiting for the GetContentParent promise to resolve.

MozReview-Commit-ID: HxBkFkmv0tV

--HG--
extra : rebase_source : 59aa7bcfe8b8f44274d136d6147a946542a64fff
extra : source : 59ab10349b58b0fbe13dca9312ec82332f7c3dbe
2016-11-16 10:59:08 +13:00
Chris Pearce 1b21fde486 Bug 1306314 - Pass decryptor ID to GMPVideoDecoder constructor. r=gerald
Retrieve the ID of the GMPDecryptor from the GMPCDMProxy, and pass that
through to the GMPVideoDecoder's constructor.

MozReview-Commit-ID: IuNsSroZ9Zu

--HG--
extra : rebase_source : d678628dec67a059aec06918f07ea93ecc54a5f9
2016-11-14 11:07:02 +13:00
Iris Hsiao 891306a89a Backed out changeset 9343cb73c218 (bug 1306314) 2016-11-14 11:07:28 +08:00
Chris Pearce 5926bef365 Bug 1306314 - Pass decryptor ID to GMPVideoDecoder constructor. r=gerald
Retrieve the ID of the GMPDecryptor from the GMPCDMProxy, and pass that
through to the GMPVideoDecoder's constructor.

MozReview-Commit-ID: IuNsSroZ9Zu

--HG--
extra : rebase_source : 6f1db4a019deaedac07fa15c1958270268dcb941
2016-11-14 11:07:02 +13:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
Jean-Yves Avenard a9394d5946 Bug 1240411: P5. Clean up GMP headers. r=cpearce
Remove redundant virtual keywords
2016-01-19 19:47:32 +11:00
Nicholas Nethercote 524b34adf6 Bug 1237151 (part 1) - Remove ignored qualifiers in dom/media/gmp/. r=cpearce.
--HG--
extra : rebase_source : a4934ff402b3402731d6070d36dd713368d09a1f
2016-01-07 15:43:37 -08:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Chris Pearce 2c28e66665 Bug 1209385 - Backout 417dab86a413 and 6078e8b4878b. r=backout 2015-10-14 19:42:25 +13:00
Chris Pearce a76b46867d Bug 1209385 - Crash GMPs that don't respond to GMPVideoDecoder::Reset(). r=jwwang 2015-09-30 06:56:07 +13:00
Chris Pearce f877417e6a Bug 1168053 - Unified build fix in dom/media/gmp. r=jwwang 2015-05-29 14:07:22 +12:00
Mike Conley 97a46ed1e0 Bug 1146955 - Make the GMP pluginID a uint32_t, and dispatch it in the PluginCrashed event. r=jesup r=mrbkap
--HG--
extra : rebase_source : ef8893d470e437d93a44b393f595518acb411852
extra : source : ad87e781794d5bb5337feb6e2608730075a7f71e
extra : histedit_source : 91cbbdedc9273982d0eb6b3c58269c73e0f46f63
2015-05-04 15:40:29 -04:00
Andrea Marchesini e666f02521 Bug 1156632 - Remove unused forward class declarations - patch 2 - dom/media, dom/indexedDB, dom/svg, r=ehsan 2015-04-22 08:29:17 +02:00
Peter Van der Beken 166fcb5464 Bug 1057908 - GeckoMediaPluginService needs to be proxied from Content processes to parent process. Part 5 - use bridging for GMP in e10s. r=billm.
--HG--
extra : rebase_source : a20ed3386758ceabccb50b68a9b9081c17a95c49
2015-02-10 11:49:03 +01:00
Peter Van der Beken 75ade681f5 Bug 1057908 - GeckoMediaPluginService needs to be proxied from Content processes to parent process. Part 3 - split the GMP IPDL actors in 2 parts (and use opens to open the second in non-e10s). r=billm.
--HG--
extra : rebase_source : 260e61d4a3e688e3ae3fb5c956d3ecce50fd7e0d
2015-02-10 11:48:42 +01:00