Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:
s/mozilla::Forward/std::forward/
s/Forward</std::forward</
The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)
MozReview-Commit-ID: A88qFG5AccP
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
We avoid passing event data to the listener function to save copies
if it doesn't take any arguments at all.
MozReview-Commit-ID: 7Hkzxrluemm
--HG--
extra : rebase_source : 22b894a58e2bc3836d37b7fd6aaa1f09d82eaeee
extra : source : 67a57b8eaebd355f73b0f10fb99afeaf2ccdb89e
Note this breaks the MediaEventSource::CopyEvent2 gtest since there is always
one copy or move when storing the event data in the runnable created by
NewRunnableMethod() even when the listener function takes no arguments at all.
We will fix it later.
MozReview-Commit-ID: J9T63yxXko2
--HG--
extra : rebase_source : f15fa78129e562fb3a65027114095b205791d4c7
extra : source : e734b4d950c415be18e2fbc30e26e617758aa556
This is needed by P2 where |Listener| must be ref-counted so we can use
NewRunnableMethod() to pass event data to the listener function.
MozReview-Commit-ID: CpAgOmxcijc
--HG--
extra : rebase_source : f80a302788f6312a912d710262322b30b2bce4c0
extra : source : 4ce544aacca4897bc3d2bb25fd415df93dc940b4
It turns out that sync notification is a bad idea which is easy
to be misused and could results in unexpected reentrant call flow.
Since it has no users after the mass media code refactoring, it is
good to remove it now to prevent future users.
Backed out changeset fb5b05298007
Backed out changeset 9e1fb308cf51
MozReview-Commit-ID: 9WGvRCbvJhQ
--HG--
extra : rebase_source : 748cae9449636c68f3fffbaed0e08347fe63cd91
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