author | Emilio Cobos Álvarez <emilio@crisal.io> |
Wed, 30 May 2018 21:15:35 +0200 | |
changeset 420862 | b54db66223586b4e04f5cb926fccdacf8a176b91 |
parent 420861 | 6979fe6c19b1c304bdfbc5b23f687c14b46f6c35 |
child 420863 | 4b57c07f8c2cd55c94a766b769808ccba71868bf |
push id | 34081 |
push user | ncsoregi@mozilla.com |
push date | Fri, 01 Jun 2018 22:02:59 +0000 |
treeherder | mozilla-central@cbf9ea7c5531 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | froydnj |
bugs | 1465585 |
milestone | 62.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/accessible/base/EventTree.cpp +++ b/accessible/base/EventTree.cpp @@ -173,17 +173,17 @@ EventTree::Process(const RefPtr<DocAcces while (mFirst) { // Skip a node and its subtree if its container is not in the document. if (mFirst->mContainer->IsInDocument()) { mFirst->Process(aDeathGrip); if (aDeathGrip->IsDefunct()) { return; } } - mFirst = Move(mFirst->mNext); + mFirst = std::move(mFirst->mNext); } MOZ_ASSERT(mContainer || mDependentEvents.IsEmpty(), "No container, no events"); MOZ_ASSERT(!mContainer || !mContainer->IsDefunct(), "Processing events for defunct container"); MOZ_ASSERT(!mFireReorder || mContainer, "No target for reorder event"); @@ -324,19 +324,19 @@ EventTree::FindOrInsert(Accessible* aCon continue; } // Insert the tail node into the hierarchy between the current node and // its parent. 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. prevNode = nodeOwnerRef.get(); node = nodeOwnerRef->mNext.get(); UniquePtr<EventTree>* nodeRef = &nodeOwnerRef->mNext; EventTree* insNode = nodeOwnerRef->mFirst.get(); while (node) { @@ -345,20 +345,20 @@ EventTree::FindOrInsert(Accessible* aCon if (curParent->Parent() != aContainer) { curParent = curParent->Parent(); continue; } 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; } prevNode = node; nodeRef = &node->mNext; node = node->mNext.get(); } @@ -503,17 +503,17 @@ EventTree::Mutated(AccMutationEvent* aEv AccHideEvent* hideEv = downcast_accEvent(aEv); if (!hideEv->mNeedsShutdown) { for (uint32_t i = 0; i < (*node)->mDependentEvents.Length(); i++) { AccMutationEvent* childEv = (*node)->mDependentEvents[i]; if (childEv->IsShow()) { AccShowEvent* childShowEv = downcast_accEvent(childEv); if (childShowEv->mPrecedingEvents.Length() > 0) { Controller(mContainer)->StorePrecedingEvents( - mozilla::Move(childShowEv->mPrecedingEvents)); + std::move(childShowEv->mPrecedingEvents)); } } } } } // If the new show contains existing child shows, then move preceding // events from the child shows to the new show. else if (aEv->IsShow()) { @@ -535,17 +535,17 @@ EventTree::Mutated(AccMutationEvent* aEv } #endif showEv->mPrecedingEvents.AppendElements(showChildEv->mPrecedingEvents); } } } } - *node = Move((*node)->mNext); + *node = std::move((*node)->mNext); break; } cntr = cntr->Parent(); } if (cntr == aEv->mAccessible) { continue; } node = &(*node)->mNext;
--- a/accessible/base/NotificationController.cpp +++ b/accessible/base/NotificationController.cpp @@ -787,17 +787,17 @@ NotificationController::WillRefresh(mozi } nsIContent* ownerContent = mDocument->DocumentNode()-> FindContentForSubDocument(childDoc->DocumentNode()); if (ownerContent) { 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; } outerDocAcc->RemoveChild(childDoc); } // Failed to bind the child document, destroy it. childDoc->Shutdown(); @@ -859,17 +859,17 @@ NotificationController::WillRefresh(mozi // events causes script to run. mObservingState = eRefreshProcessing; CoalesceMutationEvents(); ProcessMutationEvents(); 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) { RefPtr<AccTreeMutationEvent> nextEvent = mutEvent->NextEvent(); Accessible* target = mutEvent->GetAccessible(); // We need to be careful here, while it may seem that we can simply 0 all // the pending event bits that is not true. Because accessibles may be
--- a/accessible/base/NotificationController.h +++ b/accessible/base/NotificationController.h @@ -289,17 +289,17 @@ private: virtual void WillRefresh(mozilla::TimeStamp aTime) override; /** * Set and returns a hide event, paired with a show event, for the move. */ void WithdrawPrecedingEvents(nsTArray<RefPtr<AccHideEvent>>* aEvs) { if (mPrecedingEvents.Length() > 0) { - aEvs->AppendElements(mozilla::Move(mPrecedingEvents)); + aEvs->AppendElements(std::move(mPrecedingEvents)); } } void StorePrecedingEvent(AccHideEvent* aEv) { MOZ_ASSERT(mMoveGuardOnStack, "No move guard on stack!"); mPrecedingEvents.AppendElement(aEv); } void StorePrecedingEvents(nsTArray<RefPtr<AccHideEvent>>&& aEvs)
--- a/accessible/base/Relation.h +++ b/accessible/base/Relation.h @@ -30,24 +30,24 @@ public: mFirstIter(nullptr), mLastIter(nullptr) { AppendTarget(aAcc); } Relation(DocAccessible* aDocument, nsIContent* aContent) : mFirstIter(nullptr), mLastIter(nullptr) { 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; } inline void AppendIter(AccIterable* aIter) { if (mLastIter)
--- a/accessible/base/TextRange.h +++ b/accessible/base/TextRange.h @@ -44,26 +44,26 @@ struct TextPoint final class TextRange final { public: TextRange(HyperTextAccessible* aRoot, HyperTextAccessible* aStartContainer, int32_t aStartOffset, 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; } HyperTextAccessible* StartContainer() const { return mStartContainer; } int32_t StartOffset() const { return mStartOffset; } HyperTextAccessible* EndContainer() const { return mEndContainer; }
--- a/accessible/generic/HyperTextAccessible.cpp +++ b/accessible/generic/HyperTextAccessible.cpp @@ -1802,17 +1802,17 @@ HyperTextAccessible::SelectionRanges(nsT startContainer->DOMPointToOffset(DOMRange->GetStartContainer(), DOMRange->StartOffset(), false); int32_t endOffset = endContainer->DOMPointToOffset(DOMRange->GetEndContainer(), DOMRange->EndOffset(), true); TextRange tr(IsTextField() ? const_cast<HyperTextAccessible*>(this) : mDoc, startContainer, startOffset, endContainer, endOffset); - *(aRanges->AppendElement()) = Move(tr); + *(aRanges->AppendElement()) = std::move(tr); } } void HyperTextAccessible::VisibleRanges(nsTArray<a11y::TextRange>* aRanges) const { }
--- a/accessible/ipc/DocAccessibleParent.cpp +++ b/accessible/ipc/DocAccessibleParent.cpp @@ -92,17 +92,17 @@ DocAccessibleParent::RecvShowEvent(const } uint32_t type = nsIAccessibleEvent::EVENT_SHOW; xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(target); xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this); 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(); } uint32_t DocAccessibleParent::AddSubtree(ProxyAccessible* aParent, const nsTArray<a11y::AccessibleData>& aNewTree, uint32_t aIdx, uint32_t aIdxInParent) @@ -191,17 +191,17 @@ DocAccessibleParent::RecvHideEvent(const } parent->RemoveChild(root); root->Shutdown(); MOZ_ASSERT(CheckDocTree()); if (event) { - nsCoreUtils::DispatchAccEvent(Move(event)); + nsCoreUtils::DispatchAccEvent(std::move(event)); } return IPC_OK(); } mozilla::ipc::IPCResult DocAccessibleParent::RecvEvent(const uint64_t& aID, const uint32_t& aEventType) { @@ -222,17 +222,17 @@ DocAccessibleParent::RecvEvent(const uin } xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(proxy); xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this); nsINode* node = nullptr; 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(); } mozilla::ipc::IPCResult DocAccessibleParent::RecvStateChangeEvent(const uint64_t& aID, const uint64_t& aState, const bool& aEnabled) @@ -258,17 +258,17 @@ DocAccessibleParent::RecvStateChangeEven uint32_t type = nsIAccessibleEvent::EVENT_STATE_CHANGE; bool extra; uint32_t state = nsAccUtils::To32States(aState, &extra); bool fromUser = true; // XXX fix this nsINode* node = nullptr; // XXX can we do better? 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(); } mozilla::ipc::IPCResult DocAccessibleParent::RecvCaretMoveEvent(const uint64_t& aID, #if defined(XP_WIN) const LayoutDeviceIntRect& aCaretRect, @@ -297,17 +297,17 @@ DocAccessibleParent::RecvCaretMoveEvent( xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(proxy); xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this); nsINode* node = nullptr; bool fromUser = true; // XXX fix me 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(); } mozilla::ipc::IPCResult DocAccessibleParent::RecvTextChangeEvent(const uint64_t& aID, const nsString& aStr, const int32_t& aStart, @@ -334,17 +334,17 @@ DocAccessibleParent::RecvTextChangeEvent xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(target); xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this); uint32_t type = aIsInsert ? nsIAccessibleEvent::EVENT_TEXT_INSERTED : nsIAccessibleEvent::EVENT_TEXT_REMOVED; nsINode* node = nullptr; 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(); } #if defined(XP_WIN) mozilla::ipc::IPCResult DocAccessibleParent::RecvSyncTextChangeEvent(const uint64_t& aID, @@ -378,17 +378,17 @@ DocAccessibleParent::RecvSelectionEvent( ProxySelectionEvent(target, widget, aType); if (!nsCoreUtils::AccEventObserversExist()) { return IPC_OK(); } xpcAccessibleGeneric* xpcTarget = GetXPCAccessible(target); 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(); } mozilla::ipc::IPCResult DocAccessibleParent::RecvRoleChangedEvent(const a11y::role& aRole) { if (mShutdown) { @@ -626,17 +626,17 @@ DocAccessibleParent::MaybeInitWindowEmul SetEmulatedWindowHandle(aHwnd); RefPtr<IAccessible> hwndAcc; if (SUCCEEDED(::AccessibleObjectFromWindow(aHwnd, OBJID_WINDOW, 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), hWndAccHolder); }); HWND parentWnd = reinterpret_cast<HWND>(rootDocument->GetNativeWindow()); DebugOnly<HWND> hWnd = nsWinUtils::CreateNativeWindow(kClassNameTabContent, @@ -666,24 +666,24 @@ DocAccessibleParent::SendParentCOMProxy( } RefPtr<IAccessible> nativeAcc; outerDoc->GetNativeInterface(getter_AddRefs(nativeAcc)); MOZ_ASSERT(nativeAcc); 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) } void DocAccessibleParent::SetEmulatedWindowHandle(HWND aWindowHandle) { if (!aWindowHandle && mEmulatedWindowHandle && IsTopLevel()) { ::DestroyWindow(mEmulatedWindowHandle); @@ -744,17 +744,17 @@ DocAccessibleParent::RecvFocusEvent(cons } xpcAccessibleGeneric* xpcAcc = GetXPCAccessible(proxy); xpcAccessibleDocument* doc = GetAccService()->GetXPCDocument(this); nsINode* node = nullptr; 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(); } #endif // defined(XP_WIN) } // a11y } // mozilla
--- a/accessible/ipc/other/ProxyAccessible.cpp +++ b/accessible/ipc/other/ProxyAccessible.cpp @@ -73,17 +73,17 @@ ProxyAccessible::RelationByType(Relation &targetIDs); size_t targetCount = targetIDs.Length(); nsTArray<ProxyAccessible*> targets(targetCount); for (size_t i = 0; i < targetCount; i++) if (ProxyAccessible* proxy = mDoc->GetAccessible(targetIDs[i])) targets.AppendElement(proxy); - return Move(targets); + return std::move(targets); } void ProxyAccessible::Relations(nsTArray<RelationType>* aTypes, nsTArray<nsTArray<ProxyAccessible*>>* aTargetSets) const { nsTArray<RelationTargets> ipcRelations; @@ -101,17 +101,17 @@ ProxyAccessible::Relations(nsTArray<Rela nsTArray<ProxyAccessible*> targets(targetCount); for (size_t j = 0; j < targetCount; j++) if (ProxyAccessible* proxy = mDoc->GetAccessible(ipcRelations[i].Targets()[j])) targets.AppendElement(proxy); if (targets.IsEmpty()) continue; - aTargetSets->AppendElement(Move(targets)); + aTargetSets->AppendElement(std::move(targets)); aTypes->AppendElement(static_cast<RelationType>(type)); } } bool ProxyAccessible::IsSearchbox() const { bool retVal = false;
--- a/accessible/ipc/win/COMPtrTypes.cpp +++ b/accessible/ipc/win/COMPtrTypes.cpp @@ -44,33 +44,33 @@ CreateHolderFromAccessible(NotNull<Acces RefPtr<HandlerProvider> payload; if (useHandler) { payload = new HandlerProvider(IID_IAccessible, mscom::ToInterceptorTargetPtr(iaToProxy)); } 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 CreateHolderFromHandlerControl(mscom::ProxyUniquePtr<IHandlerControl> aHandlerControl) { MOZ_ASSERT(aHandlerControl); MOZ_ASSERT(XRE_IsContentProcess()); MOZ_ASSERT(NS_IsMainThread()); if (!aHandlerControl) { return nullptr; } - return IHandlerControlHolder(Move(aHandlerControl)); + return IHandlerControlHolder(std::move(aHandlerControl)); } } // namespace a11y } // namespace mozilla
--- a/accessible/ipc/win/DocAccessibleChild.cpp +++ b/accessible/ipc/win/DocAccessibleChild.cpp @@ -103,17 +103,17 @@ DocAccessibleChild::PushDeferredEvent(Un return; } topLevelIPCDoc = static_cast<DocAccessibleChild*>(tabChild->GetTopLevelDocAccessibleChild()); } if (topLevelIPCDoc) { - topLevelIPCDoc->mDeferredEvents.AppendElement(Move(aEvent)); + topLevelIPCDoc->mDeferredEvents.AppendElement(std::move(aEvent)); } } bool DocAccessibleChild::SendEvent(const uint64_t& aID, const uint32_t& aType) { if (IsConstructedInParentProcess()) { return PDocAccessibleChild::SendEvent(aID, aType);
--- a/accessible/ipc/win/DocAccessibleChild.h +++ b/accessible/ipc/win/DocAccessibleChild.h @@ -114,17 +114,17 @@ private: , mEventData(aEventData.ID(), aEventData.Idx(), nsTArray<AccessibleData>(), aEventData.EventSuppressed()) , mFromUser(aFromUser) { // Since IPDL doesn't generate a move constructor for ShowEventData, // 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 { Unused << aIPCDoc->SendShowEvent(mEventData, mFromUser); } ShowEventData mEventData;
--- a/accessible/ipc/win/HandlerProvider.cpp +++ b/accessible/ipc/win/HandlerProvider.cpp @@ -38,17 +38,17 @@ namespace mozilla { namespace a11y { HandlerProvider::HandlerProvider(REFIID aIid, mscom::InterceptorTargetPtr<IUnknown> aTarget) : mRefCnt(0) , mMutex("mozilla::a11y::HandlerProvider::mMutex") , mTargetUnkIid(aIid) - , mTargetUnk(Move(aTarget)) + , mTargetUnk(std::move(aTarget)) { } HRESULT HandlerProvider::QueryInterface(REFIID riid, void** ppv) { if (!ppv) { return E_INVALIDARG; @@ -497,31 +497,31 @@ HandlerProvider::GetEffectiveOutParamIid return IID_IUnknown; } HRESULT 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; } void HandlerProvider::SetHandlerControlOnMainThread(DWORD aPid, mscom::ProxyUniquePtr<IHandlerControl> aCtrl) { MOZ_ASSERT(NS_IsMainThread()); auto content = dom::ContentChild::GetSingleton(); MOZ_ASSERT(content); - IHandlerControlHolder holder(CreateHolderFromHandlerControl(Move(aCtrl))); + IHandlerControlHolder holder(CreateHolderFromHandlerControl(std::move(aCtrl))); Unused << content->SendA11yHandlerControl(aPid, holder); } HRESULT HandlerProvider::put_HandlerControl(long aPid, IHandlerControl* aCtrl) { MOZ_ASSERT(mscom::IsCurrentThreadMTA()); @@ -529,17 +529,17 @@ HandlerProvider::put_HandlerControl(long return E_INVALIDARG; } auto ptrProxy = mscom::ToProxyUniquePtr(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; } return S_OK; } HRESULT HandlerProvider::Refresh(DynamicIA2Data* aOutData) @@ -571,17 +571,17 @@ HandlerProvider::Refresh(DynamicIA2Data* template<typename Interface> HRESULT 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; } return hr; } void
--- a/accessible/ipc/win/PlatformChild.cpp +++ b/accessible/ipc/win/PlatformChild.cpp @@ -57,31 +57,31 @@ PlatformChild::PlatformChild() , mSdnTypelib(mozilla::mscom::RegisterTypelib(L"AccessibleMarshal.dll")) { WORD actCtxResourceId = Compatibility::GetActCtxResourceId(); mozilla::mscom::MTADeletePtr<mozilla::mscom::ActivationContextRegion> tmpActCtxMTA; 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); 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 } // namespace mozilla
--- a/accessible/ipc/win/ProxyAccessible.cpp +++ b/accessible/ipc/win/ProxyAccessible.cpp @@ -411,17 +411,17 @@ ProxyAccessible::RelationByType(Relation nsTArray<ProxyAccessible*> proxies; for (long idx = 0; idx < nTargets; idx++) { IUnknown* target = targets[idx]; proxies.AppendElement(GetProxyFor(Document(), target)); target->Release(); } CoTaskMemFree(targets); - return Move(proxies); + return std::move(proxies); } double ProxyAccessible::CurValue() { RefPtr<IAccessibleValue> acc = QueryInterface<IAccessibleValue>(this); if (!acc) { return UnspecifiedNaN<double>();
--- a/accessible/ipc/win/handler/AccessibleHandlerControl.cpp +++ b/accessible/ipc/win/handler/AccessibleHandlerControl.cpp @@ -37,17 +37,17 @@ TextChange::TextChange(long aIA2UniqueId , mIsInsert(aIsInsert) , mText{BSTRCopy(aText->text), aText->start, aText->end} { } TextChange::TextChange(TextChange&& aOther) : mText() { - *this = Move(aOther); + *this = std::move(aOther); } TextChange::TextChange(const TextChange& aOther) : mText() { *this = aOther; }
--- a/accessible/windows/ia2/ia2AccessibleRelation.h +++ b/accessible/windows/ia2/ia2AccessibleRelation.h @@ -21,17 +21,17 @@ namespace a11y { class ia2AccessibleRelation final : public IAccessibleRelation { public: ia2AccessibleRelation(RelationType aType, Relation* aRel); ia2AccessibleRelation(RelationType aType, nsTArray<RefPtr<Accessible>>&& aTargets) : - mType(aType), mTargets(Move(aTargets)) {} + mType(aType), mTargets(std::move(aTargets)) {} // IUnknown DECL_IUNKNOWN // IAccessibleRelation virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relationType( /* [retval][out] */ BSTR *relationType);
--- a/accessible/windows/msaa/AccessibleWrap.cpp +++ b/accessible/windows/msaa/AccessibleWrap.cpp @@ -1723,22 +1723,22 @@ AccessibleWrap::SetHandlerControl(DWORD { MOZ_ASSERT(XRE_IsParentProcess() && NS_IsMainThread()); if (!sHandlerControllers) { sHandlerControllers = new nsTArray<HandlerControllerData>(); 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 */ void AccessibleWrap::InvalidateHandlers() { static const HRESULT kErrorServerDied = HRESULT_FROM_WIN32(RPC_S_SERVER_UNAVAILABLE);
--- a/accessible/windows/msaa/AccessibleWrap.h +++ b/accessible/windows/msaa/AccessibleWrap.h @@ -268,25 +268,25 @@ protected: NAVRELATION_ERROR = 0x1017, NAVRELATION_ERROR_FOR = 0x1018 }; struct HandlerControllerData final { HandlerControllerData(DWORD aPid, RefPtr<IHandlerControl>&& aCtrl) : mPid(aPid) - , mCtrl(Move(aCtrl)) + , mCtrl(std::move(aCtrl)) { mIsProxy = mozilla::mscom::IsProxy(mCtrl); } HandlerControllerData(HandlerControllerData&& aOther) : mPid(aOther.mPid) , mIsProxy(aOther.mIsProxy) - , mCtrl(Move(aOther.mCtrl)) + , mCtrl(std::move(aOther.mCtrl)) { } bool operator==(const HandlerControllerData& aOther) const { return mPid == aOther.mPid; }
--- a/accessible/xpcom/xpcAccessibleHyperText.cpp +++ b/accessible/xpcom/xpcAccessibleHyperText.cpp @@ -533,17 +533,17 @@ xpcAccessibleHyperText::GetSelectionRang nsCOMPtr<nsIMutableArray> xpcRanges = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); AutoTArray<TextRange, 1> ranges; 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; } NS_IMETHODIMP xpcAccessibleHyperText::GetVisibleRanges(nsIArray** aRanges) { @@ -557,17 +557,17 @@ xpcAccessibleHyperText::GetVisibleRanges nsCOMPtr<nsIMutableArray> xpcRanges = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); nsTArray<TextRange> ranges; 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; } NS_IMETHODIMP xpcAccessibleHyperText::GetRangeByChild(nsIAccessible* aChild, nsIAccessibleTextRange** aRange)
--- a/browser/app/ProcThreadAttributes.h +++ b/browser/app/ProcThreadAttributes.h @@ -153,17 +153,17 @@ public: PROC_THREAD_ATTRIBUTE_HANDLE_LIST, mInheritableHandles.begin(), mInheritableHandles.length() * sizeof(HANDLE), nullptr, nullptr)) { return Nothing(); } } - mAttrList = Move(attrList); + mAttrList = std::move(attrList); aSiex.lpAttributeList = mAttrList.get(); aSiex.StartupInfo.cb = sizeof(STARTUPINFOEXW); return Some(true); } private: static const uint32_t kNumInline = 3; // Inline storage for the std handles
--- a/caps/ExpandedPrincipal.cpp +++ b/caps/ExpandedPrincipal.cpp @@ -276,17 +276,17 @@ ExpandedPrincipal::Read(nsIObjectInputSt nsCOMPtr<nsIPrincipal> principal = do_QueryInterface(read); if (!principal) { return NS_ERROR_UNEXPECTED; } // 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; } NS_IMETHODIMP ExpandedPrincipal::Write(nsIObjectOutputStream* aStream) {
--- a/chrome/nsChromeRegistryChrome.h +++ b/chrome/nsChromeRegistryChrome.h @@ -118,18 +118,18 @@ class nsChromeRegistryChrome : public ns class OverlayListEntry : public nsURIHashKey { public: typedef nsURIHashKey::KeyType KeyType; 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); nsCOMArray<nsIURI> mArray; }; class OverlayListHash
--- a/devtools/shared/heapsnapshot/DeserializedNode.cpp +++ b/devtools/shared/heapsnapshot/DeserializedNode.cpp @@ -15,17 +15,17 @@ DeserializedEdge::DeserializedEdge(Deser referent = rhs.referent; name = rhs.name; } DeserializedEdge& DeserializedEdge::operator=(DeserializedEdge&& rhs) { MOZ_ASSERT(&rhs != this); this->~DeserializedEdge(); - new(this) DeserializedEdge(Move(rhs)); + new(this) DeserializedEdge(std::move(rhs)); return *this; } JS::ubi::Node DeserializedNode::getEdgeReferent(const DeserializedEdge& edge) { auto ptr = owner->nodes.lookup(edge.referent); MOZ_ASSERT(ptr); @@ -82,17 +82,17 @@ class DeserializedEdgeRange : public Edg void settle() { if (i >= node->edges.length()) { front_ = nullptr; return; } 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; } public: explicit DeserializedEdgeRange(DeserializedNode& node) : node(&node) , i(0)
--- a/devtools/shared/heapsnapshot/DeserializedNode.h +++ b/devtools/shared/heapsnapshot/DeserializedNode.h @@ -82,41 +82,41 @@ struct DeserializedNode { const Maybe<StackFrameId>& allocationStack, const char* className, const char* filename, HeapSnapshot& owner) : id(id) , coarseType(coarseType) , typeName(typeName) , size(size) - , edges(Move(edges)) + , edges(std::move(edges)) , allocationStack(allocationStack) , jsObjectClassName(className) , scriptFilename(filename) , owner(&owner) { } virtual ~DeserializedNode() { } DeserializedNode(DeserializedNode&& rhs) : id(rhs.id) , 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) , owner(rhs.owner) { } DeserializedNode& operator=(DeserializedNode&& rhs) { MOZ_ASSERT(&rhs != this); this->~DeserializedNode(); - new(this) DeserializedNode(Move(rhs)); + new(this) DeserializedNode(std::move(rhs)); return *this; } // Get a borrowed reference to the given edge's referent. This method is // virtual to provide a hook for gmock and gtest. virtual JS::ubi::Node getEdgeReferent(const DeserializedEdge& edge); struct HashPolicy;
--- a/devtools/shared/heapsnapshot/DominatorTree.h +++ b/devtools/shared/heapsnapshot/DominatorTree.h @@ -27,17 +27,17 @@ protected: private: JS::ubi::DominatorTree mDominatorTree; RefPtr<HeapSnapshot> mHeapSnapshot; 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); MOZ_ASSERT(aHeapSnapshot); }; NS_DECL_CYCLE_COLLECTING_ISUPPORTS; NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DominatorTree);
--- a/devtools/shared/heapsnapshot/HeapSnapshot.cpp +++ b/devtools/shared/heapsnapshot/HeapSnapshot.cpp @@ -143,17 +143,17 @@ struct GetOrInternStringMatcher explicit GetOrInternStringMatcher(InternedStringSet& strings) : internedStrings(strings) { } const CharT* match(const std::string* str) { MOZ_ASSERT(str); size_t length = str->length() / sizeof(CharT); 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(); } const CharT* match(uint64_t ref) { if (MOZ_LIKELY(ref < internedStrings.length())) { auto& string = internedStrings[ref]; @@ -280,17 +280,17 @@ HeapSnapshot::saveNode(const protobuf::N if (node.ScriptFilenameOrRef_case() != protobuf::Node::SCRIPTFILENAMEORREF_NOT_SET) { Maybe<StringOrRef> scriptFilenameOrRef = GET_STRING_OR_REF(node, scriptfilename); scriptFilename = getOrInternString<char>(internedOneByteStrings, scriptFilenameOrRef); if (NS_WARN_IF(!scriptFilename)) return false; } if (NS_WARN_IF(!nodes.putNew(id, DeserializedNode(id, coarseType, typeName, - size, Move(edges), + size, std::move(edges), allocationStack, jsObjectClassName, scriptFilename, *this)))) { return false; }; return true; @@ -563,17 +563,17 @@ HeapSnapshot::ComputeDominatorTree(Error maybeTree = JS::ubi::DominatorTree::Create(cx, nogc, getRoot()); } if (NS_WARN_IF(maybeTree.isNothing())) { rv.Throw(NS_ERROR_OUT_OF_MEMORY); return nullptr; } - return MakeAndAddRef<DominatorTree>(Move(*maybeTree), this, mParent); + return MakeAndAddRef<DominatorTree>(std::move(*maybeTree), this, mParent); } void HeapSnapshot::ComputeShortestPaths(JSContext*cx, uint64_t start, const Sequence<uint64_t>& targets, uint64_t maxNumPaths, JS::MutableHandleObject results, ErrorResult& rv) @@ -619,17 +619,17 @@ HeapSnapshot::ComputeShortestPaths(JSCon } // Walk the heap graph and find the shortest paths. Maybe<ShortestPaths> maybeShortestPaths; { JS::AutoCheckCannotGC nogc(cx); maybeShortestPaths = ShortestPaths::Create(cx, nogc, maxNumPaths, *startNode, - Move(targetsSet)); + std::move(targetsSet)); } if (NS_WARN_IF(maybeShortestPaths.isNothing())) { rv.Throw(NS_ERROR_OUT_OF_MEMORY); return; } auto& shortestPaths = *maybeShortestPaths; @@ -1027,17 +1027,17 @@ struct TwoByteString::HashPolicy { }; static bool match(const TwoByteString& k, const Lookup& l) { EqualityMatcher eq(l); return k.match(eq); } static void rekey(TwoByteString& k, TwoByteString&& newKey) { - k = Move(newKey); + k = std::move(newKey); } }; // Returns whether `edge` should be included in a heap snapshot of // `compartments`. The optional `policy` out-param is set to INCLUDE_EDGES // if we want to include the referent's edges, or EXCLUDE_EDGES if we don't // want to include them. static bool @@ -1132,17 +1132,17 @@ class MOZ_STACK_CLASS StreamWriter : pub auto stringData = MakeUnique<std::string>(length * sizeof(char16_t), '\0'); if (!stringData) return false; auto buf = const_cast<char16_t*>(reinterpret_cast<const char16_t*>(stringData->data())); 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()); return true; } // Attach the full one-byte string or a reference to a one-byte string that // has already been serialized to a protobuf message. @@ -1298,17 +1298,17 @@ public: protobuf::Edge* protobufEdge = protobufNode.add_edges(); if (NS_WARN_IF(!protobufEdge)) { return false; } 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); }))) { return false; } } }
--- a/devtools/shared/heapsnapshot/tests/gtest/DeserializedNodeUbiNodes.cpp +++ b/devtools/shared/heapsnapshot/tests/gtest/DeserializedNodeUbiNodes.cpp @@ -18,17 +18,17 @@ using testing::ReturnRef; struct MockDeserializedNode : public DeserializedNode { MockDeserializedNode(NodeId id, const char16_t* typeName, uint64_t size) : DeserializedNode(id, typeName, size) { } bool addEdge(DeserializedEdge&& edge) { - return edges.append(Move(edge)); + return edges.append(std::move(edge)); } MOCK_METHOD1(getEdgeReferent, JS::ubi::Node(const DeserializedEdge&)); }; size_t fakeMallocSizeOf(const void*) { EXPECT_TRUE(false); MOZ_ASSERT_UNREACHABLE("fakeMallocSizeOf should never be called because " @@ -62,35 +62,35 @@ DEF_TEST(DeserializedNodeUbiNodes, { EXPECT_EQ(ubi.scriptFilename(), filename); // Test the ubi::Node's edges. UniquePtr<DeserializedNode> referent1(new MockDeserializedNode(1, 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()))); UniquePtr<DeserializedNode> referent2(new MockDeserializedNode(2, 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()))); UniquePtr<DeserializedNode> referent3(new MockDeserializedNode(3, 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()))); auto range = ubi.edges(cx); ASSERT_TRUE(!!range); for ( ; !range->empty(); range->popFront()) {
--- a/devtools/shared/heapsnapshot/tests/gtest/DevTools.h +++ b/devtools/shared/heapsnapshot/tests/gtest/DevTools.h @@ -187,17 +187,17 @@ const char16_t Concrete<FakeNode>::concr void AddEdge(FakeNode& node, FakeNode& referent, const char16_t* edgeName = nullptr) { char16_t* ownedEdgeName = nullptr; if (edgeName) { ownedEdgeName = NS_strdup(edgeName); ASSERT_NE(ownedEdgeName, nullptr); } JS::ubi::Edge edge(ownedEdgeName, &referent); - ASSERT_TRUE(node.edges.append(mozilla::Move(edge))); + ASSERT_TRUE(node.edges.append(std::move(edge))); } // Custom GMock Matchers // Use the testing namespace to avoid static analysis failures in the gmock // matcher classes that get generated from MATCHER_P macros. namespace testing {
--- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -2860,17 +2860,17 @@ nsDocShell::MaybeCreateInitialClientSour } Maybe<ClientInfo> nsDocShell::GetInitialClientInfo() const { if (mInitialClientSource) { Maybe<ClientInfo> result; result.emplace(mInitialClientSource->Info()); - return Move(result); + return std::move(result); } nsGlobalWindowInner* innerWindow = mScriptGlobal ? mScriptGlobal->GetCurrentInnerWindowInternal() : nullptr; nsIDocument* doc = innerWindow ? innerWindow->GetExtantDoc() : nullptr; if (!doc || !doc->IsInitialDocument()) { return Maybe<ClientInfo>(); @@ -5006,17 +5006,17 @@ nsDocShell::Reload(uint32_t aReloadFlags // Stack variables to ensure changes to the member variables don't affect to // the call. nsCOMPtr<nsIURI> currentURI = mCurrentURI; nsCOMPtr<nsIURI> referrerURI = mReferrerURI; uint32_t referrerPolicy = mReferrerPolicy; // Reload always rewrites result principal URI. Maybe<nsCOMPtr<nsIURI>> emplacedResultPrincipalURI; - emplacedResultPrincipalURI.emplace(Move(resultPrincipalURI)); + emplacedResultPrincipalURI.emplace(std::move(resultPrincipalURI)); rv = InternalLoad(currentURI, originalURI, emplacedResultPrincipalURI, loadReplace, referrerURI, referrerPolicy, triggeringPrincipal, triggeringPrincipal, @@ -11091,17 +11091,17 @@ nsDocShell::DoChannelLoad(nsIChannel* aC // Since we are loading a document we need to make sure the proper reserved // and initial client data is stored on the nsILoadInfo. The // ClientChannelHelper does this and ensures that it is propagated properly // on redirects. We pass no reserved client here so that the helper will // 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); rv = aURILoader->OpenURI(aChannel, openFlags, this); NS_ENSURE_SUCCESS(rv, rv); // We're about to load a new page and it may take time before necko @@ -12264,17 +12264,17 @@ nsDocShell::LoadHistoryEntry(nsISHEntry* return NS_ERROR_FAILURE; } // Passing nullptr as aSourceDocShell gives the same behaviour as before // aSourceDocShell was introduced. According to spec we should be passing // 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, loadReplace, referrerURI, referrerPolicy, triggeringPrincipal, principalToInherit, @@ -14062,17 +14062,17 @@ nsDocShell::NotifyJSRunToCompletionStart const uint32_t aLineNumber, JS::Handle<JS::Value> aAsyncStack, const char* aAsyncCause) { // If first start, mark interval start. 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))); } } mJSRunToCompletionDepth++; } @@ -14150,17 +14150,17 @@ nsDocShell::InFrameSwap() shell = shell->GetParentDocshell(); } while (shell); return false; } UniquePtr<ClientSource> nsDocShell::TakeInitialClientSource() { - return Move(mInitialClientSource); + return std::move(mInitialClientSource); } NS_IMETHODIMP nsDocShell::IssueWarning(uint32_t aWarning, bool aAsError) { if (mContentViewer) { nsCOMPtr<nsIDocument> doc = mContentViewer->GetDocument(); if (doc) {
--- a/docshell/base/nsDocShell.h +++ b/docshell/base/nsDocShell.h @@ -315,17 +315,17 @@ public: * docshell is added to the docshell tree, which can affect what the ancestor * principals should look like. * * This method steals the data from the passed-in array. */ void SetAncestorPrincipals( nsTArray<nsCOMPtr<nsIPrincipal>>&& aAncestorPrincipals) { - mAncestorPrincipals = mozilla::Move(aAncestorPrincipals); + mAncestorPrincipals = std::move(aAncestorPrincipals); } /** * Get the list of ancestor outerWindowIDs for this docshell. The list is meant * to be the list of outer window IDs that correspond to the ancestorPrincipals * above. For each ancestor principal, we store the parent window ID. */ const nsTArray<uint64_t>& AncestorOuterWindowIDs() const @@ -337,17 +337,17 @@ public: * Set the list of ancestor outer window IDs for this docshell. We call this * from frameloader as well in order to keep the array matched with the * ancestor principals. * * This method steals the data from the passed-in array. */ void SetAncestorOuterWindowIDs(nsTArray<uint64_t>&& aAncestorOuterWindowIDs) { - mAncestorOuterWindowIDs = mozilla::Move(aAncestorOuterWindowIDs); + mAncestorOuterWindowIDs = std::move(aAncestorOuterWindowIDs); } const mozilla::OriginAttributes& GetOriginAttributes() { return mOriginAttributes; } // Determine whether this docshell corresponds to the given history entry,
--- a/docshell/base/nsDocShellLoadInfo.cpp +++ b/docshell/base/nsDocShellLoadInfo.cpp @@ -36,17 +36,17 @@ GetMaybeResultPrincipalURI(nsIDocShellLo } nsCOMPtr<nsIURI> uri; rv = aLoadInfo->GetResultPrincipalURI(getter_AddRefs(uri)); if (NS_WARN_IF(NS_FAILED(rv))) { return; } - aRPURI.emplace(Move(uri)); + aRPURI.emplace(std::move(uri)); } void SetMaybeResultPrincipalURI(nsIDocShellLoadInfo* aLoadInfo, Maybe<nsCOMPtr<nsIURI>> const& aRPURI) { if (!aLoadInfo) { return; }
--- a/docshell/base/timeline/AutoRestyleTimelineMarker.cpp +++ b/docshell/base/timeline/AutoRestyleTimelineMarker.cpp @@ -27,17 +27,17 @@ AutoRestyleTimelineMarker::AutoRestyleTi } RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get(); if (!timelines || !timelines->HasConsumer(aDocShell)) { return; } mDocShell = aDocShell; - timelines->AddMarkerForDocShell(mDocShell, Move( + timelines->AddMarkerForDocShell(mDocShell, std::move( MakeUnique<RestyleTimelineMarker>( mIsAnimationOnly, MarkerTracingType::START))); } AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker() { MOZ_ASSERT(NS_IsMainThread()); @@ -46,15 +46,15 @@ AutoRestyleTimelineMarker::~AutoRestyleT return; } RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get(); if (!timelines || !timelines->HasConsumer(mDocShell)) { return; } - timelines->AddMarkerForDocShell(mDocShell, Move( + timelines->AddMarkerForDocShell(mDocShell, std::move( MakeUnique<RestyleTimelineMarker>( mIsAnimationOnly, MarkerTracingType::END))); } } // namespace mozilla
--- a/docshell/base/timeline/ObservedDocShell.cpp +++ b/docshell/base/timeline/ObservedDocShell.cpp @@ -27,30 +27,30 @@ ObservedDocShell::AddMarker(UniquePtr<Ab { // Only allow main thread markers to go into this list. No need to lock // here since `mTimelineMarkers` will only be accessed or modified on the // main thread only. MOZ_ASSERT(NS_IsMainThread()); // Don't accept any markers generated by the process of popping // markers. if (!mPopping) { - mTimelineMarkers.AppendElement(Move(aMarker)); + mTimelineMarkers.AppendElement(std::move(aMarker)); } } void ObservedDocShell::AddOTMTMarker(UniquePtr<AbstractTimelineMarker>&& aMarker) { // Only allow off the main thread markers to go into this list. Since most // of our markers come from the main thread, be a little more efficient and // avoid dealing with multithreading scenarios until all the markers are // 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 ObservedDocShell::ClearMarkers() { MOZ_ASSERT(NS_IsMainThread()); MutexAutoLock lock(GetLock()); // for `mOffTheMainThreadTimelineMarkers`. mTimelineMarkers.Clear(); @@ -66,17 +66,17 @@ ObservedDocShell::PopMarkers(JSContext* MOZ_RELEASE_ASSERT(!mPopping); AutoRestore<bool> resetPopping(mPopping); mPopping = true; // 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. nsTArray<UniquePtr<AbstractTimelineMarker>> keptStartMarkers; for (uint32_t i = 0; i < mTimelineMarkers.Length(); ++i) { UniquePtr<AbstractTimelineMarker>& startPayload = mTimelineMarkers.ElementAt(i); @@ -153,17 +153,17 @@ ObservedDocShell::PopMarkers(JSContext* } hasSeenEnd = true; break; } } // 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; } } } mTimelineMarkers.SwapElements(keptStartMarkers); }
--- a/docshell/base/timeline/TimelineConsumers.cpp +++ b/docshell/base/timeline/TimelineConsumers.cpp @@ -180,40 +180,40 @@ TimelineConsumers::IsEmpty() void TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell, const char* aName, MarkerTracingType aTracingType, MarkerStackRequest aStackRequest) { 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))); } } void TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell, const char* aName, const TimeStamp& aTime, MarkerTracingType aTracingType, MarkerStackRequest aStackRequest) { 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))); } } void TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell, UniquePtr<AbstractTimelineMarker>&& aMarker) { MOZ_ASSERT(NS_IsMainThread()); if (HasConsumer(aDocShell)) { - aDocShell->mObserved->AddMarker(Move(aMarker)); + aDocShell->mObserved->AddMarker(std::move(aMarker)); } } void TimelineConsumers::AddMarkerForDocShell(nsIDocShell* aDocShell, const char* aName, MarkerTracingType aTracingType, MarkerStackRequest aStackRequest) @@ -233,36 +233,36 @@ TimelineConsumers::AddMarkerForDocShell( AddMarkerForDocShell(static_cast<nsDocShell*>(aDocShell), aName, aTime, aTracingType, aStackRequest); } void 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 TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName, MarkerTracingType aTracingType, MarkerStackRequest aStackRequest /* = STACK */) { bool isMainThread = NS_IsMainThread(); StaticMutexAutoLock lock(sMutex); // for `mMarkersStores`. for (MarkersStorage* storage = mMarkersStores.getFirst(); storage != nullptr; storage = storage->getNext()) { 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)); } } } void TimelineConsumers::AddMarkerForAllObservedDocShells(const char* aName, const TimeStamp& aTime, MarkerTracingType aTracingType, @@ -272,37 +272,37 @@ TimelineConsumers::AddMarkerForAllObserv StaticMutexAutoLock lock(sMutex); // for `mMarkersStores`. for (MarkersStorage* storage = mMarkersStores.getFirst(); storage != nullptr; storage = storage->getNext()) { 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)); } } } void TimelineConsumers::AddMarkerForAllObservedDocShells(UniquePtr<AbstractTimelineMarker>& aMarker) { bool isMainThread = NS_IsMainThread(); StaticMutexAutoLock lock(sMutex); // for `mMarkersStores`. for (MarkersStorage* storage = mMarkersStores.getFirst(); storage != nullptr; storage = storage->getNext()) { UniquePtr<AbstractTimelineMarker> clone = aMarker->Clone(); if (isMainThread) {