Bug 1320785 - Remove obsolete 'ns' from 'StorensRefPtrPassByPtr' - r?froydnj
MozReview-Commit-ID: FuhlsLVFdLi
--- a/dom/base/TimeoutManager.cpp
+++ b/dom/base/TimeoutManager.cpp
@@ -600,17 +600,17 @@ TimeoutManager::MaybeApplyBackPressure()
if (queue->Length() < kThrottledEventQueueBackPressure) {
return;
}
// First attempt to dispatch a runnable to update our back pressure state. We
// do this first in order to verify we can dispatch successfully before
// entering the back pressure state.
nsCOMPtr<nsIRunnable> r =
- NewNonOwningRunnableMethod<StorensRefPtrPassByPtr<nsGlobalWindow>>(this,
+ NewNonOwningRunnableMethod<StoreRefPtrPassByPtr<nsGlobalWindow>>(this,
&TimeoutManager::CancelOrUpdateBackPressure, &mWindow);
nsresult rv = queue->Dispatch(r.forget(), NS_DISPATCH_NORMAL);
NS_ENSURE_SUCCESS_VOID(rv);
// Since the callback was scheduled successfully we can now persist the
// backpressure value.
mBackPressureDelayMS = CalculateNewBackPressureDelayMS(queue->Length());
}
@@ -663,17 +663,17 @@ TimeoutManager::CancelOrUpdateBackPressu
// Otherwise, if there is a back pressure delay still in effect we need
// queue a runnable to check if it can be reduced in the future. Note
// that this runnable is dispatched to the ThrottledEventQueue. This
// means we will not check for a new value until the current back log
// has been processed. The next update will only keep back pressure if
// more runnables continue to be dispatched to the queue.
nsCOMPtr<nsIRunnable> r =
- NewNonOwningRunnableMethod<StorensRefPtrPassByPtr<nsGlobalWindow>>(this,
+ NewNonOwningRunnableMethod<StoreRefPtrPassByPtr<nsGlobalWindow>>(this,
&TimeoutManager::CancelOrUpdateBackPressure, &mWindow);
MOZ_ALWAYS_SUCCEEDS(queue->Dispatch(r.forget(), NS_DISPATCH_NORMAL));
}
bool
TimeoutManager::RescheduleTimeout(Timeout* aTimeout, const TimeStamp& now,
bool aRunningPendingTimeouts)
{
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -3163,17 +3163,17 @@ HTMLMediaElement::AddCaptureMediaTrackTo
? MediaSegment::AUDIO
: MediaSegment::VIDEO;
RefPtr<MediaStreamTrack> track =
aOutputStream.mStream->CreateDOMTrack(destinationTrackID, type, source);
if (aAsyncAddtrack) {
NS_DispatchToMainThread(
- NewRunnableMethod<StorensRefPtrPassByPtr<MediaStreamTrack>>(
+ NewRunnableMethod<StoreRefPtrPassByPtr<MediaStreamTrack>>(
aOutputStream.mStream, &DOMMediaStream::AddTrackInternal, track));
} else {
aOutputStream.mStream->AddTrackInternal(track);
}
// Track is muted initially, so we don't leak data if it's added while paused
// and an MSG iteration passes before the mute comes into effect.
processedOutputSource->SetTrackEnabled(destinationTrackID,
--- a/dom/media/platforms/wrappers/FuzzingWrapper.cpp
+++ b/dom/media/platforms/wrappers/FuzzingWrapper.cpp
@@ -120,17 +120,17 @@ DecoderCallbackFuzzingWrapper::SetDontDe
mDontDelayInputExhausted = aDontDelayInputExhausted;
}
void
DecoderCallbackFuzzingWrapper::Output(MediaData* aData)
{
if (!mTaskQueue->IsCurrentThreadIn()) {
nsCOMPtr<nsIRunnable> task =
- NewRunnableMethod<StorensRefPtrPassByPtr<MediaData>>(
+ NewRunnableMethod<StoreRefPtrPassByPtr<MediaData>>(
this, &DecoderCallbackFuzzingWrapper::Output, aData);
mTaskQueue->Dispatch(task.forget());
return;
}
CFW_LOGV("aData.mTime=%lld", aData->mTime);
MOZ_ASSERT(mCallback);
if (mFrameOutputMinimumInterval) {
if (!mPreviousOutput.IsNull()) {
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp
@@ -194,17 +194,17 @@ public:
disabled_frame_sent_ = true;
} else {
disabled_frame_sent_ = false;
}
++mLength; // Atomic
nsCOMPtr<nsIRunnable> runnable =
- NewRunnableMethod<StorensRefPtrPassByPtr<Image>, bool>(
+ NewRunnableMethod<StoreRefPtrPassByPtr<Image>, bool>(
this, &VideoFrameConverter::ProcessVideoFrame,
aChunk.mFrame.GetImage(), forceBlack);
mTaskQueue->Dispatch(runnable.forget());
}
void AddListener(VideoConverterListener* aListener)
{
MutexAutoLock lock(mMutex);
--- a/xpcom/glue/nsThreadUtils.h
+++ b/xpcom/glue/nsThreadUtils.h
@@ -535,27 +535,27 @@ struct StoreConstRefPassByConstLRef
MOZ_IMPLICIT StoreConstRefPassByConstLRef(const A& a) : m(a) {}
passed_type PassAsParameter() { return m; }
};
template<typename S>
struct IsParameterStorageClass<StoreConstRefPassByConstLRef<S>>
: public mozilla::TrueType {};
template<typename T>
-struct StorensRefPtrPassByPtr
+struct StoreRefPtrPassByPtr
{
typedef RefPtr<T> stored_type;
typedef T* passed_type;
stored_type m;
template <typename A>
- MOZ_IMPLICIT StorensRefPtrPassByPtr(A&& a) : m(mozilla::Forward<A>(a)) {}
+ MOZ_IMPLICIT StoreRefPtrPassByPtr(A&& a) : m(mozilla::Forward<A>(a)) {}
passed_type PassAsParameter() { return m.get(); }
};
template<typename S>
-struct IsParameterStorageClass<StorensRefPtrPassByPtr<S>>
+struct IsParameterStorageClass<StoreRefPtrPassByPtr<S>>
: public mozilla::TrueType {};
template<typename T>
struct StorePtrPassByPtr
{
typedef T* stored_type;
typedef T* passed_type;
stored_type m;
@@ -666,34 +666,34 @@ struct NonnsISupportsPointerStorageClass
StoreConstPtrPassByConstPtr<
typename mozilla::RemoveConst<TWithoutPointer>::Type>,
StorePtrPassByPtr<TWithoutPointer>>
{};
template<typename TWithoutPointer>
struct PointerStorageClass
: mozilla::Conditional<HasRefCountMethods<TWithoutPointer>::value,
- StorensRefPtrPassByPtr<TWithoutPointer>,
+ StoreRefPtrPassByPtr<TWithoutPointer>,
typename NonnsISupportsPointerStorageClass<
TWithoutPointer
>::Type>
{};
template<typename TWithoutRef>
struct LValueReferenceStorageClass
: mozilla::Conditional<mozilla::IsConst<TWithoutRef>::value,
StoreConstRefPassByConstLRef<
typename mozilla::RemoveConst<TWithoutRef>::Type>,
StoreRefPassByLRef<TWithoutRef>>
{};
template<typename T>
struct SmartPointerStorageClass
: mozilla::Conditional<mozilla::IsRefcountedSmartPointer<T>::value,
- StorensRefPtrPassByPtr<
+ StoreRefPtrPassByPtr<
typename mozilla::RemoveSmartPointer<T>::Type>,
StoreCopyPassByConstLRef<T>>
{};
template<typename T>
struct NonLValueReferenceStorageClass
: mozilla::Conditional<mozilla::IsRvalueReference<T>::value,
StoreCopyPassByRRef<
@@ -716,25 +716,25 @@ struct NonParameterStorageClass
typename PointerStorageClass<
typename mozilla::RemovePointer<T>::Type
>::Type,
typename NonPointerStorageClass<T>::Type>
{};
// Choose storage&passing strategy based on preferred storage type:
// - If IsParameterStorageClass<T>::value is true, use as-is.
-// - RC* -> StorensRefPtrPassByPtr<RC> : Store RefPtr<RC>, pass RC*
+// - RC* -> StoreRefPtrPassByPtr<RC> : Store RefPtr<RC>, pass RC*
// ^^ RC quacks like a ref-counted type (i.e., has AddRef and Release methods)
// - const T* -> StoreConstPtrPassByConstPtr<T> : Store const T*, pass const T*
// - T* -> StorePtrPassByPtr<T> : Store T*, pass T*.
// - const T& -> StoreConstRefPassByConstLRef<T>: Store const T&, pass const T&.
// - T& -> StoreRefPassByLRef<T> : Store T&, pass T&.
// - T&& -> StoreCopyPassByRRef<T> : Store T, pass Move(T).
// - RefPtr<T>, nsCOMPtr<T>
-// -> StorensRefPtrPassByPtr<T> : Store RefPtr<T>, pass T*
+// -> StoreRefPtrPassByPtr<T> : Store RefPtr<T>, pass T*
// - Other T -> StoreCopyPassByConstLRef<T> : Store T, pass const T&.
// Other available explicit options:
// - StoreCopyPassByValue<T> : Store T, pass T.
// - StoreCopyPassByLRef<T> : Store T, pass T& (of copy!)
// - StoreCopyPassByConstPtr<T> : Store T, pass const T*
// - StoreCopyPassByPtr<T> : Store T, pass T* (of copy!)
// Or create your own class with PassAsParameter() method, optional
// clean-up in destructor, and with associated IsParameterStorageClass<>.
--- a/xpcom/glue/tests/gtest/TestThreadUtils.cpp
+++ b/xpcom/glue/tests/gtest/TestThreadUtils.cpp
@@ -268,18 +268,18 @@ TEST(ThreadUtils, main)
static_assert(IsParameterStorageClass<StoreCopyPassByLRef<int>>::value,
"StoreCopyPassByLRef<int> should be recognized as Storage Class");
static_assert(IsParameterStorageClass<StoreCopyPassByRRef<int>>::value,
"StoreCopyPassByRRef<int> should be recognized as Storage Class");
static_assert(IsParameterStorageClass<StoreRefPassByLRef<int>>::value,
"StoreRefPassByLRef<int> should be recognized as Storage Class");
static_assert(IsParameterStorageClass<StoreConstRefPassByConstLRef<int>>::value,
"StoreConstRefPassByConstLRef<int> should be recognized as Storage Class");
- static_assert(IsParameterStorageClass<StorensRefPtrPassByPtr<int>>::value,
- "StorensRefPtrPassByPtr<int> should be recognized as Storage Class");
+ static_assert(IsParameterStorageClass<StoreRefPtrPassByPtr<int>>::value,
+ "StoreRefPtrPassByPtr<int> should be recognized as Storage Class");
static_assert(IsParameterStorageClass<StorePtrPassByPtr<int>>::value,
"StorePtrPassByPtr<int> should be recognized as Storage Class");
static_assert(IsParameterStorageClass<StoreConstPtrPassByConstPtr<int>>::value,
"StoreConstPtrPassByConstPtr<int> should be recognized as Storage Class");
static_assert(IsParameterStorageClass<StoreCopyPassByConstPtr<int>>::value,
"StoreCopyPassByConstPtr<int> should be recognized as Storage Class");
static_assert(IsParameterStorageClass<StoreCopyPassByPtr<int>>::value,
"StoreCopyPassByPtr<int> should be recognized as Storage Class");
@@ -434,52 +434,52 @@ TEST(ThreadUtils, main)
r1 = NewRunnableMethod<StoreCopyPassByConstPtr<int>>(
rpt, &ThreadUtilsObject::Test1pci, i);
r1->Run();
EXPECT_EQ(count += 2, rpt->mCount);
EXPECT_EQ(i, rpt->mA0);
}
// nsRefPtr to pointer.
- static_assert(mozilla::IsSame< ::detail::ParameterStorage<StorensRefPtrPassByPtr<SpyWithISupports>>::Type,
- StorensRefPtrPassByPtr<SpyWithISupports>>::value,
- "ParameterStorage<StorensRefPtrPassByPtr<SpyWithISupports>>::Type should be StorensRefPtrPassByPtr<SpyWithISupports>");
+ static_assert(mozilla::IsSame< ::detail::ParameterStorage<StoreRefPtrPassByPtr<SpyWithISupports>>::Type,
+ StoreRefPtrPassByPtr<SpyWithISupports>>::value,
+ "ParameterStorage<StoreRefPtrPassByPtr<SpyWithISupports>>::Type should be StoreRefPtrPassByPtr<SpyWithISupports>");
static_assert(mozilla::IsSame< ::detail::ParameterStorage<SpyWithISupports*>::Type,
- StorensRefPtrPassByPtr<SpyWithISupports>>::value,
- "ParameterStorage<SpyWithISupports*>::Type should be StorensRefPtrPassByPtr<SpyWithISupports>");
- static_assert(mozilla::IsSame<StorensRefPtrPassByPtr<SpyWithISupports>::stored_type,
+ StoreRefPtrPassByPtr<SpyWithISupports>>::value,
+ "ParameterStorage<SpyWithISupports*>::Type should be StoreRefPtrPassByPtr<SpyWithISupports>");
+ static_assert(mozilla::IsSame<StoreRefPtrPassByPtr<SpyWithISupports>::stored_type,
RefPtr<SpyWithISupports>>::value,
- "StorensRefPtrPassByPtr<SpyWithISupports>::stored_type should be RefPtr<SpyWithISupports>");
- static_assert(mozilla::IsSame<StorensRefPtrPassByPtr<SpyWithISupports>::passed_type,
+ "StoreRefPtrPassByPtr<SpyWithISupports>::stored_type should be RefPtr<SpyWithISupports>");
+ static_assert(mozilla::IsSame<StoreRefPtrPassByPtr<SpyWithISupports>::passed_type,
SpyWithISupports*>::value,
- "StorensRefPtrPassByPtr<SpyWithISupports>::passed_type should be SpyWithISupports*");
+ "StoreRefPtrPassByPtr<SpyWithISupports>::passed_type should be SpyWithISupports*");
// (more nsRefPtr tests below)
// nsRefPtr for ref-countable classes that do not derive from ISupports.
static_assert(::detail::HasRefCountMethods<ThreadUtilsRefCountedFinal>::value,
"ThreadUtilsRefCountedFinal has AddRef() and Release()");
static_assert(mozilla::IsSame< ::detail::ParameterStorage<ThreadUtilsRefCountedFinal*>::Type,
- StorensRefPtrPassByPtr<ThreadUtilsRefCountedFinal>>::value,
- "ParameterStorage<ThreadUtilsRefCountedFinal*>::Type should be StorensRefPtrPassByPtr<ThreadUtilsRefCountedFinal>");
+ StoreRefPtrPassByPtr<ThreadUtilsRefCountedFinal>>::value,
+ "ParameterStorage<ThreadUtilsRefCountedFinal*>::Type should be StoreRefPtrPassByPtr<ThreadUtilsRefCountedFinal>");
static_assert(::detail::HasRefCountMethods<ThreadUtilsRefCountedBase>::value,
"ThreadUtilsRefCountedBase has AddRef() and Release()");
static_assert(mozilla::IsSame< ::detail::ParameterStorage<ThreadUtilsRefCountedBase*>::Type,
- StorensRefPtrPassByPtr<ThreadUtilsRefCountedBase>>::value,
- "ParameterStorage<ThreadUtilsRefCountedBase*>::Type should be StorensRefPtrPassByPtr<ThreadUtilsRefCountedBase>");
+ StoreRefPtrPassByPtr<ThreadUtilsRefCountedBase>>::value,
+ "ParameterStorage<ThreadUtilsRefCountedBase*>::Type should be StoreRefPtrPassByPtr<ThreadUtilsRefCountedBase>");
static_assert(::detail::HasRefCountMethods<ThreadUtilsRefCountedDerived>::value,
"ThreadUtilsRefCountedDerived has AddRef() and Release()");
static_assert(mozilla::IsSame< ::detail::ParameterStorage<ThreadUtilsRefCountedDerived*>::Type,
- StorensRefPtrPassByPtr<ThreadUtilsRefCountedDerived>>::value,
- "ParameterStorage<ThreadUtilsRefCountedDerived*>::Type should be StorensRefPtrPassByPtr<ThreadUtilsRefCountedDerived>");
+ StoreRefPtrPassByPtr<ThreadUtilsRefCountedDerived>>::value,
+ "ParameterStorage<ThreadUtilsRefCountedDerived*>::Type should be StoreRefPtrPassByPtr<ThreadUtilsRefCountedDerived>");
static_assert(!::detail::HasRefCountMethods<ThreadUtilsNonRefCounted>::value,
"ThreadUtilsNonRefCounted doesn't have AddRef() and Release()");
static_assert(!mozilla::IsSame< ::detail::ParameterStorage<ThreadUtilsNonRefCounted*>::Type,
- StorensRefPtrPassByPtr<ThreadUtilsNonRefCounted>>::value,
- "ParameterStorage<ThreadUtilsNonRefCounted*>::Type should NOT be StorensRefPtrPassByPtr<ThreadUtilsNonRefCounted>");
+ StoreRefPtrPassByPtr<ThreadUtilsNonRefCounted>>::value,
+ "ParameterStorage<ThreadUtilsNonRefCounted*>::Type should NOT be StoreRefPtrPassByPtr<ThreadUtilsNonRefCounted>");
// Lvalue reference.
static_assert(mozilla::IsSame< ::detail::ParameterStorage<int&>::Type,
StoreRefPassByLRef<int>>::value,
"ParameterStorage<int&>::Type should be StoreRefPassByLRef<int>");
static_assert(mozilla::IsSame< ::detail::ParameterStorage<int&>::Type::stored_type,
StoreRefPassByLRef<int>::stored_type>::value,
"ParameterStorage<int&>::Type::stored_type should be StoreRefPassByLRef<int>::stored_type");
@@ -844,18 +844,18 @@ TEST(ThreadUtils, main)
nsCOMPtr<nsIRunnable> r10;
SpyWithISupports* ptr = 0;
{ // Block around RefPtr<Spy> lifetime.
if (gDebug) { printf("%d - RefPtr<SpyWithISupports> s(new SpyWithISupports(45))\n", __LINE__); }
RefPtr<SpyWithISupports> s(new SpyWithISupports(45));
ptr = s.get();
EXPECT_EQ(1, gConstructions);
EXPECT_EQ(1, gAlive);
- if (gDebug) { printf("%d - r10 = NewRunnableMethod<StorensRefPtrPassByPtr<Spy>>(&TestByRRef, s.get())\n", __LINE__); }
- r10 = NewRunnableMethod<StorensRefPtrPassByPtr<SpyWithISupports>>(
+ if (gDebug) { printf("%d - r10 = NewRunnableMethod<StoreRefPtrPassByPtr<Spy>>(&TestByRRef, s.get())\n", __LINE__); }
+ r10 = NewRunnableMethod<StoreRefPtrPassByPtr<SpyWithISupports>>(
rpt, &ThreadUtilsObject::TestByPointer, s.get());
EXPECT_LE(0, gAllConstructions);
EXPECT_EQ(1, gAlive);
Spy::ClearActions();
if (gDebug) { printf("%d - End block with RefPtr<Spy> s\n", __LINE__); }
}
EXPECT_EQ(0, gDestructions);
EXPECT_EQ(1, gAlive);
--- a/xpcom/threads/StateMirroring.h
+++ b/xpcom/threads/StateMirroring.h
@@ -320,32 +320,32 @@ private:
void Connect(AbstractCanonical<T>* aCanonical)
{
MIRROR_LOG("%s [%p] Connecting to %p", mName, this, aCanonical);
MOZ_ASSERT(OwnerThread()->IsCurrentThreadIn());
MOZ_ASSERT(!IsConnected());
MOZ_ASSERT(OwnerThread()->RequiresTailDispatch(aCanonical->OwnerThread()), "Can't get coherency without tail dispatch");
- nsCOMPtr<nsIRunnable> r = NewRunnableMethod<StorensRefPtrPassByPtr<AbstractMirror<T>>>
+ nsCOMPtr<nsIRunnable> r = NewRunnableMethod<StoreRefPtrPassByPtr<AbstractMirror<T>>>
(aCanonical, &AbstractCanonical<T>::AddMirror, this);
aCanonical->OwnerThread()->Dispatch(r.forget(), AbstractThread::DontAssertDispatchSuccess);
mCanonical = aCanonical;
}
public:
void DisconnectIfConnected()
{
MOZ_ASSERT(OwnerThread()->IsCurrentThreadIn());
if (!IsConnected()) {
return;
}
MIRROR_LOG("%s [%p] Disconnecting from %p", mName, this, mCanonical.get());
- nsCOMPtr<nsIRunnable> r = NewRunnableMethod<StorensRefPtrPassByPtr<AbstractMirror<T>>>
+ nsCOMPtr<nsIRunnable> r = NewRunnableMethod<StoreRefPtrPassByPtr<AbstractMirror<T>>>
(mCanonical, &AbstractCanonical<T>::RemoveMirror, this);
mCanonical->OwnerThread()->Dispatch(r.forget(), AbstractThread::DontAssertDispatchSuccess);
mCanonical = nullptr;
}
protected:
~Impl() { MOZ_DIAGNOSTIC_ASSERT(!IsConnected()); }