mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
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
This commit is contained in:
parent
9855a4330e
commit
fffb25b74f
@ -178,7 +178,7 @@ EventTree::Process(const RefPtr<DocAccessible>& aDeathGrip)
|
||||
return;
|
||||
}
|
||||
}
|
||||
mFirst = Move(mFirst->mNext);
|
||||
mFirst = std::move(mFirst->mNext);
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mContainer || mDependentEvents.IsEmpty(),
|
||||
@ -329,9 +329,9 @@ EventTree::FindOrInsert(Accessible* aContainer)
|
||||
node->mFireReorder = false;
|
||||
UniquePtr<EventTree>& nodeOwnerRef = prevNode ? prevNode->mNext : mFirst;
|
||||
UniquePtr<EventTree> newNode(new EventTree(aContainer, mDependentEvents.IsEmpty()));
|
||||
newNode->mFirst = Move(nodeOwnerRef);
|
||||
nodeOwnerRef = Move(newNode);
|
||||
nodeOwnerRef->mNext = Move(node->mNext);
|
||||
newNode->mFirst = std::move(nodeOwnerRef);
|
||||
nodeOwnerRef = std::move(newNode);
|
||||
nodeOwnerRef->mNext = std::move(node->mNext);
|
||||
|
||||
// Check if a next node is contained by the given node too, and move them
|
||||
// under the given node if so.
|
||||
@ -350,10 +350,10 @@ EventTree::FindOrInsert(Accessible* aContainer)
|
||||
MOZ_ASSERT(!insNode->mNext);
|
||||
|
||||
node->mFireReorder = false;
|
||||
insNode->mNext = Move(*nodeRef);
|
||||
insNode->mNext = std::move(*nodeRef);
|
||||
insNode = insNode->mNext.get();
|
||||
|
||||
prevNode->mNext = Move(node->mNext);
|
||||
prevNode->mNext = std::move(node->mNext);
|
||||
node = prevNode;
|
||||
break;
|
||||
}
|
||||
@ -508,7 +508,7 @@ EventTree::Mutated(AccMutationEvent* aEv)
|
||||
AccShowEvent* childShowEv = downcast_accEvent(childEv);
|
||||
if (childShowEv->mPrecedingEvents.Length() > 0) {
|
||||
Controller(mContainer)->StorePrecedingEvents(
|
||||
mozilla::Move(childShowEv->mPrecedingEvents));
|
||||
std::move(childShowEv->mPrecedingEvents));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -540,7 +540,7 @@ EventTree::Mutated(AccMutationEvent* aEv)
|
||||
}
|
||||
}
|
||||
|
||||
*node = Move((*node)->mNext);
|
||||
*node = std::move((*node)->mNext);
|
||||
break;
|
||||
}
|
||||
cntr = cntr->Parent();
|
||||
|
@ -792,7 +792,7 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
|
||||
Accessible* outerDocAcc = mDocument->GetAccessible(ownerContent);
|
||||
if (outerDocAcc && outerDocAcc->AppendChild(childDoc)) {
|
||||
if (mDocument->AppendChildDocument(childDoc)) {
|
||||
newChildDocs.AppendElement(Move(mHangingChildDocuments[idx]));
|
||||
newChildDocs.AppendElement(std::move(mHangingChildDocuments[idx]));
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -864,7 +864,7 @@ NotificationController::WillRefresh(mozilla::TimeStamp aTime)
|
||||
mEventGeneration = 0;
|
||||
|
||||
// Now that we are done with them get rid of the events we fired.
|
||||
RefPtr<AccTreeMutationEvent> mutEvent = Move(mFirstMutationEvent);
|
||||
RefPtr<AccTreeMutationEvent> mutEvent = std::move(mFirstMutationEvent);
|
||||
mLastMutationEvent = nullptr;
|
||||
mFirstMutationEvent = nullptr;
|
||||
while (mutEvent) {
|
||||
|
@ -294,7 +294,7 @@ private:
|
||||
void WithdrawPrecedingEvents(nsTArray<RefPtr<AccHideEvent>>* aEvs)
|
||||
{
|
||||
if (mPrecedingEvents.Length() > 0) {
|
||||
aEvs->AppendElements(mozilla::Move(mPrecedingEvents));
|
||||
aEvs->AppendElements(std::move(mPrecedingEvents));
|
||||
}
|
||||
}
|
||||
void StorePrecedingEvent(AccHideEvent* aEv)
|
||||
|
@ -35,14 +35,14 @@ public:
|
||||
{ AppendTarget(aDocument, aContent); }
|
||||
|
||||
Relation(Relation&& aOther) :
|
||||
mFirstIter(Move(aOther.mFirstIter)), mLastIter(aOther.mLastIter)
|
||||
mFirstIter(std::move(aOther.mFirstIter)), mLastIter(aOther.mLastIter)
|
||||
{
|
||||
aOther.mLastIter = nullptr;
|
||||
}
|
||||
|
||||
Relation& operator = (Relation&& aRH)
|
||||
{
|
||||
mFirstIter = Move(aRH.mFirstIter);
|
||||
mFirstIter = std::move(aRH.mFirstIter);
|
||||
mLastIter = aRH.mLastIter;
|
||||
aRH.mLastIter = nullptr;
|
||||
return *this;
|
||||
|
@ -49,16 +49,16 @@ public:
|
||||
HyperTextAccessible* aEndContainer, int32_t aEndOffset);
|
||||
TextRange() : mStartOffset{0}, mEndOffset{0} {}
|
||||
TextRange(TextRange&& aRange) :
|
||||
mRoot(mozilla::Move(aRange.mRoot)),
|
||||
mStartContainer(mozilla::Move(aRange.mStartContainer)),
|
||||
mEndContainer(mozilla::Move(aRange.mEndContainer)),
|
||||
mRoot(std::move(aRange.mRoot)),
|
||||
mStartContainer(std::move(aRange.mStartContainer)),
|
||||
mEndContainer(std::move(aRange.mEndContainer)),
|
||||
mStartOffset(aRange.mStartOffset), mEndOffset(aRange.mEndOffset) {}
|
||||
|
||||
TextRange& operator= (TextRange&& aRange)
|
||||
{
|
||||
mRoot = mozilla::Move(aRange.mRoot);
|
||||
mStartContainer = mozilla::Move(aRange.mStartContainer);
|
||||
mEndContainer = mozilla::Move(aRange.mEndContainer);
|
||||
mRoot = std::move(aRange.mRoot);
|
||||
mStartContainer = std::move(aRange.mStartContainer);
|
||||
mEndContainer = std::move(aRange.mEndContainer);
|
||||
mStartOffset = aRange.mStartOffset;
|
||||
mEndOffset = aRange.mEndOffset;
|
||||
return *this;
|
||||
|
@ -1807,7 +1807,7 @@ HyperTextAccessible::SelectionRanges(nsTArray<a11y::TextRange>* aRanges) const
|
||||
|
||||
TextRange tr(IsTextField() ? const_cast<HyperTextAccessible*>(this) : mDoc,
|
||||
startContainer, startOffset, endContainer, endOffset);
|
||||
*(aRanges->AppendElement()) = Move(tr);
|
||||
*(aRanges->AppendElement()) = std::move(tr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ DocAccessibleParent::RecvShowEvent(const ShowEventData& aData,
|
||||
nsINode* node = nullptr;
|
||||
RefPtr<xpcAccEvent> event = new xpcAccEvent(type, xpcAcc, doc, node,
|
||||
aFromUser);
|
||||
nsCoreUtils::DispatchAccEvent(Move(event));
|
||||
nsCoreUtils::DispatchAccEvent(std::move(event));
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
@ -196,7 +196,7 @@ DocAccessibleParent::RecvHideEvent(const uint64_t& aRootID,
|
||||
MOZ_ASSERT(CheckDocTree());
|
||||
|
||||
if (event) {
|
||||
nsCoreUtils::DispatchAccEvent(Move(event));
|
||||
nsCoreUtils::DispatchAccEvent(std::move(event));
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
@ -227,7 +227,7 @@ DocAccessibleParent::RecvEvent(const uint64_t& aID, const uint32_t& aEventType)
|
||||
bool fromUser = true; // XXX fix me
|
||||
RefPtr<xpcAccEvent> event = new xpcAccEvent(aEventType, xpcAcc, doc, node,
|
||||
fromUser);
|
||||
nsCoreUtils::DispatchAccEvent(Move(event));
|
||||
nsCoreUtils::DispatchAccEvent(std::move(event));
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
@ -263,7 +263,7 @@ DocAccessibleParent::RecvStateChangeEvent(const uint64_t& aID,
|
||||
RefPtr<xpcAccStateChangeEvent> event =
|
||||
new xpcAccStateChangeEvent(type, xpcAcc, doc, node, fromUser, state, extra,
|
||||
aEnabled);
|
||||
nsCoreUtils::DispatchAccEvent(Move(event));
|
||||
nsCoreUtils::DispatchAccEvent(std::move(event));
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
@ -302,7 +302,7 @@ DocAccessibleParent::RecvCaretMoveEvent(const uint64_t& aID,
|
||||
uint32_t type = nsIAccessibleEvent::EVENT_TEXT_CARET_MOVED;
|
||||
RefPtr<xpcAccCaretMoveEvent> event =
|
||||
new xpcAccCaretMoveEvent(type, xpcAcc, doc, node, fromUser, aOffset);
|
||||
nsCoreUtils::DispatchAccEvent(Move(event));
|
||||
nsCoreUtils::DispatchAccEvent(std::move(event));
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
@ -339,7 +339,7 @@ DocAccessibleParent::RecvTextChangeEvent(const uint64_t& aID,
|
||||
RefPtr<xpcAccTextChangeEvent> event =
|
||||
new xpcAccTextChangeEvent(type, xpcAcc, doc, node, aFromUser, aStart, aLen,
|
||||
aIsInsert, aStr);
|
||||
nsCoreUtils::DispatchAccEvent(Move(event));
|
||||
nsCoreUtils::DispatchAccEvent(std::move(event));
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
@ -383,7 +383,7 @@ DocAccessibleParent::RecvSelectionEvent(const uint64_t& aID,
|
||||
xpcAccessibleDocument* xpcDoc = GetAccService()->GetXPCDocument(this);
|
||||
RefPtr<xpcAccEvent> event = new xpcAccEvent(aType, xpcTarget, xpcDoc,
|
||||
nullptr, false);
|
||||
nsCoreUtils::DispatchAccEvent(Move(event));
|
||||
nsCoreUtils::DispatchAccEvent(std::move(event));
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
@ -631,7 +631,7 @@ DocAccessibleParent::MaybeInitWindowEmulation()
|
||||
IID_IAccessible,
|
||||
getter_AddRefs(hwndAcc)))) {
|
||||
RefPtr<IDispatch> wrapped(mscom::PassthruProxy::Wrap<IDispatch>(WrapNotNull(hwndAcc)));
|
||||
hWndAccHolder.Set(IDispatchHolder::COMPtrType(mscom::ToProxyUniquePtr(Move(wrapped))));
|
||||
hWndAccHolder.Set(IDispatchHolder::COMPtrType(mscom::ToProxyUniquePtr(std::move(wrapped))));
|
||||
}
|
||||
|
||||
Unused << SendEmulatedWindow(reinterpret_cast<uintptr_t>(mEmulatedWindowHandle),
|
||||
@ -671,14 +671,14 @@ DocAccessibleParent::SendParentCOMProxy()
|
||||
|
||||
RefPtr<IDispatch> wrapped(mscom::PassthruProxy::Wrap<IDispatch>(WrapNotNull(nativeAcc)));
|
||||
|
||||
IDispatchHolder::COMPtrType ptr(mscom::ToProxyUniquePtr(Move(wrapped)));
|
||||
IDispatchHolder holder(Move(ptr));
|
||||
IDispatchHolder::COMPtrType ptr(mscom::ToProxyUniquePtr(std::move(wrapped)));
|
||||
IDispatchHolder holder(std::move(ptr));
|
||||
if (!PDocAccessibleParent::SendParentCOMProxy(holder)) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
mParentProxyStream = Move(holder.GetPreservedStream());
|
||||
mParentProxyStream = std::move(holder.GetPreservedStream());
|
||||
#endif // defined(MOZ_CONTENT_SANDBOX)
|
||||
}
|
||||
|
||||
@ -749,7 +749,7 @@ DocAccessibleParent::RecvFocusEvent(const uint64_t& aID,
|
||||
bool fromUser = true; // XXX fix me
|
||||
RefPtr<xpcAccEvent> event = new xpcAccEvent(nsIAccessibleEvent::EVENT_FOCUS,
|
||||
xpcAcc, doc, node, fromUser);
|
||||
nsCoreUtils::DispatchAccEvent(Move(event));
|
||||
nsCoreUtils::DispatchAccEvent(std::move(event));
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ ProxyAccessible::RelationByType(RelationType aType) const
|
||||
if (ProxyAccessible* proxy = mDoc->GetAccessible(targetIDs[i]))
|
||||
targets.AppendElement(proxy);
|
||||
|
||||
return Move(targets);
|
||||
return std::move(targets);
|
||||
}
|
||||
|
||||
void
|
||||
@ -106,7 +106,7 @@ ProxyAccessible::Relations(nsTArray<RelationType>* aTypes,
|
||||
if (targets.IsEmpty())
|
||||
continue;
|
||||
|
||||
aTargetSets->AppendElement(Move(targets));
|
||||
aTargetSets->AppendElement(std::move(targets));
|
||||
aTypes->AppendElement(static_cast<RelationType>(type));
|
||||
}
|
||||
}
|
||||
|
@ -49,14 +49,14 @@ CreateHolderFromAccessible(NotNull<Accessible*> aAccToWrap)
|
||||
}
|
||||
|
||||
ProxyUniquePtr<IAccessible> intercepted;
|
||||
HRESULT hr = MainThreadHandoff::WrapInterface(Move(iaToProxy), payload,
|
||||
HRESULT hr = MainThreadHandoff::WrapInterface(std::move(iaToProxy), payload,
|
||||
(IAccessible**) mscom::getter_AddRefs(intercepted));
|
||||
MOZ_ASSERT(SUCCEEDED(hr));
|
||||
if (FAILED(hr)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return IAccessibleHolder(Move(intercepted));
|
||||
return IAccessibleHolder(std::move(intercepted));
|
||||
}
|
||||
|
||||
IHandlerControlHolder
|
||||
@ -69,7 +69,7 @@ CreateHolderFromHandlerControl(mscom::ProxyUniquePtr<IHandlerControl> aHandlerCo
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return IHandlerControlHolder(Move(aHandlerControl));
|
||||
return IHandlerControlHolder(std::move(aHandlerControl));
|
||||
}
|
||||
|
||||
} // namespace a11y
|
||||
|
@ -108,7 +108,7 @@ DocAccessibleChild::PushDeferredEvent(UniquePtr<DeferredEvent> aEvent)
|
||||
}
|
||||
|
||||
if (topLevelIPCDoc) {
|
||||
topLevelIPCDoc->mDeferredEvents.AppendElement(Move(aEvent));
|
||||
topLevelIPCDoc->mDeferredEvents.AppendElement(std::move(aEvent));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ private:
|
||||
// we move NewTree manually (ugh). We still construct with an empty
|
||||
// NewTree above so that the compiler catches any changes made to the
|
||||
// ShowEventData structure in IPDL.
|
||||
mEventData.NewTree() = Move(aEventData.NewTree());
|
||||
mEventData.NewTree() = std::move(aEventData.NewTree());
|
||||
}
|
||||
|
||||
void Dispatch(DocAccessibleChild* aIPCDoc) override
|
||||
|
@ -43,7 +43,7 @@ HandlerProvider::HandlerProvider(REFIID aIid,
|
||||
: mRefCnt(0)
|
||||
, mMutex("mozilla::a11y::HandlerProvider::mMutex")
|
||||
, mTargetUnkIid(aIid)
|
||||
, mTargetUnk(Move(aTarget))
|
||||
, mTargetUnk(std::move(aTarget))
|
||||
{
|
||||
}
|
||||
|
||||
@ -502,7 +502,7 @@ HandlerProvider::NewInstance(REFIID aIid,
|
||||
mscom::InterceptorTargetPtr<IUnknown> aTarget,
|
||||
NotNull<mscom::IHandlerProvider**> aOutNewPayload)
|
||||
{
|
||||
RefPtr<IHandlerProvider> newPayload(new HandlerProvider(aIid, Move(aTarget)));
|
||||
RefPtr<IHandlerProvider> newPayload(new HandlerProvider(aIid, std::move(aTarget)));
|
||||
newPayload.forget(aOutNewPayload.get());
|
||||
return S_OK;
|
||||
}
|
||||
@ -516,7 +516,7 @@ HandlerProvider::SetHandlerControlOnMainThread(DWORD aPid,
|
||||
auto content = dom::ContentChild::GetSingleton();
|
||||
MOZ_ASSERT(content);
|
||||
|
||||
IHandlerControlHolder holder(CreateHolderFromHandlerControl(Move(aCtrl)));
|
||||
IHandlerControlHolder holder(CreateHolderFromHandlerControl(std::move(aCtrl)));
|
||||
Unused << content->SendA11yHandlerControl(aPid, holder);
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ HandlerProvider::put_HandlerControl(long aPid, IHandlerControl* aCtrl)
|
||||
if (!mscom::InvokeOnMainThread("HandlerProvider::SetHandlerControlOnMainThread",
|
||||
this,
|
||||
&HandlerProvider::SetHandlerControlOnMainThread,
|
||||
static_cast<DWORD>(aPid), Move(ptrProxy))) {
|
||||
static_cast<DWORD>(aPid), std::move(ptrProxy))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@ -576,7 +576,7 @@ HandlerProvider::ToWrappedObject(Interface** aObj)
|
||||
mscom::STAUniquePtr<Interface> inObj(*aObj);
|
||||
RefPtr<HandlerProvider> hprov = new HandlerProvider(__uuidof(Interface),
|
||||
mscom::ToInterceptorTargetPtr(inObj));
|
||||
HRESULT hr = mscom::MainThreadHandoff::WrapInterface(Move(inObj), hprov,
|
||||
HRESULT hr = mscom::MainThreadHandoff::WrapInterface(std::move(inObj), hprov,
|
||||
aObj);
|
||||
if (FAILED(hr)) {
|
||||
*aObj = nullptr;
|
||||
|
@ -62,7 +62,7 @@ PlatformChild::PlatformChild()
|
||||
mozilla::mscom::EnsureMTA([actCtxResourceId, &tmpActCtxMTA]() -> void {
|
||||
tmpActCtxMTA.reset(new mozilla::mscom::ActivationContextRegion(actCtxResourceId));
|
||||
});
|
||||
mActCtxMTA = Move(tmpActCtxMTA);
|
||||
mActCtxMTA = std::move(tmpActCtxMTA);
|
||||
|
||||
mozilla::mscom::InterceptorLog::Init();
|
||||
mozilla::mscom::RegisterArrayData(sPlatformChildArrayData);
|
||||
@ -70,16 +70,16 @@ PlatformChild::PlatformChild()
|
||||
|
||||
UniquePtr<mozilla::mscom::RegisteredProxy> customProxy;
|
||||
mozilla::mscom::EnsureMTA([&customProxy]() -> void {
|
||||
customProxy = Move(mozilla::mscom::RegisterProxy());
|
||||
customProxy = std::move(mozilla::mscom::RegisterProxy());
|
||||
});
|
||||
mCustomProxy = Move(customProxy);
|
||||
mCustomProxy = std::move(customProxy);
|
||||
|
||||
// IA2 needs to be registered in both the main thread's STA as well as the MTA
|
||||
UniquePtr<mozilla::mscom::RegisteredProxy> ia2ProxyMTA;
|
||||
mozilla::mscom::EnsureMTA([&ia2ProxyMTA]() -> void {
|
||||
ia2ProxyMTA = Move(mozilla::mscom::RegisterProxy(L"ia2marshal.dll"));
|
||||
ia2ProxyMTA = std::move(mozilla::mscom::RegisterProxy(L"ia2marshal.dll"));
|
||||
});
|
||||
mIA2ProxyMTA = Move(ia2ProxyMTA);
|
||||
mIA2ProxyMTA = std::move(ia2ProxyMTA);
|
||||
}
|
||||
|
||||
} // namespace a11y
|
||||
|
@ -416,7 +416,7 @@ ProxyAccessible::RelationByType(RelationType aType) const
|
||||
}
|
||||
CoTaskMemFree(targets);
|
||||
|
||||
return Move(proxies);
|
||||
return std::move(proxies);
|
||||
}
|
||||
|
||||
double
|
||||
|
@ -42,7 +42,7 @@ TextChange::TextChange(long aIA2UniqueId, bool aIsInsert,
|
||||
TextChange::TextChange(TextChange&& aOther)
|
||||
: mText()
|
||||
{
|
||||
*this = Move(aOther);
|
||||
*this = std::move(aOther);
|
||||
}
|
||||
|
||||
TextChange::TextChange(const TextChange& aOther)
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
|
||||
ia2AccessibleRelation(RelationType aType,
|
||||
nsTArray<RefPtr<Accessible>>&& aTargets) :
|
||||
mType(aType), mTargets(Move(aTargets)) {}
|
||||
mType(aType), mTargets(std::move(aTargets)) {}
|
||||
|
||||
// IUnknown
|
||||
DECL_IUNKNOWN
|
||||
|
@ -1728,12 +1728,12 @@ AccessibleWrap::SetHandlerControl(DWORD aPid, RefPtr<IHandlerControl> aCtrl)
|
||||
ClearOnShutdown(&sHandlerControllers);
|
||||
}
|
||||
|
||||
HandlerControllerData ctrlData(aPid, Move(aCtrl));
|
||||
HandlerControllerData ctrlData(aPid, std::move(aCtrl));
|
||||
if (sHandlerControllers->Contains(ctrlData)) {
|
||||
return;
|
||||
}
|
||||
|
||||
sHandlerControllers->AppendElement(Move(ctrlData));
|
||||
sHandlerControllers->AppendElement(std::move(ctrlData));
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -273,7 +273,7 @@ protected:
|
||||
{
|
||||
HandlerControllerData(DWORD aPid, RefPtr<IHandlerControl>&& aCtrl)
|
||||
: mPid(aPid)
|
||||
, mCtrl(Move(aCtrl))
|
||||
, mCtrl(std::move(aCtrl))
|
||||
{
|
||||
mIsProxy = mozilla::mscom::IsProxy(mCtrl);
|
||||
}
|
||||
@ -281,7 +281,7 @@ protected:
|
||||
HandlerControllerData(HandlerControllerData&& aOther)
|
||||
: mPid(aOther.mPid)
|
||||
, mIsProxy(aOther.mIsProxy)
|
||||
, mCtrl(Move(aOther.mCtrl))
|
||||
, mCtrl(std::move(aOther.mCtrl))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ xpcAccessibleHyperText::GetSelectionRanges(nsIArray** aRanges)
|
||||
Intl()->SelectionRanges(&ranges);
|
||||
uint32_t len = ranges.Length();
|
||||
for (uint32_t idx = 0; idx < len; idx++)
|
||||
xpcRanges->AppendElement(new xpcAccessibleTextRange(Move(ranges[idx])));
|
||||
xpcRanges->AppendElement(new xpcAccessibleTextRange(std::move(ranges[idx])));
|
||||
|
||||
xpcRanges.forget(aRanges);
|
||||
return NS_OK;
|
||||
@ -562,7 +562,7 @@ xpcAccessibleHyperText::GetVisibleRanges(nsIArray** aRanges)
|
||||
Intl()->VisibleRanges(&ranges);
|
||||
uint32_t len = ranges.Length();
|
||||
for (uint32_t idx = 0; idx < len; idx++)
|
||||
xpcRanges->AppendElement(new xpcAccessibleTextRange(Move(ranges[idx])));
|
||||
xpcRanges->AppendElement(new xpcAccessibleTextRange(std::move(ranges[idx])));
|
||||
|
||||
xpcRanges.forget(aRanges);
|
||||
return NS_OK;
|
||||
|
@ -158,7 +158,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
mAttrList = Move(attrList);
|
||||
mAttrList = std::move(attrList);
|
||||
aSiex.lpAttributeList = mAttrList.get();
|
||||
aSiex.StartupInfo.cb = sizeof(STARTUPINFOEXW);
|
||||
return Some(true);
|
||||
|
@ -281,7 +281,7 @@ ExpandedPrincipal::Read(nsIObjectInputStream* aStream)
|
||||
|
||||
// Play it safe and InsertElementSorted, in case the sort order
|
||||
// changed for some bizarre reason.
|
||||
mPrincipals.InsertElementSorted(Move(principal), c);
|
||||
mPrincipals.InsertElementSorted(std::move(principal), c);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -123,8 +123,8 @@ class nsChromeRegistryChrome : public nsChromeRegistry
|
||||
typedef nsURIHashKey::KeyTypePointer KeyTypePointer;
|
||||
|
||||
explicit OverlayListEntry(KeyTypePointer aKey) : nsURIHashKey(aKey) { }
|
||||
OverlayListEntry(OverlayListEntry&& toMove) : nsURIHashKey(mozilla::Move(toMove)),
|
||||
mArray(mozilla::Move(toMove.mArray)) { }
|
||||
OverlayListEntry(OverlayListEntry&& toMove) : nsURIHashKey(std::move(toMove)),
|
||||
mArray(std::move(toMove.mArray)) { }
|
||||
~OverlayListEntry() { }
|
||||
|
||||
void AddURI(nsIURI* aURI);
|
||||
|
@ -20,7 +20,7 @@ DeserializedEdge& DeserializedEdge::operator=(DeserializedEdge&& rhs)
|
||||
{
|
||||
MOZ_ASSERT(&rhs != this);
|
||||
this->~DeserializedEdge();
|
||||
new(this) DeserializedEdge(Move(rhs));
|
||||
new(this) DeserializedEdge(std::move(rhs));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ class DeserializedEdgeRange : public EdgeRange
|
||||
|
||||
auto& edge = node->edges[i];
|
||||
auto referent = node->getEdgeReferent(edge);
|
||||
currentEdge = mozilla::Move(Edge(edge.name ? NS_strdup(edge.name) : nullptr,
|
||||
currentEdge = std::move(Edge(edge.name ? NS_strdup(edge.name) : nullptr,
|
||||
referent));
|
||||
front_ = ¤tEdge;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ struct DeserializedNode {
|
||||
, coarseType(coarseType)
|
||||
, typeName(typeName)
|
||||
, size(size)
|
||||
, edges(Move(edges))
|
||||
, edges(std::move(edges))
|
||||
, allocationStack(allocationStack)
|
||||
, jsObjectClassName(className)
|
||||
, scriptFilename(filename)
|
||||
@ -100,7 +100,7 @@ struct DeserializedNode {
|
||||
, coarseType(rhs.coarseType)
|
||||
, typeName(rhs.typeName)
|
||||
, size(rhs.size)
|
||||
, edges(Move(rhs.edges))
|
||||
, edges(std::move(rhs.edges))
|
||||
, allocationStack(rhs.allocationStack)
|
||||
, jsObjectClassName(rhs.jsObjectClassName)
|
||||
, scriptFilename(rhs.scriptFilename)
|
||||
@ -111,7 +111,7 @@ struct DeserializedNode {
|
||||
{
|
||||
MOZ_ASSERT(&rhs != this);
|
||||
this->~DeserializedNode();
|
||||
new(this) DeserializedNode(Move(rhs));
|
||||
new(this) DeserializedNode(std::move(rhs));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
explicit DominatorTree(JS::ubi::DominatorTree&& aDominatorTree, HeapSnapshot* aHeapSnapshot,
|
||||
nsISupports* aParent)
|
||||
: mParent(aParent)
|
||||
, mDominatorTree(Move(aDominatorTree))
|
||||
, mDominatorTree(std::move(aDominatorTree))
|
||||
, mHeapSnapshot(aHeapSnapshot)
|
||||
{
|
||||
MOZ_ASSERT(aParent);
|
||||
|
@ -148,7 +148,7 @@ struct GetOrInternStringMatcher
|
||||
auto tempString = reinterpret_cast<const CharT*>(str->data());
|
||||
|
||||
UniqueFreePtr<CharT[]> owned(NS_strndup(tempString, length));
|
||||
if (!owned || !internedStrings.append(Move(owned)))
|
||||
if (!owned || !internedStrings.append(std::move(owned)))
|
||||
return nullptr;
|
||||
|
||||
return internedStrings.back().get();
|
||||
@ -285,7 +285,7 @@ HeapSnapshot::saveNode(const protobuf::Node& node, NodeIdSet& edgeReferents)
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(!nodes.putNew(id, DeserializedNode(id, coarseType, typeName,
|
||||
size, Move(edges),
|
||||
size, std::move(edges),
|
||||
allocationStack,
|
||||
jsObjectClassName,
|
||||
scriptFilename, *this))))
|
||||
@ -568,7 +568,7 @@ HeapSnapshot::ComputeDominatorTree(ErrorResult& rv)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return MakeAndAddRef<DominatorTree>(Move(*maybeTree), this, mParent);
|
||||
return MakeAndAddRef<DominatorTree>(std::move(*maybeTree), this, mParent);
|
||||
}
|
||||
|
||||
void
|
||||
@ -624,7 +624,7 @@ HeapSnapshot::ComputeShortestPaths(JSContext*cx, uint64_t start,
|
||||
{
|
||||
JS::AutoCheckCannotGC nogc(cx);
|
||||
maybeShortestPaths = ShortestPaths::Create(cx, nogc, maxNumPaths, *startNode,
|
||||
Move(targetsSet));
|
||||
std::move(targetsSet));
|
||||
}
|
||||
|
||||
if (NS_WARN_IF(maybeShortestPaths.isNothing())) {
|
||||
@ -1032,7 +1032,7 @@ struct TwoByteString::HashPolicy {
|
||||
}
|
||||
|
||||
static void rekey(TwoByteString& k, TwoByteString&& newKey) {
|
||||
k = Move(newKey);
|
||||
k = std::move(newKey);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1137,7 +1137,7 @@ class MOZ_STACK_CLASS StreamWriter : public CoreDumpWriter
|
||||
string.copyToBuffer(RangedPtr<char16_t>(buf, length), length);
|
||||
|
||||
uint64_t ref = twoByteStringsAlreadySerialized.count();
|
||||
if (!twoByteStringsAlreadySerialized.add(ptr, Move(string), ref))
|
||||
if (!twoByteStringsAlreadySerialized.add(ptr, std::move(string), ref))
|
||||
return false;
|
||||
|
||||
setString(stringData.release());
|
||||
@ -1303,7 +1303,7 @@ public:
|
||||
protobufEdge->set_referent(ubiEdge.referent.identifier());
|
||||
|
||||
if (wantNames && ubiEdge.name) {
|
||||
TwoByteString edgeName(Move(ubiEdge.name));
|
||||
TwoByteString edgeName(std::move(ubiEdge.name));
|
||||
if (NS_WARN_IF(!attachTwoByteString(edgeName,
|
||||
[&] (std::string* name) { protobufEdge->set_allocated_name(name); },
|
||||
[&] (uint64_t ref) { protobufEdge->set_nameref(ref); })))
|
||||
|
@ -23,7 +23,7 @@ struct MockDeserializedNode : public DeserializedNode
|
||||
|
||||
bool addEdge(DeserializedEdge&& edge)
|
||||
{
|
||||
return edges.append(Move(edge));
|
||||
return edges.append(std::move(edge));
|
||||
}
|
||||
|
||||
MOCK_METHOD1(getEdgeReferent, JS::ubi::Node(const DeserializedEdge&));
|
||||
@ -67,7 +67,7 @@ DEF_TEST(DeserializedNodeUbiNodes, {
|
||||
nullptr,
|
||||
10));
|
||||
DeserializedEdge edge1(referent1->id);
|
||||
mocked.addEdge(Move(edge1));
|
||||
mocked.addEdge(std::move(edge1));
|
||||
EXPECT_CALL(mocked, getEdgeReferent(EdgeTo(referent1->id)))
|
||||
.Times(1)
|
||||
.WillOnce(Return(JS::ubi::Node(referent1.get())));
|
||||
@ -76,7 +76,7 @@ DEF_TEST(DeserializedNodeUbiNodes, {
|
||||
nullptr,
|
||||
20));
|
||||
DeserializedEdge edge2(referent2->id);
|
||||
mocked.addEdge(Move(edge2));
|
||||
mocked.addEdge(std::move(edge2));
|
||||
EXPECT_CALL(mocked, getEdgeReferent(EdgeTo(referent2->id)))
|
||||
.Times(1)
|
||||
.WillOnce(Return(JS::ubi::Node(referent2.get())));
|
||||
@ -85,7 +85,7 @@ DEF_TEST(DeserializedNodeUbiNodes, {
|
||||
nullptr,
|
||||
30));
|
||||
DeserializedEdge edge3(referent3->id);
|
||||
mocked.addEdge(Move(edge3));
|
||||
mocked.addEdge(std::move(edge3));
|
||||
EXPECT_CALL(mocked, getEdgeReferent(EdgeTo(referent3->id)))
|
||||
.Times(1)
|
||||
.WillOnce(Return(JS::ubi::Node(referent3.get())));
|
||||
|
@ -192,7 +192,7 @@ void AddEdge(FakeNode& node, FakeNode& referent, const char16_t* edgeName = null
|
||||
}
|
||||
|
||||
JS::ubi::Edge edge(ownedEdgeName, &referent);
|
||||
ASSERT_TRUE(node.edges.append(mozilla::Move(edge)));
|
||||
ASSERT_TRUE(node.edges.append(std::move(edge)));
|
||||
}
|
||||
|
||||
|
||||
|
@ -2865,7 +2865,7 @@ nsDocShell::GetInitialClientInfo() const
|
||||
if (mInitialClientSource) {
|
||||
Maybe<ClientInfo> result;
|
||||
result.emplace(mInitialClientSource->Info());
|
||||
return Move(result);
|
||||
return std::move(result);
|
||||
}
|
||||
|
||||
nsGlobalWindowInner* innerWindow =
|
||||
@ -5011,7 +5011,7 @@ nsDocShell::Reload(uint32_t aReloadFlags)
|
||||
|
||||
// Reload always rewrites result principal URI.
|
||||
Maybe<nsCOMPtr<nsIURI>> emplacedResultPrincipalURI;
|
||||
emplacedResultPrincipalURI.emplace(Move(resultPrincipalURI));
|
||||
emplacedResultPrincipalURI.emplace(std::move(resultPrincipalURI));
|
||||
rv = InternalLoad(currentURI,
|
||||
originalURI,
|
||||
emplacedResultPrincipalURI,
|
||||
@ -11096,7 +11096,7 @@ nsDocShell::DoChannelLoad(nsIChannel* aChannel,
|
||||
// create the reserved ClientSource if necessary.
|
||||
Maybe<ClientInfo> noReservedClient;
|
||||
rv = AddClientChannelHelper(aChannel,
|
||||
Move(noReservedClient),
|
||||
std::move(noReservedClient),
|
||||
GetInitialClientInfo(),
|
||||
win->EventTargetFor(TaskCategory::Other));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@ -12269,7 +12269,7 @@ nsDocShell::LoadHistoryEntry(nsISHEntry* aEntry, uint32_t aLoadType)
|
||||
// the source browsing context that was used when the history entry was
|
||||
// first created. bug 947716 has been created to address this issue.
|
||||
Maybe<nsCOMPtr<nsIURI>> emplacedResultPrincipalURI;
|
||||
emplacedResultPrincipalURI.emplace(Move(resultPrincipalURI));
|
||||
emplacedResultPrincipalURI.emplace(std::move(resultPrincipalURI));
|
||||
rv = InternalLoad(uri,
|
||||
originalURI,
|
||||
emplacedResultPrincipalURI,
|
||||
@ -14067,7 +14067,7 @@ nsDocShell::NotifyJSRunToCompletionStart(const char* aReason,
|
||||
if (mJSRunToCompletionDepth == 0) {
|
||||
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
||||
if (timelines && timelines->HasConsumer(this)) {
|
||||
timelines->AddMarkerForDocShell(this, Move(
|
||||
timelines->AddMarkerForDocShell(this, std::move(
|
||||
mozilla::MakeUnique<JavascriptTimelineMarker>(
|
||||
aReason, aFunctionName, aFilename, aLineNumber, MarkerTracingType::START,
|
||||
aAsyncStack, aAsyncCause)));
|
||||
@ -14155,7 +14155,7 @@ nsDocShell::InFrameSwap()
|
||||
UniquePtr<ClientSource>
|
||||
nsDocShell::TakeInitialClientSource()
|
||||
{
|
||||
return Move(mInitialClientSource);
|
||||
return std::move(mInitialClientSource);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -320,7 +320,7 @@ public:
|
||||
void SetAncestorPrincipals(
|
||||
nsTArray<nsCOMPtr<nsIPrincipal>>&& aAncestorPrincipals)
|
||||
{
|
||||
mAncestorPrincipals = mozilla::Move(aAncestorPrincipals);
|
||||
mAncestorPrincipals = std::move(aAncestorPrincipals);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -342,7 +342,7 @@ public:
|
||||
*/
|
||||
void SetAncestorOuterWindowIDs(nsTArray<uint64_t>&& aAncestorOuterWindowIDs)
|
||||
{
|
||||
mAncestorOuterWindowIDs = mozilla::Move(aAncestorOuterWindowIDs);
|
||||
mAncestorOuterWindowIDs = std::move(aAncestorOuterWindowIDs);
|
||||
}
|
||||
|
||||
const mozilla::OriginAttributes& GetOriginAttributes()
|
||||
|
@ -41,7 +41,7 @@ GetMaybeResultPrincipalURI(nsIDocShellLoadInfo* aLoadInfo, Maybe<nsCOMPtr<nsIURI
|
||||
return;
|
||||
}
|
||||
|
||||
aRPURI.emplace(Move(uri));
|
||||
aRPURI.emplace(std::move(uri));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -32,7 +32,7 @@ AutoRestyleTimelineMarker::AutoRestyleTimelineMarker(
|
||||
}
|
||||
|
||||
mDocShell = aDocShell;
|
||||
timelines->AddMarkerForDocShell(mDocShell, Move(
|
||||
timelines->AddMarkerForDocShell(mDocShell, std::move(
|
||||
MakeUnique<RestyleTimelineMarker>(
|
||||
mIsAnimationOnly,
|
||||
MarkerTracingType::START)));
|
||||
@ -51,7 +51,7 @@ AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker()
|
||||
return;
|
||||
}
|
||||
|
||||
timelines->AddMarkerForDocShell(mDocShell, Move(
|
||||
timelines->AddMarkerForDocShell(mDocShell, std::move(
|
||||
MakeUnique<RestyleTimelineMarker>(
|
||||
mIsAnimationOnly,
|
||||
MarkerTracingType::END)));
|
||||
|
@ -32,7 +32,7 @@ ObservedDocShell::AddMarker(UniquePtr<AbstractTimelineMarker>&& aMarker)
|
||||
// Don't accept any markers generated by the process of popping
|
||||
// markers.
|
||||
if (!mPopping) {
|
||||
mTimelineMarkers.AppendElement(Move(aMarker));
|
||||
mTimelineMarkers.AppendElement(std::move(aMarker));
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ ObservedDocShell::AddOTMTMarker(UniquePtr<AbstractTimelineMarker>&& aMarker)
|
||||
// actually cleared or popped in `ClearMarkers` or `PopMarkers`.
|
||||
MOZ_ASSERT(!NS_IsMainThread());
|
||||
MutexAutoLock lock(GetLock()); // for `mOffTheMainThreadTimelineMarkers`.
|
||||
mOffTheMainThreadTimelineMarkers.AppendElement(Move(aMarker));
|
||||
mOffTheMainThreadTimelineMarkers.AppendElement(std::move(aMarker));
|
||||
}
|
||||
|
||||
void
|
||||
@ -71,7 +71,7 @@ ObservedDocShell::PopMarkers(JSContext* aCx,
|
||||
// First, move all of our markers into a single array. We'll chose
|
||||
// the `mTimelineMarkers` store because that's where we expect most of
|
||||
// our markers to be.
|
||||
mTimelineMarkers.AppendElements(Move(mOffTheMainThreadTimelineMarkers));
|
||||
mTimelineMarkers.AppendElements(std::move(mOffTheMainThreadTimelineMarkers));
|
||||
|
||||
// If we see an unpaired START, we keep it around for the next call
|
||||
// to ObservedDocShell::PopMarkers. We store the kept START objects here.
|
||||
@ -158,7 +158,7 @@ ObservedDocShell::PopMarkers(JSContext* aCx,
|
||||
|
||||
// If we did not see the corresponding END, keep the START.
|
||||
if (!hasSeenEnd) {
|
||||
keptStartMarkers.AppendElement(Move(mTimelineMarkers.ElementAt(i)));
|
||||
keptStartMarkers.AppendElement(std::move(mTimelineMarkers.ElementAt(i)));
|
||||
mTimelineMarkers.RemoveElementAt(i);
|
||||
--i;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (HasConsumer(aDocShell)) {
|
||||
aDocShell->mObserved->AddMarker(Move(MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest)));
|
||||
aDocShell->mObserved->AddMarker(std::move(MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (HasConsumer(aDocShell)) {
|
||||
aDocShell->mObserved->AddMarker(Move(MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest)));
|
||||
aDocShell->mObserved->AddMarker(std::move(MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (HasConsumer(aDocShell)) {
|
||||
aDocShell->mObserved->AddMarker(Move(aMarker));
|
||||
aDocShell->mObserved->AddMarker(std::move(aMarker));
|
||||
}
|
||||
}
|
||||
|
||||
@ -238,7 +238,7 @@ TimelineConsumers::AddMarkerForDocShell(nsIDocShell* aDocShell,
|
||||
UniquePtr<AbstractTimelineMarker>&& aMarker)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
AddMarkerForDocShell(static_cast<nsDocShell*>(aDocShell), Move(aMarker));
|
||||
AddMarkerForDocShell(static_cast<nsDocShell*>(aDocShell), std::move(aMarker));
|
||||
}
|
||||
|
||||
void
|
||||
@ -255,9 +255,9 @@ TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName,
|
||||
UniquePtr<AbstractTimelineMarker> marker =
|
||||
MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest);
|
||||
if (isMainThread) {
|
||||
storage->AddMarker(Move(marker));
|
||||
storage->AddMarker(std::move(marker));
|
||||
} else {
|
||||
storage->AddOTMTMarker(Move(marker));
|
||||
storage->AddOTMTMarker(std::move(marker));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -277,9 +277,9 @@ TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName,
|
||||
UniquePtr<AbstractTimelineMarker> marker =
|
||||
MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest);
|
||||
if (isMainThread) {
|
||||
storage->AddMarker(Move(marker));
|
||||
storage->AddMarker(std::move(marker));
|
||||
} else {
|
||||
storage->AddOTMTMarker(Move(marker));
|
||||
storage->AddOTMTMarker(std::move(marker));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -295,9 +295,9 @@ TimelineConsumers::AddMarkerForAllObservedDocShells(UniquePtr<AbstractTimelineMa
|
||||
storage = storage->getNext()) {
|
||||
UniquePtr<AbstractTimelineMarker> clone = aMarker->Clone();
|
||||
if (isMainThread) {
|
||||
storage->AddMarker(Move(clone));
|
||||
storage->AddMarker(std::move(clone));
|
||||
} else {
|
||||
storage->AddOTMTMarker(Move(clone));
|
||||
storage->AddOTMTMarker(std::move(clone));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ AnimationEventDispatcher::QueueEvents(nsTArray<AnimationEventInfo>&& aEvents)
|
||||
MOZ_ASSERT(mPresContext,
|
||||
"The pres context should be valid");
|
||||
|
||||
mPendingEvents.AppendElements(Move(aEvents));
|
||||
mPendingEvents.AppendElements(std::move(aEvents));
|
||||
mIsSorted = false;
|
||||
if (!mIsObserving) {
|
||||
mPresContext->RefreshDriver()->ScheduleAnimationEventDispatch(this);
|
||||
|
@ -90,7 +90,7 @@ public:
|
||||
public:
|
||||
explicit Iterator(EffectSet& aEffectSet)
|
||||
: mEffectSet(aEffectSet)
|
||||
, mHashIterator(mozilla::Move(aEffectSet.mEffects.Iter()))
|
||||
, mHashIterator(std::move(aEffectSet.mEffects.Iter()))
|
||||
, mIsEndIterator(false)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
@ -100,7 +100,7 @@ public:
|
||||
|
||||
Iterator(Iterator&& aOther)
|
||||
: mEffectSet(aOther.mEffectSet)
|
||||
, mHashIterator(mozilla::Move(aOther.mHashIterator))
|
||||
, mHashIterator(std::move(aOther.mHashIterator))
|
||||
, mIsEndIterator(aOther.mIsEndIterator)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
@ -29,7 +29,7 @@ struct PropertyValuePair
|
||||
: mProperty(aProperty) { }
|
||||
PropertyValuePair(nsCSSPropertyID aProperty,
|
||||
RefPtr<RawServoDeclarationBlock>&& aValue)
|
||||
: mProperty(aProperty), mServoDeclarationBlock(Move(aValue))
|
||||
: mProperty(aProperty), mServoDeclarationBlock(std::move(aValue))
|
||||
{
|
||||
MOZ_ASSERT(mServoDeclarationBlock, "Should be valid property value");
|
||||
}
|
||||
@ -70,7 +70,7 @@ struct Keyframe
|
||||
Keyframe(const Keyframe& aOther) = default;
|
||||
Keyframe(Keyframe&& aOther)
|
||||
{
|
||||
*this = Move(aOther);
|
||||
*this = std::move(aOther);
|
||||
}
|
||||
|
||||
Keyframe& operator=(const Keyframe& aOther) = default;
|
||||
@ -78,9 +78,9 @@ struct Keyframe
|
||||
{
|
||||
mOffset = aOther.mOffset;
|
||||
mComputedOffset = aOther.mComputedOffset;
|
||||
mTimingFunction = Move(aOther.mTimingFunction);
|
||||
mComposite = Move(aOther.mComposite);
|
||||
mPropertyValues = Move(aOther.mPropertyValues);
|
||||
mTimingFunction = std::move(aOther.mTimingFunction);
|
||||
mComposite = std::move(aOther.mComposite);
|
||||
mPropertyValues = std::move(aOther.mPropertyValues);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ KeyframeEffect::SetKeyframes(JSContext* aContext,
|
||||
}
|
||||
|
||||
RefPtr<ComputedStyle> style = GetTargetComputedStyle();
|
||||
SetKeyframes(Move(keyframes), style);
|
||||
SetKeyframes(std::move(keyframes), style);
|
||||
}
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ KeyframeEffect::SetKeyframes(
|
||||
return;
|
||||
}
|
||||
|
||||
mKeyframes = Move(aKeyframes);
|
||||
mKeyframes = std::move(aKeyframes);
|
||||
KeyframeUtils::DistributeKeyframes(mKeyframes);
|
||||
|
||||
if (mAnimation && mAnimation->IsRelevant()) {
|
||||
@ -352,7 +352,7 @@ KeyframeEffect::UpdateProperties(const ComputedStyle* aStyle)
|
||||
}
|
||||
}
|
||||
|
||||
mProperties = Move(properties);
|
||||
mProperties = std::move(properties);
|
||||
UpdateEffectSet();
|
||||
|
||||
for (AnimationProperty& property : mProperties) {
|
||||
|
@ -486,7 +486,7 @@ ConvertKeyframeSequence(JSContext* aCx,
|
||||
if (!valuePair) {
|
||||
continue;
|
||||
}
|
||||
keyframe->mPropertyValues.AppendElement(Move(valuePair.ref()));
|
||||
keyframe->mPropertyValues.AppendElement(std::move(valuePair.ref()));
|
||||
|
||||
#ifdef DEBUG
|
||||
// When we go to convert keyframes into arrays of property values we
|
||||
@ -676,7 +676,7 @@ MakePropertyValuePair(nsCSSPropertyID aProperty, const nsAString& aStringValue,
|
||||
ServoCSSParser::ParseProperty(aProperty, aStringValue, env);
|
||||
|
||||
if (servoDeclarationBlock) {
|
||||
result.emplace(aProperty, Move(servoDeclarationBlock));
|
||||
result.emplace(aProperty, std::move(servoDeclarationBlock));
|
||||
} else {
|
||||
ReportInvalidPropertyValueToConsole(aProperty, aStringValue, aDocument);
|
||||
}
|
||||
@ -1079,13 +1079,13 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx,
|
||||
if (!valuePair) {
|
||||
continue;
|
||||
}
|
||||
keyframe->mPropertyValues.AppendElement(Move(valuePair.ref()));
|
||||
keyframe->mPropertyValues.AppendElement(std::move(valuePair.ref()));
|
||||
}
|
||||
}
|
||||
|
||||
aResult.SetCapacity(processedKeyframes.Count());
|
||||
for (auto iter = processedKeyframes.Iter(); !iter.Done(); iter.Next()) {
|
||||
aResult.AppendElement(Move(*iter.UserData()));
|
||||
aResult.AppendElement(std::move(*iter.UserData()));
|
||||
}
|
||||
|
||||
aResult.Sort(ComputedOffsetComparator());
|
||||
@ -1148,7 +1148,7 @@ GetKeyframeListFromPropertyIndexedKeyframe(JSContext* aCx,
|
||||
auto parseAndAppendEasing = [&](const nsString& easingString,
|
||||
ErrorResult& aRv) {
|
||||
auto easing = TimingParams::ParseEasing(easingString, aDocument, aRv);
|
||||
if (!aRv.Failed() && !easings.AppendElement(Move(easing), fallible)) {
|
||||
if (!aRv.Failed() && !easings.AppendElement(std::move(easing), fallible)) {
|
||||
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
}
|
||||
};
|
||||
|
@ -175,7 +175,7 @@ struct TimingParams
|
||||
|
||||
void SetDuration(Maybe<StickyTimeDuration>&& aDuration)
|
||||
{
|
||||
mDuration = Move(aDuration);
|
||||
mDuration = std::move(aDuration);
|
||||
Update();
|
||||
}
|
||||
const Maybe<StickyTimeDuration>& Duration() const { return mDuration; }
|
||||
@ -221,7 +221,7 @@ struct TimingParams
|
||||
|
||||
void SetTimingFunction(Maybe<ComputedTimingFunction>&& aFunction)
|
||||
{
|
||||
mFunction = Move(aFunction);
|
||||
mFunction = std::move(aFunction);
|
||||
}
|
||||
const Maybe<ComputedTimingFunction>& TimingFunction() const
|
||||
{
|
||||
|
@ -1539,7 +1539,7 @@ ChildRunnable::Run()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mPrincipalInfo = Move(principalInfo);
|
||||
mPrincipalInfo = std::move(principalInfo);
|
||||
|
||||
PBackgroundChild* actor = BackgroundChild::GetOrCreateForCurrentThread();
|
||||
if (NS_WARN_IF(!actor)) {
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
}
|
||||
|
||||
FlattenedChildIterator(FlattenedChildIterator&& aOther)
|
||||
: ExplicitChildIterator(Move(aOther))
|
||||
: ExplicitChildIterator(std::move(aOther))
|
||||
, mOriginalContent(aOther.mOriginalContent)
|
||||
, mXBLInvolved(aOther.mXBLInvolved)
|
||||
{}
|
||||
@ -208,8 +208,8 @@ public:
|
||||
mFlags(aFlags), mPhase(aStartAtBeginning ? eAtBegin : eAtEnd) { }
|
||||
|
||||
AllChildrenIterator(AllChildrenIterator&& aOther)
|
||||
: FlattenedChildIterator(Move(aOther)),
|
||||
mAnonKids(Move(aOther.mAnonKids)), mAnonKidsIdx(aOther.mAnonKidsIdx),
|
||||
: FlattenedChildIterator(std::move(aOther)),
|
||||
mAnonKids(std::move(aOther.mAnonKids)), mAnonKidsIdx(aOther.mAnonKidsIdx),
|
||||
mFlags(aOther.mFlags), mPhase(aOther.mPhase)
|
||||
#ifdef DEBUG
|
||||
, mMutationGuard(aOther.mMutationGuard)
|
||||
|
@ -693,7 +693,7 @@ ChromeUtils::GetCallerLocation(const GlobalObject& aGlobal, nsIPrincipal* aPrinc
|
||||
JS::StackCapture captureMode(JS::FirstSubsumedFrame(cx, principals));
|
||||
|
||||
JS::RootedObject frame(cx);
|
||||
if (!JS::CaptureCurrentStack(cx, &frame, mozilla::Move(captureMode))) {
|
||||
if (!JS::CaptureCurrentStack(cx, &frame, std::move(captureMode))) {
|
||||
JS_ClearPendingException(cx);
|
||||
aRetval.set(nullptr);
|
||||
return;
|
||||
|
@ -53,7 +53,7 @@ class CustomElementCallbackReaction final : public CustomElementReaction
|
||||
{
|
||||
public:
|
||||
explicit CustomElementCallbackReaction(UniquePtr<CustomElementCallback> aCustomElementCallback)
|
||||
: mCustomElementCallback(Move(aCustomElementCallback))
|
||||
: mCustomElementCallback(std::move(aCustomElementCallback))
|
||||
{
|
||||
}
|
||||
|
||||
@ -493,7 +493,7 @@ CustomElementRegistry::CreateCustomElementCallback(
|
||||
if (aAdoptedCallbackArgs) {
|
||||
callback->SetAdoptedCallbackArgs(*aAdoptedCallbackArgs);
|
||||
}
|
||||
return Move(callback);
|
||||
return std::move(callback);
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
@ -539,7 +539,7 @@ CustomElementRegistry::EnqueueLifecycleCallback(nsIDocument::ElementCallbackType
|
||||
|
||||
CustomElementReactionsStack* reactionsStack =
|
||||
docGroup->CustomElementReactionsStack();
|
||||
reactionsStack->EnqueueCallbackReaction(aCustomElement, Move(callback));
|
||||
reactionsStack->EnqueueCallbackReaction(aCustomElement, std::move(callback));
|
||||
}
|
||||
|
||||
namespace {
|
||||
@ -581,7 +581,7 @@ CandidateFinder::OrderedCandidates()
|
||||
if (mCandidates.Count() == 1) {
|
||||
// Fast path for one candidate.
|
||||
for (auto iter = mCandidates.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsTArray<nsCOMPtr<Element>> rval({ Move(iter.Data()) });
|
||||
nsTArray<nsCOMPtr<Element>> rval({ std::move(iter.Data()) });
|
||||
iter.Remove();
|
||||
return rval;
|
||||
}
|
||||
@ -602,7 +602,7 @@ CandidateFinder::Traverse(Element* aRoot, nsTArray<nsCOMPtr<Element>>& aOrderedE
|
||||
{
|
||||
nsCOMPtr<Element> elem;
|
||||
if (mCandidates.Remove(aRoot, getter_AddRefs(elem))) {
|
||||
aOrderedElements.AppendElement(Move(elem));
|
||||
aOrderedElements.AppendElement(std::move(elem));
|
||||
if (mCandidates.Count() == 0) {
|
||||
return false;
|
||||
}
|
||||
@ -929,8 +929,8 @@ CustomElementRegistry::Define(JSContext* aCx,
|
||||
new CustomElementDefinition(nameAtom,
|
||||
localNameAtom,
|
||||
&aFunctionConstructor,
|
||||
Move(observedAttributes),
|
||||
Move(callbacksHolder));
|
||||
std::move(observedAttributes),
|
||||
std::move(callbacksHolder));
|
||||
|
||||
CustomElementDefinition* def = definition.get();
|
||||
mCustomDefinitions.Put(nameAtom, definition.forget());
|
||||
@ -1182,7 +1182,7 @@ void
|
||||
CustomElementReactionsStack::EnqueueCallbackReaction(Element* aElement,
|
||||
UniquePtr<CustomElementCallback> aCustomElementCallback)
|
||||
{
|
||||
Enqueue(aElement, new CustomElementCallbackReaction(Move(aCustomElementCallback)));
|
||||
Enqueue(aElement, new CustomElementCallbackReaction(std::move(aCustomElementCallback)));
|
||||
}
|
||||
|
||||
void
|
||||
@ -1268,7 +1268,7 @@ CustomElementReactionsStack::InvokeReactions(ElementQueue* aElementQueue,
|
||||
for (uint32_t j = 0; j < reactions.Length(); ++j) {
|
||||
// Transfer the ownership of the entry due to reentrant invocation of
|
||||
// this function.
|
||||
auto reaction(Move(reactions.ElementAt(j)));
|
||||
auto reaction(std::move(reactions.ElementAt(j)));
|
||||
if (reaction) {
|
||||
if (!aGlobal && reaction->IsUpgradeReaction()) {
|
||||
// This is for the special case when custom element is included
|
||||
@ -1351,8 +1351,8 @@ CustomElementDefinition::CustomElementDefinition(nsAtom* aType,
|
||||
: mType(aType),
|
||||
mLocalName(aLocalName),
|
||||
mConstructor(new CustomElementConstructor(aConstructor)),
|
||||
mObservedAttributes(Move(aObservedAttributes)),
|
||||
mCallbacks(Move(aCallbacks))
|
||||
mObservedAttributes(std::move(aObservedAttributes)),
|
||||
mCallbacks(std::move(aCallbacks))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ nsresult
|
||||
DispatcherTrait::Dispatch(TaskCategory aCategory,
|
||||
already_AddRefed<nsIRunnable>&& aRunnable)
|
||||
{
|
||||
return SchedulerGroup::UnlabeledDispatch(aCategory, Move(aRunnable));
|
||||
return SchedulerGroup::UnlabeledDispatch(aCategory, std::move(aRunnable));
|
||||
}
|
||||
|
||||
nsISerialEventTarget*
|
||||
|
@ -136,7 +136,7 @@ DocGroup::Dispatch(TaskCategory aCategory,
|
||||
if (mPerformanceCounter) {
|
||||
mPerformanceCounter->IncrementDispatchCounter(DispatchCategory(aCategory));
|
||||
}
|
||||
return mTabGroup->DispatchWithDocGroup(aCategory, Move(aRunnable), this);
|
||||
return mTabGroup->DispatchWithDocGroup(aCategory, std::move(aRunnable), this);
|
||||
}
|
||||
|
||||
nsISerialEventTarget*
|
||||
@ -179,7 +179,7 @@ DocGroup::MoveSignalSlotListTo(nsTArray<RefPtr<HTMLSlotElement>>& aDest)
|
||||
aDest.SetCapacity(aDest.Length() + mSignalSlotList.Length());
|
||||
for (RefPtr<HTMLSlotElement>& slot : mSignalSlotList) {
|
||||
slot->RemovedFromSignalSlotList();
|
||||
aDest.AppendElement(Move(slot));
|
||||
aDest.AppendElement(std::move(slot));
|
||||
}
|
||||
mSignalSlotList.Clear();
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ DocumentOrShadowRoot::RemoveSheet(StyleSheet& aSheet)
|
||||
if (index == mStyleSheets.NoIndex) {
|
||||
return nullptr;
|
||||
}
|
||||
RefPtr<StyleSheet> sheet = Move(mStyleSheets[index]);
|
||||
RefPtr<StyleSheet> sheet = std::move(mStyleSheets[index]);
|
||||
mStyleSheets.RemoveElementAt(index);
|
||||
sheet->ClearAssociatedDocumentOrShadowRoot();
|
||||
return sheet.forget();
|
||||
|
@ -3517,7 +3517,7 @@ Element::RequestFullscreen(CallerType aCallerType, ErrorResult& aError)
|
||||
auto request = MakeUnique<FullscreenRequest>(this);
|
||||
request->mIsCallerChrome = (aCallerType == CallerType::System);
|
||||
|
||||
OwnerDoc()->AsyncRequestFullScreen(Move(request));
|
||||
OwnerDoc()->AsyncRequestFullScreen(std::move(request));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1433,7 +1433,7 @@ EventSourceImpl::DispatchCurrentMessageEvent()
|
||||
{
|
||||
AssertIsOnTargetThread();
|
||||
MOZ_ASSERT(!IsShutDown());
|
||||
UniquePtr<Message> message(Move(mCurrentMessage));
|
||||
UniquePtr<Message> message(std::move(mCurrentMessage));
|
||||
ClearFields();
|
||||
|
||||
if (!message || message->mData.IsEmpty()) {
|
||||
@ -1803,7 +1803,7 @@ public:
|
||||
already_AddRefed<nsIRunnable> aEvent)
|
||||
: WorkerRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
|
||||
, mEventSourceImpl(aImpl)
|
||||
, mEvent(Move(aEvent))
|
||||
, mEvent(std::move(aEvent))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ private:
|
||||
already_AddRefed<DataSourceSurface>
|
||||
GetBRGADataSourceSurfaceSync(already_AddRefed<layers::Image> aImage)
|
||||
{
|
||||
RefPtr<SurfaceHelper> helper = new SurfaceHelper(Move(aImage));
|
||||
RefPtr<SurfaceHelper> helper = new SurfaceHelper(std::move(aImage));
|
||||
return helper->GetDataSurfaceSafe();
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ public:
|
||||
: Runnable("EncodingRunnable")
|
||||
, mType(aType)
|
||||
, mOptions(aOptions)
|
||||
, mImageBuffer(Move(aImageBuffer))
|
||||
, mImageBuffer(std::move(aImageBuffer))
|
||||
, mImage(aImage)
|
||||
, mEncoder(aEncoder)
|
||||
, mEncodingCompleteEvent(aEncodingCompleteEvent)
|
||||
@ -327,7 +327,7 @@ ImageEncoder::ExtractDataAsync(nsAString& aType,
|
||||
|
||||
nsCOMPtr<nsIRunnable> event = new EncodingRunnable(aType,
|
||||
aOptions,
|
||||
Move(aImageBuffer),
|
||||
std::move(aImageBuffer),
|
||||
nullptr,
|
||||
encoder,
|
||||
completeEvent,
|
||||
|
@ -103,7 +103,7 @@ ChromeUtils::GenerateQI(const GlobalObject& aGlobal, const Sequence<OwningString
|
||||
|
||||
ifaces.Sort(IIDComparator());
|
||||
|
||||
return new MozQueryInterface(Move(ifaces));
|
||||
return new MozQueryInterface(std::move(ifaces));
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -30,7 +30,7 @@ class MozQueryInterface final : public NonRefcountedDOMObject
|
||||
{
|
||||
public:
|
||||
explicit MozQueryInterface(nsTArray<nsIID>&& aInterfaces)
|
||||
: mInterfaces(Move(aInterfaces))
|
||||
: mInterfaces(std::move(aInterfaces))
|
||||
{}
|
||||
|
||||
bool QueriesTo(const nsIID& aIID) const;
|
||||
|
@ -1777,7 +1777,7 @@ Selection::LookUpSelection(nsIContent* aContent, int32_t aContentOffset,
|
||||
return aDetailsHead;
|
||||
}
|
||||
|
||||
UniquePtr<SelectionDetails> detailsHead = Move(aDetailsHead);
|
||||
UniquePtr<SelectionDetails> detailsHead = std::move(aDetailsHead);
|
||||
|
||||
for (uint32_t i = 0; i < overlappingRanges.Length(); i++) {
|
||||
nsRange* range = overlappingRanges[i];
|
||||
@ -1823,7 +1823,7 @@ Selection::LookUpSelection(nsIContent* aContent, int32_t aContentOffset,
|
||||
|
||||
auto newHead = MakeUnique<SelectionDetails>();
|
||||
|
||||
newHead->mNext = Move(detailsHead);
|
||||
newHead->mNext = std::move(detailsHead);
|
||||
newHead->mStart = start;
|
||||
newHead->mEnd = end;
|
||||
newHead->mSelectionType = aSelectionType;
|
||||
@ -1831,7 +1831,7 @@ Selection::LookUpSelection(nsIContent* aContent, int32_t aContentOffset,
|
||||
if (rd) {
|
||||
newHead->mTextRangeStyle = rd->mTextRangeStyle;
|
||||
}
|
||||
detailsHead = Move(newHead);
|
||||
detailsHead = std::move(newHead);
|
||||
}
|
||||
return detailsHead;
|
||||
}
|
||||
@ -2370,9 +2370,9 @@ Selection::Collapse(const RawRangeBoundary& aPoint, ErrorResult& aRv)
|
||||
// If the old range isn't referred by anybody other than this method,
|
||||
// we should reuse it for reducing the recreation cost.
|
||||
if (oldRange && oldRange->GetRefCount() == 1) {
|
||||
range = Move(oldRange);
|
||||
range = std::move(oldRange);
|
||||
} else if (mCachedRange) {
|
||||
range = Move(mCachedRange);
|
||||
range = std::move(mCachedRange);
|
||||
} else {
|
||||
range = new nsRange(aPoint.Container());
|
||||
}
|
||||
@ -3670,7 +3670,7 @@ Selection::SetBaseAndExtent(nsINode& aAnchorNode, uint32_t aAnchorOffset,
|
||||
|
||||
// If there is cached range, we should reuse it for saving the allocation
|
||||
// const (and some other cost in nsRange::DoSetRange().
|
||||
RefPtr<nsRange> newRange = Move(mCachedRange);
|
||||
RefPtr<nsRange> newRange = std::move(mCachedRange);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
if (newRange) {
|
||||
|
@ -155,7 +155,7 @@ StructuredCloneBlob::ReadStructuredCloneInternal(JSContext* aCx, JSStructuredClo
|
||||
mBuffer = MakeUnique<JSAutoStructuredCloneBuffer>(mStructuredCloneScope,
|
||||
&StructuredCloneHolder::sCallbacks,
|
||||
this);
|
||||
mBuffer->adopt(Move(data), version, &StructuredCloneHolder::sCallbacks);
|
||||
mBuffer->adopt(std::move(data), version, &StructuredCloneHolder::sCallbacks);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
StructuredCloneHolderBase(StructuredCloneScope aScope = StructuredCloneScope::SameProcessSameThread);
|
||||
virtual ~StructuredCloneHolderBase();
|
||||
|
||||
// Note, it is unsafe to Move() a StructuredCloneHolderBase since a raw
|
||||
// Note, it is unsafe to std::move() a StructuredCloneHolderBase since a raw
|
||||
// this pointer is passed to mBuffer as a callback closure. That must
|
||||
// be fixed if you want to implement a move constructor here.
|
||||
StructuredCloneHolderBase(StructuredCloneHolderBase&& aOther) = delete;
|
||||
@ -240,7 +240,7 @@ public:
|
||||
nsTArray<RefPtr<MessagePort>>&& TakeTransferredPorts()
|
||||
{
|
||||
MOZ_ASSERT(mSupportsTransferring);
|
||||
return Move(mTransferredPorts);
|
||||
return std::move(mTransferredPorts);
|
||||
}
|
||||
|
||||
// This method uses TakeTransferredPorts() to populate a sequence of
|
||||
|
@ -150,7 +150,7 @@ nsAttrValue::nsAttrValue(already_AddRefed<DeclarationBlock> aValue,
|
||||
const nsAString* aSerialized)
|
||||
: mBits(0)
|
||||
{
|
||||
SetTo(Move(aValue), aSerialized);
|
||||
SetTo(std::move(aValue), aSerialized);
|
||||
}
|
||||
|
||||
nsAttrValue::nsAttrValue(const nsIntMargin& aValue)
|
||||
@ -1263,7 +1263,7 @@ nsAttrValue::ParseAtomArray(const nsAString& aValue)
|
||||
|
||||
AtomArray* array = GetAtomArrayValue();
|
||||
|
||||
if (!array->AppendElement(Move(classAtom))) {
|
||||
if (!array->AppendElement(std::move(classAtom))) {
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
@ -1278,7 +1278,7 @@ nsAttrValue::ParseAtomArray(const nsAString& aValue)
|
||||
|
||||
classAtom = NS_AtomizeMainThread(Substring(start, iter));
|
||||
|
||||
if (!array->AppendElement(Move(classAtom))) {
|
||||
if (!array->AppendElement(std::move(classAtom))) {
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "nsElementTable.h"
|
||||
|
||||
using mozilla::DebugOnly;
|
||||
using mozilla::Move;
|
||||
using mozilla::RawRangeBoundary;
|
||||
|
||||
// couple of utility static functs
|
||||
@ -982,7 +981,7 @@ nsContentSubtreeIterator::Init(const RawRangeBoundary& aStart,
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
mRange = Move(range);
|
||||
mRange = std::move(range);
|
||||
|
||||
return InitWithRange();
|
||||
}
|
||||
|
@ -432,7 +432,7 @@ nsContentPermissionUtils::GetContentPermissionRequestParentById(const TabId& aTa
|
||||
}
|
||||
}
|
||||
|
||||
return Move(parentArray);
|
||||
return std::move(parentArray);
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
@ -455,7 +455,7 @@ nsContentPermissionUtils::GetContentPermissionRequestChildById(const TabId& aTab
|
||||
}
|
||||
}
|
||||
|
||||
return Move(childArray);
|
||||
return std::move(childArray);
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
|
@ -5683,7 +5683,7 @@ void
|
||||
nsContentUtils::RunInStableState(already_AddRefed<nsIRunnable> aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(CycleCollectedJSContext::Get(), "Must be on a script thread!");
|
||||
CycleCollectedJSContext::Get()->RunInStableState(Move(aRunnable));
|
||||
CycleCollectedJSContext::Get()->RunInStableState(std::move(aRunnable));
|
||||
}
|
||||
|
||||
/* static */
|
||||
@ -5691,7 +5691,7 @@ void
|
||||
nsContentUtils::AddPendingIDBTransaction(already_AddRefed<nsIRunnable> aTransaction)
|
||||
{
|
||||
MOZ_ASSERT(CycleCollectedJSContext::Get(), "Must be on a script thread!");
|
||||
CycleCollectedJSContext::Get()->AddPendingIDBTransaction(Move(aTransaction));
|
||||
CycleCollectedJSContext::Get()->AddPendingIDBTransaction(std::move(aTransaction));
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -736,7 +736,7 @@ nsDOMMutationObserver::Observe(nsINode& aTarget,
|
||||
r->SetAttributeOldValue(attributeOldValue);
|
||||
r->SetCharacterDataOldValue(characterDataOldValue);
|
||||
r->SetNativeAnonymousChildList(nativeAnonymousChildList);
|
||||
r->SetAttributeFilter(Move(filters));
|
||||
r->SetAttributeFilter(std::move(filters));
|
||||
r->SetAllAttributes(allAttrs);
|
||||
r->SetAnimations(animations);
|
||||
r->RemoveClones();
|
||||
|
@ -225,7 +225,7 @@ public:
|
||||
{
|
||||
NS_ASSERTION(!mParent, "Shouldn't have parent");
|
||||
mAttributeFilter.Clear();
|
||||
mAttributeFilter = mozilla::Move(aFilter);
|
||||
mAttributeFilter = std::move(aFilter);
|
||||
}
|
||||
|
||||
void AddClone(nsMutationReceiverBase* aClone)
|
||||
|
@ -183,7 +183,7 @@ public:
|
||||
};
|
||||
|
||||
NativeInputRunnable::NativeInputRunnable(already_AddRefed<nsIRunnable>&& aEvent)
|
||||
: PrioritizableRunnable(Move(aEvent), nsIRunnablePriority::PRIORITY_INPUT)
|
||||
: PrioritizableRunnable(std::move(aEvent), nsIRunnablePriority::PRIORITY_INPUT)
|
||||
{
|
||||
}
|
||||
|
||||
@ -191,7 +191,7 @@ NativeInputRunnable::NativeInputRunnable(already_AddRefed<nsIRunnable>&& aEvent)
|
||||
NativeInputRunnable::Create(already_AddRefed<nsIRunnable>&& aEvent)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsIRunnable> event(new NativeInputRunnable(Move(aEvent)));
|
||||
nsCOMPtr<nsIRunnable> event(new NativeInputRunnable(std::move(aEvent)));
|
||||
return event.forget();
|
||||
}
|
||||
|
||||
|
@ -385,11 +385,11 @@ nsIdentifierMapEntry::~nsIdentifierMapEntry()
|
||||
{}
|
||||
|
||||
nsIdentifierMapEntry::nsIdentifierMapEntry(nsIdentifierMapEntry&& aOther)
|
||||
: mKey(mozilla::Move(aOther.mKey))
|
||||
, mIdContentList(mozilla::Move(aOther.mIdContentList))
|
||||
, mNameContentList(mozilla::Move(aOther.mNameContentList))
|
||||
, mChangeCallbacks(mozilla::Move(aOther.mChangeCallbacks))
|
||||
, mImageElement(mozilla::Move(aOther.mImageElement))
|
||||
: mKey(std::move(aOther.mKey))
|
||||
, mIdContentList(std::move(aOther.mIdContentList))
|
||||
, mNameContentList(std::move(aOther.mNameContentList))
|
||||
, mChangeCallbacks(std::move(aOther.mChangeCallbacks))
|
||||
, mImageElement(std::move(aOther.mImageElement))
|
||||
{}
|
||||
|
||||
void
|
||||
@ -3202,9 +3202,9 @@ nsIDocument::Dispatch(TaskCategory aCategory,
|
||||
{
|
||||
// Note that this method may be called off the main thread.
|
||||
if (mDocGroup) {
|
||||
return mDocGroup->Dispatch(aCategory, Move(aRunnable));
|
||||
return mDocGroup->Dispatch(aCategory, std::move(aRunnable));
|
||||
}
|
||||
return DispatcherTrait::Dispatch(aCategory, Move(aRunnable));
|
||||
return DispatcherTrait::Dispatch(aCategory, std::move(aRunnable));
|
||||
}
|
||||
|
||||
nsISerialEventTarget*
|
||||
@ -3841,7 +3841,7 @@ nsIDocument::CreateShell(nsPresContext* aContext,
|
||||
RefPtr<PresShell> shell = new PresShell;
|
||||
// Note: we don't hold a ref to the shell (it holds a ref to us)
|
||||
mPresShell = shell;
|
||||
shell->Init(this, aContext, aViewManager, Move(aStyleSet));
|
||||
shell->Init(this, aContext, aViewManager, std::move(aStyleSet));
|
||||
|
||||
// Make sure to never paint if we belong to an invisible DocShell.
|
||||
nsCOMPtr<nsIDocShell> docShell(mDocumentContainer);
|
||||
@ -5566,9 +5566,9 @@ nsIDocument::GetClientInfo() const
|
||||
{
|
||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||
if (inner) {
|
||||
return Move(inner->GetClientInfo());
|
||||
return std::move(inner->GetClientInfo());
|
||||
}
|
||||
return Move(Maybe<ClientInfo>());
|
||||
return std::move(Maybe<ClientInfo>());
|
||||
}
|
||||
|
||||
Maybe<ClientState>
|
||||
@ -5576,9 +5576,9 @@ nsIDocument::GetClientState() const
|
||||
{
|
||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||
if (inner) {
|
||||
return Move(inner->GetClientState());
|
||||
return std::move(inner->GetClientState());
|
||||
}
|
||||
return Move(Maybe<ClientState>());
|
||||
return std::move(Maybe<ClientState>());
|
||||
}
|
||||
|
||||
Maybe<ServiceWorkerDescriptor>
|
||||
@ -5586,9 +5586,9 @@ nsIDocument::GetController() const
|
||||
{
|
||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||
if (inner) {
|
||||
return Move(inner->GetController());
|
||||
return std::move(inner->GetController());
|
||||
}
|
||||
return Move(Maybe<ServiceWorkerDescriptor>());
|
||||
return std::move(Maybe<ServiceWorkerDescriptor>());
|
||||
}
|
||||
|
||||
//
|
||||
@ -6423,7 +6423,7 @@ nsIDocument::NotifyPossibleTitleChange(bool aBoundTitleElement)
|
||||
&nsIDocument::DoNotifyPossibleTitleChange);
|
||||
nsresult rv = Dispatch(TaskCategory::Other, do_AddRef(event));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mPendingTitleChangeEvent = Move(event);
|
||||
mPendingTitleChangeEvent = std::move(event);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9530,7 +9530,7 @@ nsIDocument::FlushPendingLinkUpdates()
|
||||
mFlushingPendingLinkUpdates = true;
|
||||
|
||||
while (!mLinksToUpdate.IsEmpty()) {
|
||||
LinksToUpdateList links(Move(mLinksToUpdate));
|
||||
LinksToUpdateList links(std::move(mLinksToUpdate));
|
||||
for (auto iter = links.Iter(); !iter.Done(); iter.Next()) {
|
||||
Link* link = iter.Get();
|
||||
Element* element = link->GetElement();
|
||||
@ -10487,7 +10487,7 @@ class ExitFullscreenScriptRunnable : public Runnable
|
||||
public:
|
||||
explicit ExitFullscreenScriptRunnable(nsCOMArray<nsIDocument>&& aDocuments)
|
||||
: mozilla::Runnable("ExitFullscreenScriptRunnable")
|
||||
, mDocuments(Move(aDocuments))
|
||||
, mDocuments(std::move(aDocuments))
|
||||
{
|
||||
}
|
||||
|
||||
@ -10557,7 +10557,7 @@ nsIDocument::ExitFullscreenInDocTree(nsIDocument* aMaybeNotARootDoc)
|
||||
FullscreenRoots::Remove(root);
|
||||
|
||||
nsContentUtils::AddScriptRunner(
|
||||
new ExitFullscreenScriptRunnable(Move(changed)));
|
||||
new ExitFullscreenScriptRunnable(std::move(changed)));
|
||||
}
|
||||
|
||||
bool
|
||||
@ -10683,13 +10683,13 @@ class nsCallRequestFullScreen : public Runnable
|
||||
public:
|
||||
explicit nsCallRequestFullScreen(UniquePtr<FullscreenRequest>&& aRequest)
|
||||
: mozilla::Runnable("nsCallRequestFullScreen")
|
||||
, mRequest(Move(aRequest))
|
||||
, mRequest(std::move(aRequest))
|
||||
{
|
||||
}
|
||||
|
||||
NS_IMETHOD Run() override
|
||||
{
|
||||
mRequest->GetDocument()->RequestFullScreen(Move(mRequest));
|
||||
mRequest->GetDocument()->RequestFullScreen(std::move(mRequest));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -10707,7 +10707,7 @@ nsIDocument::AsyncRequestFullScreen(UniquePtr<FullscreenRequest>&& aRequest)
|
||||
|
||||
// Request full-screen asynchronously.
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsIRunnable> event = new nsCallRequestFullScreen(Move(aRequest));
|
||||
nsCOMPtr<nsIRunnable> event = new nsCallRequestFullScreen(std::move(aRequest));
|
||||
Dispatch(TaskCategory::Other, event.forget());
|
||||
}
|
||||
|
||||
@ -10888,7 +10888,7 @@ nsresult nsIDocument::RemoteFrameFullscreenChanged(Element* aFrameElement)
|
||||
auto request = MakeUnique<FullscreenRequest>(aFrameElement);
|
||||
request->mIsCallerChrome = false;
|
||||
request->mShouldNotifyNewOrigin = false;
|
||||
RequestFullScreen(Move(request));
|
||||
RequestFullScreen(std::move(request));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
@ -11184,7 +11184,7 @@ nsIDocument::RequestFullScreen(UniquePtr<FullscreenRequest>&& aRequest)
|
||||
return;
|
||||
}
|
||||
|
||||
PendingFullscreenRequestList::Add(Move(aRequest));
|
||||
PendingFullscreenRequestList::Add(std::move(aRequest));
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
// If we are not the top level process, dispatch an event to make
|
||||
// our parent process go fullscreen first.
|
||||
|
@ -2239,13 +2239,13 @@ nsFrameLoader::MaybeCreateDocShell()
|
||||
// Make a copy, so we can modify it.
|
||||
ancestorPrincipals = doc->AncestorPrincipals();
|
||||
ancestorPrincipals.InsertElementAt(0, doc->NodePrincipal());
|
||||
nsDocShell::Cast(mDocShell)->SetAncestorPrincipals(Move(ancestorPrincipals));
|
||||
nsDocShell::Cast(mDocShell)->SetAncestorPrincipals(std::move(ancestorPrincipals));
|
||||
|
||||
// Repeat for outer window IDs.
|
||||
nsTArray<uint64_t> ancestorOuterWindowIDs;
|
||||
ancestorOuterWindowIDs = doc->AncestorOuterWindowIDs();
|
||||
ancestorOuterWindowIDs.InsertElementAt(0, win->WindowID());
|
||||
nsDocShell::Cast(mDocShell)->SetAncestorOuterWindowIDs(Move(ancestorOuterWindowIDs));
|
||||
nsDocShell::Cast(mDocShell)->SetAncestorOuterWindowIDs(std::move(ancestorOuterWindowIDs));
|
||||
}
|
||||
|
||||
ReallyLoadFrameScripts();
|
||||
|
@ -759,7 +759,7 @@ nsFrameMessageManager::ReceiveMessage(nsISupports* aTarget,
|
||||
aError.Throw(NS_ERROR_FAILURE);
|
||||
return;
|
||||
}
|
||||
argument.mPorts.Construct(Move(ports));
|
||||
argument.mPorts.Construct(std::move(ports));
|
||||
}
|
||||
|
||||
argument.mName = aMessage;
|
||||
|
@ -1764,7 +1764,7 @@ nsGlobalWindowInner::EnsureClientSource()
|
||||
UniquePtr<ClientSource> reservedClient = loadInfo->TakeReservedClientSource();
|
||||
if (reservedClient) {
|
||||
mClientSource.reset();
|
||||
mClientSource = Move(reservedClient);
|
||||
mClientSource = std::move(reservedClient);
|
||||
newClientSource = true;
|
||||
}
|
||||
}
|
||||
@ -1776,7 +1776,7 @@ nsGlobalWindowInner::EnsureClientSource()
|
||||
// and it created an initial Client as a placeholder for the document.
|
||||
// In this case we want to inherit this placeholder Client here.
|
||||
if (!mClientSource) {
|
||||
mClientSource = Move(initialClientSource);
|
||||
mClientSource = std::move(initialClientSource);
|
||||
if (mClientSource) {
|
||||
newClientSource = true;
|
||||
}
|
||||
@ -2320,25 +2320,25 @@ nsPIDOMWindowInner::SyncStateFromParentWindow()
|
||||
Maybe<ClientInfo>
|
||||
nsPIDOMWindowInner::GetClientInfo() const
|
||||
{
|
||||
return Move(nsGlobalWindowInner::Cast(this)->GetClientInfo());
|
||||
return std::move(nsGlobalWindowInner::Cast(this)->GetClientInfo());
|
||||
}
|
||||
|
||||
Maybe<ClientState>
|
||||
nsPIDOMWindowInner::GetClientState() const
|
||||
{
|
||||
return Move(nsGlobalWindowInner::Cast(this)->GetClientState());
|
||||
return std::move(nsGlobalWindowInner::Cast(this)->GetClientState());
|
||||
}
|
||||
|
||||
Maybe<ServiceWorkerDescriptor>
|
||||
nsPIDOMWindowInner::GetController() const
|
||||
{
|
||||
return Move(nsGlobalWindowInner::Cast(this)->GetController());
|
||||
return std::move(nsGlobalWindowInner::Cast(this)->GetController());
|
||||
}
|
||||
|
||||
RefPtr<mozilla::dom::ServiceWorker>
|
||||
nsPIDOMWindowInner::GetOrCreateServiceWorker(const mozilla::dom::ServiceWorkerDescriptor& aDescriptor)
|
||||
{
|
||||
return Move(nsGlobalWindowInner::Cast(this)->GetOrCreateServiceWorker(aDescriptor));
|
||||
return std::move(nsGlobalWindowInner::Cast(this)->GetOrCreateServiceWorker(aDescriptor));
|
||||
}
|
||||
|
||||
void
|
||||
@ -5498,7 +5498,7 @@ nsGlobalWindowInner::ShowSlowScriptDialog(const nsString& aAddonId)
|
||||
|
||||
// GetStringFromName can return NS_OK and still give nullptr string
|
||||
failed = failed || NS_FAILED(rv) || result.IsEmpty();
|
||||
return Move(result);
|
||||
return std::move(result);
|
||||
};
|
||||
|
||||
bool isAddonScript = !aAddonId.IsEmpty();
|
||||
@ -6329,7 +6329,7 @@ nsGlobalWindowInner::GetClientInfo() const
|
||||
if (mClientSource) {
|
||||
clientInfo.emplace(mClientSource->Info());
|
||||
}
|
||||
return Move(clientInfo);
|
||||
return std::move(clientInfo);
|
||||
}
|
||||
|
||||
Maybe<ClientState>
|
||||
@ -6344,7 +6344,7 @@ nsGlobalWindowInner::GetClientState() const
|
||||
clientState.emplace(state);
|
||||
}
|
||||
}
|
||||
return Move(clientState);
|
||||
return std::move(clientState);
|
||||
}
|
||||
|
||||
Maybe<ServiceWorkerDescriptor>
|
||||
@ -6355,7 +6355,7 @@ nsGlobalWindowInner::GetController() const
|
||||
if (mClientSource) {
|
||||
controller = mClientSource->GetController();
|
||||
}
|
||||
return Move(controller);
|
||||
return std::move(controller);
|
||||
}
|
||||
|
||||
RefPtr<ServiceWorker>
|
||||
@ -7376,7 +7376,7 @@ nsGlobalWindowInner::PromiseDocumentFlushed(PromiseDocumentFlushedCallback& aCal
|
||||
mObservingDidRefresh = true;
|
||||
}
|
||||
|
||||
mDocumentFlushedResolvers.AppendElement(Move(flushResolver));
|
||||
mDocumentFlushedResolvers.AppendElement(std::move(flushResolver));
|
||||
return resultPromise.forget();
|
||||
}
|
||||
|
||||
@ -7930,9 +7930,9 @@ nsGlobalWindowInner::Dispatch(TaskCategory aCategory,
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
if (GetDocGroup()) {
|
||||
return GetDocGroup()->Dispatch(aCategory, Move(aRunnable));
|
||||
return GetDocGroup()->Dispatch(aCategory, std::move(aRunnable));
|
||||
}
|
||||
return DispatcherTrait::Dispatch(aCategory, Move(aRunnable));
|
||||
return DispatcherTrait::Dispatch(aCategory, std::move(aRunnable));
|
||||
}
|
||||
|
||||
nsISerialEventTarget*
|
||||
|
@ -7572,9 +7572,9 @@ nsGlobalWindowOuter::Dispatch(TaskCategory aCategory,
|
||||
{
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
if (GetDocGroup()) {
|
||||
return GetDocGroup()->Dispatch(aCategory, Move(aRunnable));
|
||||
return GetDocGroup()->Dispatch(aCategory, std::move(aRunnable));
|
||||
}
|
||||
return DispatcherTrait::Dispatch(aCategory, Move(aRunnable));
|
||||
return DispatcherTrait::Dispatch(aCategory, std::move(aRunnable));
|
||||
}
|
||||
|
||||
nsISerialEventTarget*
|
||||
|
@ -1402,7 +1402,7 @@ public:
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
SelectorCacheKey* key = new SelectorCacheKey(aSelector);
|
||||
mTable.Put(key->mKey, Move(aSelectorList));
|
||||
mTable.Put(key->mKey, std::move(aSelectorList));
|
||||
AddObject(key);
|
||||
}
|
||||
|
||||
|
@ -2435,7 +2435,7 @@ nsINode::ParseSelectorList(const nsAString& aSelectorString,
|
||||
}
|
||||
|
||||
auto* ret = selectorList.get();
|
||||
cache.CacheList(aSelectorString, Move(selectorList));
|
||||
cache.CacheList(aSelectorString, std::move(selectorList));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -469,7 +469,7 @@ nsImageLoadingContent::AddObserver(imgINotificationObserver* aObserver)
|
||||
}
|
||||
|
||||
mScriptedObservers.AppendElement(
|
||||
new ScriptedImageObserver(aObserver, Move(currentReq), Move(pendingReq)));
|
||||
new ScriptedImageObserver(aObserver, std::move(currentReq), std::move(pendingReq)));
|
||||
}
|
||||
|
||||
void
|
||||
@ -488,7 +488,7 @@ nsImageLoadingContent::RemoveObserver(imgINotificationObserver* aObserver)
|
||||
do {
|
||||
--i;
|
||||
if (mScriptedObservers[i]->mObserver == aObserver) {
|
||||
observer = Move(mScriptedObservers[i]);
|
||||
observer = std::move(mScriptedObservers[i]);
|
||||
mScriptedObservers.RemoveElementAt(i);
|
||||
break;
|
||||
}
|
||||
@ -518,10 +518,10 @@ nsImageLoadingContent::ClearScriptedRequests(int32_t aRequestType, nsresult aRea
|
||||
RefPtr<imgRequestProxy> req;
|
||||
switch (aRequestType) {
|
||||
case CURRENT_REQUEST:
|
||||
req = Move(observers[i]->mCurrentRequest);
|
||||
req = std::move(observers[i]->mCurrentRequest);
|
||||
break;
|
||||
case PENDING_REQUEST:
|
||||
req = Move(observers[i]->mPendingRequest);
|
||||
req = std::move(observers[i]->mPendingRequest);
|
||||
break;
|
||||
default:
|
||||
NS_ERROR("Unknown request type");
|
||||
@ -588,7 +588,7 @@ nsImageLoadingContent::MakePendingScriptedRequestsCurrent()
|
||||
if (observer->mCurrentRequest) {
|
||||
observer->mCurrentRequest->CancelAndForgetObserver(NS_BINDING_ABORTED);
|
||||
}
|
||||
observer->mCurrentRequest = Move(observer->mPendingRequest);
|
||||
observer->mCurrentRequest = std::move(observer->mPendingRequest);
|
||||
} while (i > 0);
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ nsJSScriptTimeoutHandler::nsJSScriptTimeoutHandler(JSContext* aCx,
|
||||
return;
|
||||
}
|
||||
|
||||
Init(aCx, Move(aArguments));
|
||||
Init(aCx, std::move(aArguments));
|
||||
}
|
||||
|
||||
nsJSScriptTimeoutHandler::nsJSScriptTimeoutHandler(JSContext* aCx,
|
||||
@ -271,7 +271,7 @@ nsJSScriptTimeoutHandler::nsJSScriptTimeoutHandler(JSContext* aCx,
|
||||
MOZ_ASSERT(aWorkerPrivate);
|
||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||
|
||||
Init(aCx, Move(aArguments));
|
||||
Init(aCx, std::move(aArguments));
|
||||
}
|
||||
|
||||
nsJSScriptTimeoutHandler::nsJSScriptTimeoutHandler(JSContext* aCx,
|
||||
@ -297,7 +297,7 @@ nsJSScriptTimeoutHandler::Init(JSContext* aCx,
|
||||
nsTArray<JS::Heap<JS::Value>>&& aArguments)
|
||||
{
|
||||
mozilla::HoldJSObjects(this);
|
||||
mArgs = Move(aArguments);
|
||||
mArgs = std::move(aArguments);
|
||||
|
||||
Init(aCx);
|
||||
}
|
||||
@ -339,7 +339,7 @@ NS_CreateJSTimeoutHandler(JSContext *aCx, nsGlobalWindowInner *aWindow,
|
||||
}
|
||||
|
||||
RefPtr<nsJSScriptTimeoutHandler> handler =
|
||||
new nsJSScriptTimeoutHandler(aCx, aWindow, aFunction, Move(args), aError);
|
||||
new nsJSScriptTimeoutHandler(aCx, aWindow, aFunction, std::move(args), aError);
|
||||
return aError.Failed() ? nullptr : handler.forget();
|
||||
}
|
||||
|
||||
@ -370,7 +370,7 @@ NS_CreateJSTimeoutHandler(JSContext *aCx, WorkerPrivate* aWorkerPrivate,
|
||||
}
|
||||
|
||||
RefPtr<nsJSScriptTimeoutHandler> handler =
|
||||
new nsJSScriptTimeoutHandler(aCx, aWorkerPrivate, aFunction, Move(args));
|
||||
new nsJSScriptTimeoutHandler(aCx, aWorkerPrivate, aFunction, std::move(args));
|
||||
return handler.forget();
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ nsQueryContentEventResult::SetEventResult(nsIWidget* aWidget,
|
||||
mOffset = aEvent.mReply.mOffset;
|
||||
mTentativeCaretOffset = aEvent.mReply.mTentativeCaretOffset;
|
||||
mString = aEvent.mReply.mString;
|
||||
mRectArray = mozilla::Move(aEvent.mReply.mRectArray);
|
||||
mRectArray = std::move(aEvent.mReply.mRectArray);
|
||||
// Mark as result that is longer used.
|
||||
aEvent.mSucceeded = false;
|
||||
|
||||
|
@ -3217,7 +3217,7 @@ nsRange::GetUsedFontFaces(nsTArray<nsAutoPtr<InspectorFontFace>>& aResult,
|
||||
// Take ownership of the InspectorFontFaces in the table and move them into
|
||||
// the aResult outparam.
|
||||
for (auto iter = fontFaces.Iter(); !iter.Done(); iter.Next()) {
|
||||
aResult.AppendElement(Move(iter.Data()));
|
||||
aResult.AppendElement(std::move(iter.Data()));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -347,7 +347,7 @@ nsSyncLoadService::PushSyncStreamToListener(already_AddRefed<nsIInputStream> aIn
|
||||
nsIStreamListener* aListener,
|
||||
nsIChannel* aChannel)
|
||||
{
|
||||
nsCOMPtr<nsIInputStream> in = Move(aIn);
|
||||
nsCOMPtr<nsIInputStream> in = std::move(aIn);
|
||||
|
||||
// Set up buffering stream
|
||||
nsresult rv;
|
||||
|
@ -3263,7 +3263,7 @@ template<class T, class S>
|
||||
inline RefPtr<T>
|
||||
StrongOrRawPtr(already_AddRefed<S>&& aPtr)
|
||||
{
|
||||
return Move(aPtr);
|
||||
return std::move(aPtr);
|
||||
}
|
||||
|
||||
template<class T,
|
||||
|
@ -74,7 +74,7 @@ struct ParamTraits<mozilla::ErrorResult>
|
||||
!readValue.DeserializeDOMExceptionInfo(aMsg, aIter)) {
|
||||
return false;
|
||||
}
|
||||
*aResult = Move(readValue);
|
||||
*aResult = std::move(readValue);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
@ -154,7 +154,7 @@ public:
|
||||
// (nothing).
|
||||
: TErrorResult()
|
||||
{
|
||||
*this = Move(aRHS);
|
||||
*this = std::move(aRHS);
|
||||
}
|
||||
TErrorResult& operator=(TErrorResult&& aRHS);
|
||||
|
||||
@ -607,7 +607,7 @@ public:
|
||||
{}
|
||||
|
||||
ErrorResult(ErrorResult&& aRHS)
|
||||
: BaseErrorResult(Move(aRHS))
|
||||
: BaseErrorResult(std::move(aRHS))
|
||||
{}
|
||||
|
||||
explicit ErrorResult(nsresult aRv)
|
||||
@ -621,7 +621,7 @@ public:
|
||||
|
||||
ErrorResult& operator=(ErrorResult&& aRHS)
|
||||
{
|
||||
BaseErrorResult::operator=(Move(aRHS));
|
||||
BaseErrorResult::operator=(std::move(aRHS));
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -704,7 +704,7 @@ public:
|
||||
}
|
||||
|
||||
CopyableErrorResult(CopyableErrorResult&& aRHS)
|
||||
: BaseErrorResult(Move(aRHS))
|
||||
: BaseErrorResult(std::move(aRHS))
|
||||
{}
|
||||
|
||||
explicit CopyableErrorResult(nsresult aRv)
|
||||
@ -718,7 +718,7 @@ public:
|
||||
|
||||
CopyableErrorResult& operator=(CopyableErrorResult&& aRHS)
|
||||
{
|
||||
BaseErrorResult::operator=(Move(aRHS));
|
||||
BaseErrorResult::operator=(std::move(aRHS));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ GetCurrentJSStack(int32_t aMaxDepth)
|
||||
? JS::StackCapture(JS::AllFrames())
|
||||
: JS::StackCapture(JS::MaxFrames(aMaxDepth));
|
||||
|
||||
return dom::exceptions::CreateStack(cx, mozilla::Move(captureMode));
|
||||
return dom::exceptions::CreateStack(cx, std::move(captureMode));
|
||||
}
|
||||
|
||||
namespace exceptions {
|
||||
@ -690,7 +690,7 @@ already_AddRefed<nsIStackFrame>
|
||||
CreateStack(JSContext* aCx, JS::StackCapture&& aCaptureMode)
|
||||
{
|
||||
JS::Rooted<JSObject*> stack(aCx);
|
||||
if (!JS::CaptureCurrentStack(aCx, &stack, mozilla::Move(aCaptureMode))) {
|
||||
if (!JS::CaptureCurrentStack(aCx, &stack, std::move(aCaptureMode))) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -44,11 +44,11 @@ public:
|
||||
MOZ_IMPLICIT Nullable(T&& aValue)
|
||||
: mValue()
|
||||
{
|
||||
mValue.emplace(mozilla::Move(aValue));
|
||||
mValue.emplace(std::move(aValue));
|
||||
}
|
||||
|
||||
Nullable(Nullable<T>&& aOther)
|
||||
: mValue(mozilla::Move(aOther.mValue))
|
||||
: mValue(std::move(aOther.mValue))
|
||||
{}
|
||||
|
||||
Nullable(const Nullable<T>& aOther)
|
||||
@ -69,7 +69,7 @@ public:
|
||||
void SetValue(T&& aArgs)
|
||||
{
|
||||
mValue.reset();
|
||||
mValue.emplace(mozilla::Move(aArgs));
|
||||
mValue.emplace(std::move(aArgs));
|
||||
}
|
||||
|
||||
// For cases when |T| is some type with nontrivial copy behavior, we may want
|
||||
|
@ -32,8 +32,8 @@ public:
|
||||
|
||||
// Move constructor so we can do Records of Records.
|
||||
RecordEntry(RecordEntry<KeyType, ValueType>&& aOther)
|
||||
: mKey(Move(aOther.mKey)),
|
||||
mValue(Move(aOther.mValue))
|
||||
: mKey(std::move(aOther.mKey)),
|
||||
mValue(std::move(aOther.mValue))
|
||||
{
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ public:
|
||||
|
||||
// Move constructor so we can do Record of Record.
|
||||
Record(SelfType&& aOther) :
|
||||
mEntries(Move(aOther.mEntries))
|
||||
mEntries(std::move(aOther.mEntries))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ struct TypedArray_base : public SpiderMonkeyInterfaceObjectStorage,
|
||||
}
|
||||
|
||||
TypedArray_base(TypedArray_base&& aOther)
|
||||
: SpiderMonkeyInterfaceObjectStorage(Move(aOther)),
|
||||
: SpiderMonkeyInterfaceObjectStorage(std::move(aOther)),
|
||||
mData(aOther.mData),
|
||||
mLength(aOther.mLength),
|
||||
mShared(aOther.mShared),
|
||||
@ -164,7 +164,7 @@ public:
|
||||
{}
|
||||
|
||||
TypedArray(TypedArray&& aOther)
|
||||
: Base(Move(aOther))
|
||||
: Base(std::move(aOther))
|
||||
{
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ public:
|
||||
}
|
||||
|
||||
ArrayBufferView_base(ArrayBufferView_base&& aOther)
|
||||
: Base(Move(aOther)),
|
||||
: Base(std::move(aOther)),
|
||||
mType(aOther.mType)
|
||||
{
|
||||
aOther.mType = js::Scalar::MaxTypedArrayViewType;
|
||||
|
@ -324,7 +324,7 @@ BroadcastChannel::Constructor(const GlobalObject& aGlobal,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bc->mWorkerRef = Move(workerRef);
|
||||
bc->mWorkerRef = std::move(workerRef);
|
||||
}
|
||||
|
||||
// Register this component to PBackground.
|
||||
|
16
dom/cache/Cache.cpp
vendored
16
dom/cache/Cache.cpp
vendored
@ -117,7 +117,7 @@ public:
|
||||
nsTArray<RefPtr<Request>>&& aRequestList, Promise* aPromise)
|
||||
: mWorkerHolder(aWorkerHolder)
|
||||
, mCache(aCache)
|
||||
, mRequestList(Move(aRequestList))
|
||||
, mRequestList(std::move(aRequestList))
|
||||
, mPromise(aPromise)
|
||||
{
|
||||
MOZ_ASSERT_IF(!NS_IsMainThread(), mWorkerHolder);
|
||||
@ -194,7 +194,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
responseList.AppendElement(Move(response));
|
||||
responseList.AppendElement(std::move(response));
|
||||
}
|
||||
|
||||
MOZ_DIAGNOSTIC_ASSERT(mRequestList.Length() == responseList.Length());
|
||||
@ -363,8 +363,8 @@ Cache::Add(JSContext* aContext, const RequestOrUSVString& aRequest,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
requestList.AppendElement(Move(request));
|
||||
return AddAll(global, Move(requestList), aCallerType, aRv);
|
||||
requestList.AppendElement(std::move(request));
|
||||
return AddAll(global, std::move(requestList), aCallerType, aRv);
|
||||
}
|
||||
|
||||
already_AddRefed<Promise>
|
||||
@ -411,10 +411,10 @@ Cache::AddAll(JSContext* aContext,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
requestList.AppendElement(Move(request));
|
||||
requestList.AppendElement(std::move(request));
|
||||
}
|
||||
|
||||
return AddAll(global, Move(requestList), aCallerType, aRv);
|
||||
return AddAll(global, std::move(requestList), aCallerType, aRv);
|
||||
}
|
||||
|
||||
already_AddRefed<Promise>
|
||||
@ -618,7 +618,7 @@ Cache::AddAll(const GlobalObject& aGlobal,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
fetchList.AppendElement(Move(fetch));
|
||||
fetchList.AppendElement(std::move(fetch));
|
||||
}
|
||||
|
||||
RefPtr<Promise> promise = Promise::Create(mGlobal, aRv);
|
||||
@ -628,7 +628,7 @@ Cache::AddAll(const GlobalObject& aGlobal,
|
||||
|
||||
RefPtr<FetchHandler> handler =
|
||||
new FetchHandler(mActor->GetWorkerHolder(), this,
|
||||
Move(aRequestList), promise);
|
||||
std::move(aRequestList), promise);
|
||||
|
||||
RefPtr<Promise> fetchPromise = Promise::All(aGlobal.Context(), fetchList, aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
|
12
dom/cache/CacheStorage.cpp
vendored
12
dom/cache/CacheStorage.cpp
vendored
@ -343,7 +343,7 @@ CacheStorage::Match(JSContext* aCx, const RequestOrUSVString& aRequest,
|
||||
entry->mArgs = StorageMatchArgs(CacheRequest(), params, GetOpenMode());
|
||||
entry->mRequest = request;
|
||||
|
||||
RunRequest(Move(entry));
|
||||
RunRequest(std::move(entry));
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
@ -367,7 +367,7 @@ CacheStorage::Has(const nsAString& aKey, ErrorResult& aRv)
|
||||
entry->mPromise = promise;
|
||||
entry->mArgs = StorageHasArgs(nsString(aKey));
|
||||
|
||||
RunRequest(Move(entry));
|
||||
RunRequest(std::move(entry));
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
@ -391,7 +391,7 @@ CacheStorage::Open(const nsAString& aKey, ErrorResult& aRv)
|
||||
entry->mPromise = promise;
|
||||
entry->mArgs = StorageOpenArgs(nsString(aKey));
|
||||
|
||||
RunRequest(Move(entry));
|
||||
RunRequest(std::move(entry));
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
@ -415,7 +415,7 @@ CacheStorage::Delete(const nsAString& aKey, ErrorResult& aRv)
|
||||
entry->mPromise = promise;
|
||||
entry->mArgs = StorageDeleteArgs(nsString(aKey));
|
||||
|
||||
RunRequest(Move(entry));
|
||||
RunRequest(std::move(entry));
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
@ -439,7 +439,7 @@ CacheStorage::Keys(ErrorResult& aRv)
|
||||
entry->mPromise = promise;
|
||||
entry->mArgs = StorageKeysArgs();
|
||||
|
||||
RunRequest(Move(entry));
|
||||
RunRequest(std::move(entry));
|
||||
|
||||
return promise.forget();
|
||||
}
|
||||
@ -547,7 +547,7 @@ CacheStorage::RunRequest(nsAutoPtr<Entry>&& aEntry)
|
||||
{
|
||||
MOZ_ASSERT(mActor);
|
||||
|
||||
nsAutoPtr<Entry> entry(Move(aEntry));
|
||||
nsAutoPtr<Entry> entry(std::move(aEntry));
|
||||
|
||||
AutoChildOpArgs args(this, entry->mArgs, 1);
|
||||
|
||||
|
2
dom/cache/CacheStreamControlChild.cpp
vendored
2
dom/cache/CacheStreamControlChild.cpp
vendored
@ -104,7 +104,7 @@ CacheStreamControlChild::SerializeStream(CacheReadStream* aReadStreamOut,
|
||||
MOZ_DIAGNOSTIC_ASSERT(aReadStreamOut);
|
||||
UniquePtr<AutoIPCStream> autoStream(new AutoIPCStream(aReadStreamOut->stream()));
|
||||
autoStream->Serialize(aStream, Manager());
|
||||
aStreamCleanupList.AppendElement(Move(autoStream));
|
||||
aStreamCleanupList.AppendElement(std::move(autoStream));
|
||||
}
|
||||
|
||||
void
|
||||
|
4
dom/cache/CacheStreamControlParent.cpp
vendored
4
dom/cache/CacheStreamControlParent.cpp
vendored
@ -68,7 +68,7 @@ CacheStreamControlParent::SerializeStream(CacheReadStream* aReadStreamOut,
|
||||
DebugOnly<bool> ok = autoStream->Serialize(aStream, Manager());
|
||||
MOZ_ASSERT(ok);
|
||||
|
||||
aStreamCleanupList.AppendElement(Move(autoStream));
|
||||
aStreamCleanupList.AppendElement(std::move(autoStream));
|
||||
}
|
||||
|
||||
void
|
||||
@ -87,7 +87,7 @@ CacheStreamControlParent::OpenStream(const nsID& aId,
|
||||
// a separate resolver function to signal the completion of the
|
||||
// operation. The Manager uses the existence of the Listener to ensure
|
||||
// that its safe to complete the operation.
|
||||
mStreamList->GetManager()->ExecuteOpenStream(this, Move(aResolver), aId);
|
||||
mStreamList->GetManager()->ExecuteOpenStream(this, std::move(aResolver), aId);
|
||||
}
|
||||
|
||||
void
|
||||
|
46
dom/cache/Manager.cpp
vendored
46
dom/cache/Manager.cpp
vendored
@ -557,7 +557,7 @@ public:
|
||||
if (NS_WARN_IF(!stream)) { return NS_ERROR_FILE_NOT_FOUND; }
|
||||
}
|
||||
|
||||
mStreamList->Add(mResponse.mBodyId, Move(stream));
|
||||
mStreamList->Add(mResponse.mBodyId, std::move(stream));
|
||||
|
||||
return rv;
|
||||
}
|
||||
@ -566,10 +566,10 @@ public:
|
||||
Complete(Listener* aListener, ErrorResult&& aRv) override
|
||||
{
|
||||
if (!mFoundResponse) {
|
||||
aListener->OnOpComplete(Move(aRv), CacheMatchResult(void_t()));
|
||||
aListener->OnOpComplete(std::move(aRv), CacheMatchResult(void_t()));
|
||||
} else {
|
||||
mStreamList->Activate(mCacheId);
|
||||
aListener->OnOpComplete(Move(aRv), CacheMatchResult(void_t()), mResponse,
|
||||
aListener->OnOpComplete(std::move(aRv), CacheMatchResult(void_t()), mResponse,
|
||||
mStreamList);
|
||||
}
|
||||
mStreamList = nullptr;
|
||||
@ -625,7 +625,7 @@ public:
|
||||
if (NS_WARN_IF(!stream)) { return NS_ERROR_FILE_NOT_FOUND; }
|
||||
}
|
||||
|
||||
mStreamList->Add(mSavedResponses[i].mBodyId, Move(stream));
|
||||
mStreamList->Add(mSavedResponses[i].mBodyId, std::move(stream));
|
||||
}
|
||||
|
||||
return rv;
|
||||
@ -635,7 +635,7 @@ public:
|
||||
Complete(Listener* aListener, ErrorResult&& aRv) override
|
||||
{
|
||||
mStreamList->Activate(mCacheId);
|
||||
aListener->OnOpComplete(Move(aRv), CacheMatchAllResult(), mSavedResponses,
|
||||
aListener->OnOpComplete(std::move(aRv), CacheMatchAllResult(), mSavedResponses,
|
||||
mStreamList);
|
||||
mStreamList = nullptr;
|
||||
}
|
||||
@ -1134,7 +1134,7 @@ public:
|
||||
DecreaseUsageForQuotaInfo(mQuotaInfo.ref(), mDeletedPaddingSize);
|
||||
}
|
||||
|
||||
aListener->OnOpComplete(Move(aRv), CacheDeleteResult(mSuccess));
|
||||
aListener->OnOpComplete(std::move(aRv), CacheDeleteResult(mSuccess));
|
||||
}
|
||||
|
||||
virtual bool MatchesCacheId(CacheId aCacheId) const override
|
||||
@ -1189,7 +1189,7 @@ public:
|
||||
if (NS_WARN_IF(!stream)) { return NS_ERROR_FILE_NOT_FOUND; }
|
||||
}
|
||||
|
||||
mStreamList->Add(mSavedRequests[i].mBodyId, Move(stream));
|
||||
mStreamList->Add(mSavedRequests[i].mBodyId, std::move(stream));
|
||||
}
|
||||
|
||||
return rv;
|
||||
@ -1199,7 +1199,7 @@ public:
|
||||
Complete(Listener* aListener, ErrorResult&& aRv) override
|
||||
{
|
||||
mStreamList->Activate(mCacheId);
|
||||
aListener->OnOpComplete(Move(aRv), CacheKeysResult(), mSavedRequests,
|
||||
aListener->OnOpComplete(std::move(aRv), CacheKeysResult(), mSavedRequests,
|
||||
mStreamList);
|
||||
mStreamList = nullptr;
|
||||
}
|
||||
@ -1255,7 +1255,7 @@ public:
|
||||
if (NS_WARN_IF(!stream)) { return NS_ERROR_FILE_NOT_FOUND; }
|
||||
}
|
||||
|
||||
mStreamList->Add(mSavedResponse.mBodyId, Move(stream));
|
||||
mStreamList->Add(mSavedResponse.mBodyId, std::move(stream));
|
||||
|
||||
return rv;
|
||||
}
|
||||
@ -1264,10 +1264,10 @@ public:
|
||||
Complete(Listener* aListener, ErrorResult&& aRv) override
|
||||
{
|
||||
if (!mFoundResponse) {
|
||||
aListener->OnOpComplete(Move(aRv), StorageMatchResult(void_t()));
|
||||
aListener->OnOpComplete(std::move(aRv), StorageMatchResult(void_t()));
|
||||
} else {
|
||||
mStreamList->Activate(mSavedResponse.mCacheId);
|
||||
aListener->OnOpComplete(Move(aRv), StorageMatchResult(void_t()), mSavedResponse,
|
||||
aListener->OnOpComplete(std::move(aRv), StorageMatchResult(void_t()), mSavedResponse,
|
||||
mStreamList);
|
||||
}
|
||||
mStreamList = nullptr;
|
||||
@ -1306,7 +1306,7 @@ public:
|
||||
virtual void
|
||||
Complete(Listener* aListener, ErrorResult&& aRv) override
|
||||
{
|
||||
aListener->OnOpComplete(Move(aRv), StorageHasResult(mCacheFound));
|
||||
aListener->OnOpComplete(std::move(aRv), StorageHasResult(mCacheFound));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -1363,7 +1363,7 @@ public:
|
||||
Complete(Listener* aListener, ErrorResult&& aRv) override
|
||||
{
|
||||
MOZ_DIAGNOSTIC_ASSERT(aRv.Failed() || mCacheId != INVALID_CACHE_ID);
|
||||
aListener->OnOpComplete(Move(aRv),
|
||||
aListener->OnOpComplete(std::move(aRv),
|
||||
StorageOpenResult(nullptr, nullptr, mNamespace),
|
||||
mCacheId);
|
||||
}
|
||||
@ -1439,7 +1439,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
aListener->OnOpComplete(Move(aRv), StorageDeleteResult(mCacheDeleted));
|
||||
aListener->OnOpComplete(std::move(aRv), StorageDeleteResult(mCacheDeleted));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -1473,7 +1473,7 @@ public:
|
||||
if (aRv.Failed()) {
|
||||
mKeys.Clear();
|
||||
}
|
||||
aListener->OnOpComplete(Move(aRv), StorageKeysResult(mKeys));
|
||||
aListener->OnOpComplete(std::move(aRv), StorageKeysResult(mKeys));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -1489,7 +1489,7 @@ public:
|
||||
OpenStreamAction(Manager* aManager, ListenerId aListenerId,
|
||||
InputStreamResolver&& aResolver, const nsID& aBodyId)
|
||||
: BaseAction(aManager, aListenerId)
|
||||
, mResolver(Move(aResolver))
|
||||
, mResolver(std::move(aResolver))
|
||||
, mBodyId(aBodyId)
|
||||
{ }
|
||||
|
||||
@ -1508,7 +1508,7 @@ public:
|
||||
virtual void
|
||||
Complete(Listener* aListener, ErrorResult&& aRv) override
|
||||
{
|
||||
mResolver(Move(mBodyStream));
|
||||
mResolver(std::move(mBodyStream));
|
||||
mResolver = nullptr;
|
||||
}
|
||||
|
||||
@ -1526,7 +1526,7 @@ Manager::ListenerId Manager::sNextListenerId = 0;
|
||||
void
|
||||
Manager::Listener::OnOpComplete(ErrorResult&& aRv, const CacheOpResult& aResult)
|
||||
{
|
||||
OnOpComplete(Move(aRv), aResult, INVALID_CACHE_ID, nsTArray<SavedResponse>(),
|
||||
OnOpComplete(std::move(aRv), aResult, INVALID_CACHE_ID, nsTArray<SavedResponse>(),
|
||||
nsTArray<SavedRequest>(), nullptr);
|
||||
}
|
||||
|
||||
@ -1534,7 +1534,7 @@ void
|
||||
Manager::Listener::OnOpComplete(ErrorResult&& aRv, const CacheOpResult& aResult,
|
||||
CacheId aOpenedCacheId)
|
||||
{
|
||||
OnOpComplete(Move(aRv), aResult, aOpenedCacheId, nsTArray<SavedResponse>(),
|
||||
OnOpComplete(std::move(aRv), aResult, aOpenedCacheId, nsTArray<SavedResponse>(),
|
||||
nsTArray<SavedRequest>(), nullptr);
|
||||
}
|
||||
|
||||
@ -1545,7 +1545,7 @@ Manager::Listener::OnOpComplete(ErrorResult&& aRv, const CacheOpResult& aResult,
|
||||
{
|
||||
AutoTArray<SavedResponse, 1> responseList;
|
||||
responseList.AppendElement(aSavedResponse);
|
||||
OnOpComplete(Move(aRv), aResult, INVALID_CACHE_ID, responseList,
|
||||
OnOpComplete(std::move(aRv), aResult, INVALID_CACHE_ID, responseList,
|
||||
nsTArray<SavedRequest>(), aStreamList);
|
||||
}
|
||||
|
||||
@ -1554,7 +1554,7 @@ Manager::Listener::OnOpComplete(ErrorResult&& aRv, const CacheOpResult& aResult,
|
||||
const nsTArray<SavedResponse>& aSavedResponseList,
|
||||
StreamList* aStreamList)
|
||||
{
|
||||
OnOpComplete(Move(aRv), aResult, INVALID_CACHE_ID, aSavedResponseList,
|
||||
OnOpComplete(std::move(aRv), aResult, INVALID_CACHE_ID, aSavedResponseList,
|
||||
nsTArray<SavedRequest>(), aStreamList);
|
||||
}
|
||||
|
||||
@ -1563,7 +1563,7 @@ Manager::Listener::OnOpComplete(ErrorResult&& aRv, const CacheOpResult& aResult,
|
||||
const nsTArray<SavedRequest>& aSavedRequestList,
|
||||
StreamList* aStreamList)
|
||||
{
|
||||
OnOpComplete(Move(aRv), aResult, INVALID_CACHE_ID, nsTArray<SavedResponse>(),
|
||||
OnOpComplete(std::move(aRv), aResult, INVALID_CACHE_ID, nsTArray<SavedResponse>(),
|
||||
aSavedRequestList, aStreamList);
|
||||
}
|
||||
|
||||
@ -1909,7 +1909,7 @@ Manager::ExecuteOpenStream(Listener* aListener, InputStreamResolver&& aResolver,
|
||||
ListenerId listenerId = SaveListener(aListener);
|
||||
|
||||
RefPtr<Action> action =
|
||||
new OpenStreamAction(this, listenerId, Move(aResolver), aBodyId);
|
||||
new OpenStreamAction(this, listenerId, std::move(aResolver), aBodyId);
|
||||
|
||||
context->Dispatch(action);
|
||||
}
|
||||
|
2
dom/cache/ReadStream.cpp
vendored
2
dom/cache/ReadStream.cpp
vendored
@ -534,7 +534,7 @@ ReadStream::Inner::AsyncOpenStreamOnOwningThread()
|
||||
if (!aStream) {
|
||||
self->OpenStreamFailed();
|
||||
} else {
|
||||
self->mStream = Move(aStream);
|
||||
self->mStream = std::move(aStream);
|
||||
self->mSnappyStream = new SnappyUncompressInputStream(self->mStream);
|
||||
}
|
||||
}
|
||||
|
2
dom/cache/StreamList.cpp
vendored
2
dom/cache/StreamList.cpp
vendored
@ -96,7 +96,7 @@ StreamList::Add(const nsID& aId, nsCOMPtr<nsIInputStream>&& aStream)
|
||||
// All streams should be added on IO thread before we set the stream
|
||||
// control on the owning IPC thread.
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mStreamControl);
|
||||
mList.AppendElement(Entry(aId, Move(aStream)));
|
||||
mList.AppendElement(Entry(aId, std::move(aStream)));
|
||||
}
|
||||
|
||||
already_AddRefed<nsIInputStream>
|
||||
|
2
dom/cache/StreamList.h
vendored
2
dom/cache/StreamList.h
vendored
@ -52,7 +52,7 @@ private:
|
||||
{
|
||||
explicit Entry(const nsID& aId, nsCOMPtr<nsIInputStream>&& aStream)
|
||||
: mId(aId)
|
||||
, mStream(Move(aStream))
|
||||
, mStream(std::move(aStream))
|
||||
{}
|
||||
|
||||
nsID mId;
|
||||
|
6
dom/cache/TypeUtils.cpp
vendored
6
dom/cache/TypeUtils.cpp
vendored
@ -282,7 +282,7 @@ TypeUtils::ToResponse(const CacheResponse& aIn)
|
||||
ir->InitChannelInfo(aIn.channelInfo());
|
||||
if (aIn.principalInfo().type() == mozilla::ipc::OptionalPrincipalInfo::TPrincipalInfo) {
|
||||
UniquePtr<mozilla::ipc::PrincipalInfo> info(new mozilla::ipc::PrincipalInfo(aIn.principalInfo().get_PrincipalInfo()));
|
||||
ir->SetPrincipalInfo(Move(info));
|
||||
ir->SetPrincipalInfo(std::move(info));
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIInputStream> stream = ReadStream::Create(aIn.body());
|
||||
@ -372,7 +372,7 @@ TypeUtils::ToInternalHeaders(const nsTArray<HeadersEntry>& aHeadersEntryList,
|
||||
headersEntry.value()));
|
||||
}
|
||||
|
||||
RefPtr<InternalHeaders> ref = new InternalHeaders(Move(entryList), aGuard);
|
||||
RefPtr<InternalHeaders> ref = new InternalHeaders(std::move(entryList), aGuard);
|
||||
return ref.forget();
|
||||
}
|
||||
|
||||
@ -510,7 +510,7 @@ TypeUtils::SerializeCacheStream(nsIInputStream* aStream,
|
||||
UniquePtr<AutoIPCStream> autoStream(new AutoIPCStream(cacheStream.stream()));
|
||||
autoStream->Serialize(aStream, GetIPCManager());
|
||||
|
||||
aStreamCleanupList.AppendElement(Move(autoStream));
|
||||
aStreamCleanupList.AppendElement(std::move(autoStream));
|
||||
}
|
||||
|
||||
} // namespace cache
|
||||
|
@ -21,7 +21,7 @@ CacheMapInvalidator::InvalidateCaches() const
|
||||
namespace detail {
|
||||
|
||||
CacheMapUntypedEntry::CacheMapUntypedEntry(std::vector<const CacheMapInvalidator*>&& invalidators)
|
||||
: mInvalidators(Move(invalidators))
|
||||
: mInvalidators(std::move(invalidators))
|
||||
{
|
||||
for (const auto& cur : mInvalidators) {
|
||||
// Don't assert that we insert, since there may be dupes in `invalidators`.
|
||||
|
@ -70,10 +70,10 @@ class CacheMap final
|
||||
|
||||
Entry(std::vector<const CacheMapInvalidator*>&& invalidators, CacheMap& parent,
|
||||
KeyT&& key, ValueT&& value)
|
||||
: detail::CacheMapUntypedEntry(Move(invalidators))
|
||||
: detail::CacheMapUntypedEntry(std::move(invalidators))
|
||||
, mParent(parent)
|
||||
, mKey(Move(key))
|
||||
, mValue(Move(value))
|
||||
, mKey(std::move(key))
|
||||
, mValue(std::move(value))
|
||||
{ }
|
||||
|
||||
void Invalidate() const override {
|
||||
@ -93,16 +93,16 @@ public:
|
||||
const ValueT* Insert(KeyT&& key, ValueT&& value,
|
||||
std::vector<const CacheMapInvalidator*>&& invalidators)
|
||||
{
|
||||
UniquePtr<const Entry> entry( new Entry(Move(invalidators), *this, Move(key),
|
||||
Move(value)) );
|
||||
UniquePtr<const Entry> entry( new Entry(std::move(invalidators), *this, std::move(key),
|
||||
std::move(value)) );
|
||||
|
||||
typename MapT::value_type insertable{
|
||||
&entry->mKey,
|
||||
nullptr
|
||||
};
|
||||
insertable.second = Move(entry);
|
||||
insertable.second = std::move(entry);
|
||||
|
||||
const auto res = mMap.insert(Move(insertable));
|
||||
const auto res = mMap.insert(std::move(insertable));
|
||||
const auto& didInsert = res.second;
|
||||
MOZ_ALWAYS_TRUE( didInsert );
|
||||
|
||||
|
@ -4641,7 +4641,7 @@ CanvasRenderingContext2D::SetLineDash(const Sequence<double>& aSegments,
|
||||
}
|
||||
}
|
||||
|
||||
CurrentState().dash = Move(dash);
|
||||
CurrentState().dash = std::move(dash);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -107,7 +107,7 @@ CanvasRenderingContextHelper::ToBlob(JSContext* aCx,
|
||||
aRv = ImageEncoder::ExtractDataAsync(type,
|
||||
params,
|
||||
usingCustomParseOptions,
|
||||
Move(imageBuffer),
|
||||
std::move(imageBuffer),
|
||||
format,
|
||||
GetWidthHeight(),
|
||||
aUsePlaceholder,
|
||||
|
@ -804,7 +804,7 @@ ImageBitmap::ToCloneData() const
|
||||
result->mSurface = surface->GetDataSurface();
|
||||
MOZ_ASSERT(result->mSurface);
|
||||
|
||||
return Move(result);
|
||||
return std::move(result);
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<ImageBitmap>
|
||||
@ -1263,7 +1263,7 @@ private:
|
||||
, mMutex("dom::CreateImageBitmapFromBlob::mMutex")
|
||||
, mPromise(aPromise)
|
||||
, mGlobalObject(aGlobal)
|
||||
, mInputStream(Move(aInputStream))
|
||||
, mInputStream(std::move(aInputStream))
|
||||
, mMimeType(aMimeType)
|
||||
, mCropRect(aCropRect)
|
||||
, mOriginalCropRect(aCropRect)
|
||||
@ -2216,7 +2216,7 @@ CreateImageBitmapFromBlob::Create(Promise* aPromise,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
task->mWorkerHolder = Move(holder);
|
||||
task->mWorkerHolder = std::move(holder);
|
||||
return task.forget();
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ OffscreenCanvas::GetContext(JSContext* aCx,
|
||||
gl::GLScreenBuffer::CreateFactory(gl, caps, forwarder, flags);
|
||||
|
||||
if (factory)
|
||||
screen->Morph(Move(factory));
|
||||
screen->Morph(std::move(factory));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ TexUnpackBlob::ConvertIfNeeded(WebGLContext* webgl, const char* funcName,
|
||||
}
|
||||
|
||||
*out_begin = dstBegin;
|
||||
*out_anchoredBuffer = Move(dstBuffer);
|
||||
*out_anchoredBuffer = std::move(dstBuffer);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -157,7 +157,7 @@ WebGLBuffer::BufferData(GLenum target, size_t size, const void* data, GLenum usa
|
||||
mUsage = usage;
|
||||
mByteLength = size;
|
||||
mFetchInvalidator.InvalidateCaches();
|
||||
mIndexCache = Move(newIndexCache);
|
||||
mIndexCache = std::move(newIndexCache);
|
||||
|
||||
if (mIndexCache) {
|
||||
if (!mIndexRanges.empty()) {
|
||||
|
@ -827,7 +827,7 @@ FormatUsageAuthority::CreateForWebGL1(gl::GLContext* gl)
|
||||
if (!AddUnsizedFormats(ptr, gl))
|
||||
return nullptr;
|
||||
|
||||
return Move(ret);
|
||||
return std::move(ret);
|
||||
}
|
||||
|
||||
UniquePtr<FormatUsageAuthority>
|
||||
@ -1062,7 +1062,7 @@ FormatUsageAuthority::CreateForWebGL2(gl::GLContext* gl)
|
||||
|
||||
////////////////////////////////////
|
||||
|
||||
return Move(ret);
|
||||
return std::move(ret);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user