Commit Graph

26 Commits

Author SHA1 Message Date
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
Nathan Froyd
f3eed4c3a6 Bug 1499850 - make MediaTimer slightly more efficient; r=pehrsons
Instead of creating a timer and then setting the timer's target, we can
determine the timer's target and pass it in directly when the timer is
created.  This reordering of steps is slightly more efficient, since
SetTarget() is both a virtual call and requires locking, both of which
can be skipped if we know the target at timer creation time.
2018-10-18 07:00:11 -04:00
Daniel Holbert
e4c1cd3677 Bug 1447091: Add #includes to fix non-unified bustage in dom/media. r=gerald
This fixes these two errors:
FileMediaResource.cpp:30:36: error: invalid use of incomplete type ‘class mozilla::AbstractThread’
   mCallback->AbstractMainThread()->Dispatch(

MediaTimer.cpp:50:3: error: ‘Unused’ was not declared in this scope
   Unused << rv;

MozReview-Commit-ID: WkPZc22dMF

--HG--
extra : rebase_source : 5704eb8bb36398be7aabaded9284b4f7263ef477
2018-03-19 11:48:38 -07:00
Andreas Pehrson
60544370ea Bug 1299515 - Implement MediaTimer::Cancel to allow for rejecting timer promises. r=jya
MozReview-Commit-ID: ESLlbIS8XHa

--HG--
extra : rebase_source : 2382f6ba2582363c6663ec5b925684ab18b73abe
2017-12-20 10:02:31 +01:00
Andreas Pehrson
568e0a7bf4 Bug 1299515 - Implement MediaTimer::WaitFor for convenience. r=jya
MozReview-Commit-ID: VpHxUKn3hO

--HG--
extra : rebase_source : 2346c317f9819c01056baaa2c8fb50fe8a2bfad0
2017-12-20 10:01:47 +01:00
JW Wang
5648dab805 Bug 1430948. P1 - add fuzzy mode to MediaTimer. r=jya
We will resolve the timer promise even if it is fired slightly before
the scheduled target. This is used by MDSM which doesn't require high-res
timers.

MozReview-Commit-ID: 1IAsG5gG9D7

--HG--
extra : rebase_source : 71c9bec9d196cd736effabb5b9da54c58b44044c
extra : source : 7b96fc15d13d54b78b0aebbf21bb16b08e4eca50
2018-01-16 16:07:21 +08:00
JW Wang
79b5f2dd2e Bug 1425996 - fix build error: unused variable 'rv'. r=gerald
MozReview-Commit-ID: 7MhsSWbxB3z

--HG--
extra : rebase_source : 81207a1e5b663314295f2f95afd4b726ffe8f12d
2017-12-21 12:12:42 +08:00
Kris Maglione
60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07:00
Bill McCloskey
f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Jean-Yves Avenard
10d2da1b08 Bug 1374596: P7. Fix includes as per coding style. r=padenot
MozReview-Commit-ID: 5WfOWcOoxg0

--HG--
extra : rebase_source : 988c09623e83a0d9188d9ff5d705314e2c43e756
2017-06-20 17:56:55 +02: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
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
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
Nicholas Nethercote
f429eae6a5 Bug 1203427 (part 5) - Add logging of timer firings. r=froydnj. 2015-09-10 00:50:51 -07:00
Bobby Holley
c4645a718b Bug 1190496 - Namespace the SharedThreadPool.h include. r=cpearce 2015-08-04 14:00:25 -07:00
Bobby Holley
3c748d3d45 Bug 1177501 - Hold a strong ref to mThread. r=jya 2015-06-27 01:19:03 -07:00
Bobby Holley
987b0f6994 Bug 1160064 - Explicitly initialize logging at the right time. r=jww
The patches in this bug can cause us to log things before some of the Ensure*Log
macros are called. Let's just do this right.
2015-04-30 21:29:42 -07:00
Bobby Holley
e42f8208f6 Bug 1147555 - Implement logging for MediaTimer. r=mattwoodrow 2015-03-30 20:06:38 -07:00
Bobby Holley
9f31ecca48 Bug 1147555 - Invert the ordering of our priority queue. r=mattwoodrow 2015-03-30 20:06:38 -07:00
Jan-Ivar Bruaroey
d9836cc0ca Bug 1144984 - add missing includes in MediaTimer.cpp. r=bobbyholley 2015-03-18 21:21:15 -04:00
Bobby Holley
11f667af87 Bug 1135424 - Implement MediaTimer. r=mattwoodrow 2015-03-16 14:38:43 -07:00
Phil Ringnalda
345a4eca93 Back out 3 changesets (bug 1135424) on suspicion of causing frequent hangs in test_playback.html on mochitest-e10s
CLOSED TREE

Backed out changeset 584d91ffdf88 (bug 1135424)
Backed out changeset d86806ea63f4 (bug 1135424)
Backed out changeset e52401d30a67 (bug 1135424)
2015-03-12 23:05:11 -07:00
Bobby Holley
de5342cf9d Bug 1135424 - Implement MediaTimer. r=mattwoodrow 2015-03-12 17:52:51 -07:00