Commit Graph

231 Commits

Author SHA1 Message Date
Randell Jesup
2122816dfc Bug 1224442: null-check GMP Parent Shmem messages from the Child to handle messages after shutdown r=cpearce 2015-11-13 01:08:01 -05:00
Wes Kocher
f3a9eb2a26 Backed out changeset 1e5f3d1151d6 (bug 1219480) for cpp unittest bustage CLOSED TREE
--HG--
extra : commitid : BMVKq6cPeho
2015-11-11 09:36:56 -08:00
sajitk
3cbe348cdd Bug 1219480 - Replace PRLogModuleInfo with LazyLogModule in the media directory. r=rillian
--HG--
extra : rebase_source : c73098485fa005d914304fb6e7f8eba3c15e66dc
2015-11-11 06:52:00 +01:00
Jean-Yves Avenard
66c9debe46 Bug 1221825: Fix logging arguments. r=cpearce 2015-11-12 01:10:36 +11:00
Bill McCloskey
f8aa3d2562 Bug 1221371 - Switch chromium IPC code to use mozilla::Tuple (r=jld,cpearce,kats) 2015-11-09 10:21:11 -08:00
Gerald Squelart
ccb6be36b4 Bug 1214018 - p4: Use machine_id_mac in GMPLoader - r=cpearce
Having HASH_NODE_ID_WITH_DEVICE_ID #defined is enough for GMPLoader to start
using the Mac version of GetRawMachineId.

Note: The stack (that may contain information gathered during GetRawMachineId)
is not erased, so it could theoretically be possible for a compromised GMP to
find out some sensitive user information. Another bug will deal with this.
2015-10-29 16:27:00 +01:00
Gerald Squelart
c72882e4b1 Bug 1214018 - p3: Modify machine_id_mac for FF build - r=cpearce
Necessary routines were extracted from other files in:
6c3bf03265/
(otherwise a lot of code would have had to be imported, most of which would be
unused anyway.)
These extracted routines were reduced to only the actually-used code.

base::StringPrintf was only used to stringify a few hex values, this particular
use was easier to reimplement in a small loop rather than trying to extract the
whole printf suite.

base::UTF8toUTF16 is not needed, as we just return bytes. So internally a
std::string (containing UTF8) is used and its contents transferred to the
output buffer.
2015-10-29 20:20:00 +01:00
Gerald Squelart
eb62c4044b Bug 1214018 - p2: Import machine_id_mac.cc from Chromium repo - r=cpearce
Retrieved from:
6c3bf03265/rlz/mac/lib/machine_id_mac.cc
2015-10-29 20:19:00 +01:00
Gerald Squelart
b5784fbd39 Bug 1214018 - p1: Using vector to pass machine id - r=cpearce
GetRawMachineId was returning its generated data through a 'string16', which on
Windows was conveniently equivalent to a std::wstring.

However on Mac, wstring uses 32-bit characters, so in order to comply with the
string16 interface, a lot of non-trivial code would have to be imported and
vetted.

Also, in the end GMPLoader::Load passes this string16 to SHA256_Update() as a
sequence of bytes, the actual type of the data is lost!

So to simplify this work, GetRawMachineId will now return its data through a
vector of bytes, and the platform-dependent implementations may use whatever
data type they want internally.

The Windows GetRawMachineId actually returns the same data in this vector, so
it stays compatible with the previous code.
2015-10-29 16:25:00 +01:00
Birunthan Mohanathas
9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Chris Pearce
7d1f46000c Bug 1214967 - Proxy observer service notification across to content process when GMPs are added/removed. r=billm,jwwang 2015-10-29 21:56:12 +13:00
Bob Owen
2233e7518a Bug 1187031: Move back to using USER_LOCKDOWN for the GMP sandbox policy on Windows. r=aklotz
This also removes turning off optimization for the Load function. That was an
attempt to fix the side-by-side loading. It may also have helped with ensuring
that the memsets were not optimized, but that has been fixed by Bug 1208892.
2015-10-21 08:46:57 +01:00
Mike Hommey
3de00b45dd Bug 1216444 - Remove GKMEDIAS_SHARED_LIBRARY. r=mshal
In bug 922912, we folded back gkmedias.dll info xul.dll, so in practice, there
is no default configuration left that exercises GKMEDIAS_SHARED_LIBRARY. And
sure enough, it's been broken for months in many different ways.

The gkmedias intermediate library is however kept for webrtc signaling tests.
2015-10-21 14:47:22 +09: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
Nathan Froyd
583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Phil Ringnalda
915c3cb404 Back out 2 changesets (bug 1214967) for b2g debug mochitest-14 hangs, or perhaps fatal assertions failing to be fatal until a hang, or summat
CLOSED TREE

Backed out changeset 120b53ea0f41 (bug 1214967)
Backed out changeset af6b752acbd0 (bug 1214967)
2015-10-16 20:26:20 -07:00
Chris Pearce
419cfce138 Bug 1214967 - Proxy observer service notification across to content process when GMPs are added/removed. r=billm,jwwang 2015-10-17 10:39:45 +13:00
Nathan Froyd
fe57e31ffe Bug 1212027 - part 7 - modify IPDL codegen to store sub-protocols in a hashtable rather than an array; r=jld,nical,cpearce,billm 2015-10-07 14:30:33 -04:00
Nathan Froyd
835e1550cb Bug 1212027 - part 5 - add LoneManagedOrNull for simplifying a lot of upcoming code; r=jld
A lot of existing code has variations on:

  if (ManagedPFooChild().Length()) {
    ...(ManagedPFooChild()[0])...
  }
  // Do something with nullptr, or some other action.

It's pretty reasonable to repeat this code when the managed protocols
are stored in an array; the code gets much less nice when managed
protocols are stored in a hashtable.  Let's write a small utility
function to handle those details for us.  Then when we change the
underlying storage, we only need to update this function, rather than a
bunch of callsites.

ProtocolUtils.h is included by all the generated IPDL headers, so
LoneManagedOrNull should be available everywhere the above pattern would
be encountered.
2015-10-07 20:15:56 -04:00
Chris Pearce
2c28e66665 Bug 1209385 - Backout 417dab86a413 and 6078e8b4878b. r=backout 2015-10-14 19:42:25 +13:00
Chris Pearce
544e62ef89 Bug 121442 - Add platform to GMP storage base dir. r=gerald 2015-10-14 12:18:06 +13:00
Gerald Squelart
5b977ec21d Bug 1211337 - Added crash report annotations tracking sync shutdown process. r=cpearce 2015-10-05 04:14:00 +02:00
Sotaro Ikeda
739eddd54e Bug 1186813 - Replace nsBaseHashtable::EnumerateRead() calls in dom/media/ with iterators r=cpearce 2015-09-30 06:40:54 -07:00
Chris Pearce
cc458e7e9d Bug 1209385 - Add pref to disable crashing hung GMPs. r=jwwang 2015-09-30 06:56:20 +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
d565fd2492 Bug 1208289 - Log outstanding frames in GMP DrainComplete() and detect dropped ResetComplete. r=jwwang
* * *
Bug 1208289 - Yet another bustage fix. r=bustage
2015-09-29 13:06:14 +13:00
Nigel Babu
4013fbd739 Backed out changeset efcfe0c08c24 (bug 1208289) for B2G build bustage 2015-09-28 12:22:34 +05:30
Chris Pearce
faefcaba27 Bug 1208289 - Log outstanding frames in GMP DrainComplete() and detect dropped ResetComplete. r=jwwang
* * *
Bug 1208289 - Yet another bustage fix. r=bustage
2015-09-28 17:57:10 +13:00
Chris Pearce
e30c6e5fa9 Bug 1208289 - Backout. r=backout 2015-09-28 15:37:18 +13:00
Chris Pearce
8ded475d58 Bug 1208289 - Log outstanding frames in GMP DrainComplete() and detect dropped ResetComplete. r=jwwang 2015-09-28 14:03:21 +13:00
Ehsan Akhgari
ad3a3c6527 Bug 1208892 - Replace the uses of memset to clean up data in GMPLoader::Load with an inline memset; r=cpearce
This is found by Viva64.  Because the data we're memsetting to 0
may not be used after this point, the compiler can eliminate the
memsets.  We need to roll our own inline memset that cannot be
optimized away.
2015-09-27 17:46:04 -04:00
Sotaro Ikeda
34a6dca7cc Bug 1205351 - Replace nsBaseHashtable::Enumerate() calls in dom/media/ with iterators r=cpearce 2015-09-24 18:48:25 -07:00
Nicholas Nethercote
9d68ee2953 Bug 1204277 - Disallow warnings in six more directories. r=glandium.
These are all conditional uses of ALLOW_COMPILER_WARNINGS=True that are no
longer necessary.

--HG--
extra : rebase_source : e654fa940aed18b1d5ef7b2bebb45bbef59cfd84
2015-09-14 21:16:37 -07:00
Bob Owen
607371b8d4 Bug 1197007: Turn off optimization for GMPLoaderImpl::Load. r=cpearce 2015-09-09 07:34:56 +01:00
Edwin Flores
5041fc1133 Bug 1172396 - Fix bustage... again. CLOSED TREE. - r=bustage 2015-09-01 18:40:36 +12:00
Edwin Flores
5a3685e229 Bug 1172396 - Update GMP trial creation pref from chrome process - r=cpearce 2015-09-01 17:31:48 +12:00
Edwin Flores
bd3f1b7fed Bug 1172396 - Make GMP initialisation synchronous - r=cpearce 2015-09-01 17:31:48 +12:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Chris Pearce
2ad25b6368 Bug 1194576 - Add more NSPR logging around GMP*Parent actors. r=gerald 2015-08-14 19:18:19 +12:00
Chris Pearce
c078618d1a Bug 1188235 - Make GMPStorage immune to record name hash collisions. r=gerald 2015-08-11 16:05:19 +12:00
Chris Pearce
8ded1472c3 Bug 1190252 - Remove use of mozilla\/Tokenizer from GMPChild so bug 1190252 can be uplift to 41. r=gerald 2015-08-11 10:27:41 +12:00
Chris Pearce
c32f098f77 Bug 1190252. Backed out changeset d697030f7d59. r=backout 2015-08-10 13:38:03 +12:00
Chris Pearce
751d662f3d Bug 1190252 - Remove use of mozilla\/Tokenizer from GMPChild so bug 1190252 can be uplift to 41. r=gerald 2015-08-10 13:27:04 +12:00
Jean-Yves Avenard
8c8e3b2a70 Bug 1190258: P1. Use getter to access MediaRawData mData and mSize member. r=cpearce 2015-08-06 18:48:44 +10:00
Chris Pearce
6e943ecdb3 Bug 1190252 - Remove use of std::ifstream in GMPChild.cpp. r=edwin 2015-08-04 16:06:50 +12:00
Chris Pearce
65798c933d Bug 1190252 - Remove std::string from GMPChild and friends. r=edwin 2015-08-04 16:06:32 +12:00
Wes Kocher
0dde3fdf2e Backed out 2 changesets (bug 1190252) for windows gtest permafails
Backed out changeset 880fc4c49f7e (bug 1190252)
Backed out changeset ba77cb6046b7 (bug 1190252)
2015-08-03 16:00:53 -07:00
Chris Pearce
6c02d1d89d Bug 1190252 - Remove use of std::ifstream in GMPChild.cpp. r=edwin 2015-08-04 09:07:19 +12:00
Chris Pearce
598bc62ffb Bug 1190252 - Remove std::string from GMPChild and friends. r=edwin 2015-08-04 09:07:02 +12:00
Jacek Caban
403c515868 Bug 1188439 - Fixed GMPLoader.cpp compilation with sandbox disabled. r=cpearce 2015-07-29 12:27:07 +02:00