mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO --HG-- extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
This commit is contained in:
parent
835f7407b3
commit
8d9dc85cd4
@ -78,7 +78,7 @@ ProxyAccessible::RelationByType(RelationType aType) const
|
|||||||
if (ProxyAccessible* proxy = mDoc->GetAccessible(targetIDs[i]))
|
if (ProxyAccessible* proxy = mDoc->GetAccessible(targetIDs[i]))
|
||||||
targets.AppendElement(proxy);
|
targets.AppendElement(proxy);
|
||||||
|
|
||||||
return std::move(targets);
|
return targets;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -87,8 +87,8 @@ class DeserializedEdgeRange : public EdgeRange
|
|||||||
|
|
||||||
auto& edge = node->edges[i];
|
auto& edge = node->edges[i];
|
||||||
auto referent = node->getEdgeReferent(edge);
|
auto referent = node->getEdgeReferent(edge);
|
||||||
currentEdge = std::move(Edge(edge.name ? NS_strdup(edge.name) : nullptr,
|
currentEdge = Edge(edge.name
|
||||||
referent));
|
? NS_strdup(edge.name) : nullptr, referent);
|
||||||
front_ = ¤tEdge;
|
front_ = ¤tEdge;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2865,7 +2865,7 @@ nsDocShell::GetInitialClientInfo() const
|
|||||||
if (mInitialClientSource) {
|
if (mInitialClientSource) {
|
||||||
Maybe<ClientInfo> result;
|
Maybe<ClientInfo> result;
|
||||||
result.emplace(mInitialClientSource->Info());
|
result.emplace(mInitialClientSource->Info());
|
||||||
return std::move(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsGlobalWindowInner* innerWindow =
|
nsGlobalWindowInner* innerWindow =
|
||||||
@ -14067,10 +14067,10 @@ nsDocShell::NotifyJSRunToCompletionStart(const char* aReason,
|
|||||||
if (mJSRunToCompletionDepth == 0) {
|
if (mJSRunToCompletionDepth == 0) {
|
||||||
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
||||||
if (timelines && timelines->HasConsumer(this)) {
|
if (timelines && timelines->HasConsumer(this)) {
|
||||||
timelines->AddMarkerForDocShell(this, std::move(
|
timelines->AddMarkerForDocShell(this,
|
||||||
mozilla::MakeUnique<JavascriptTimelineMarker>(
|
mozilla::MakeUnique<JavascriptTimelineMarker>(
|
||||||
aReason, aFunctionName, aFilename, aLineNumber, MarkerTracingType::START,
|
aReason, aFunctionName, aFilename, aLineNumber, MarkerTracingType::START,
|
||||||
aAsyncStack, aAsyncCause)));
|
aAsyncStack, aAsyncCause));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,10 +32,10 @@ AutoRestyleTimelineMarker::AutoRestyleTimelineMarker(
|
|||||||
}
|
}
|
||||||
|
|
||||||
mDocShell = aDocShell;
|
mDocShell = aDocShell;
|
||||||
timelines->AddMarkerForDocShell(mDocShell, std::move(
|
timelines->AddMarkerForDocShell(mDocShell,
|
||||||
MakeUnique<RestyleTimelineMarker>(
|
MakeUnique<RestyleTimelineMarker>(
|
||||||
mIsAnimationOnly,
|
mIsAnimationOnly,
|
||||||
MarkerTracingType::START)));
|
MarkerTracingType::START));
|
||||||
}
|
}
|
||||||
|
|
||||||
AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker()
|
AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker()
|
||||||
@ -51,10 +51,10 @@ AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
timelines->AddMarkerForDocShell(mDocShell, std::move(
|
timelines->AddMarkerForDocShell(mDocShell,
|
||||||
MakeUnique<RestyleTimelineMarker>(
|
MakeUnique<RestyleTimelineMarker>(
|
||||||
mIsAnimationOnly,
|
mIsAnimationOnly,
|
||||||
MarkerTracingType::END)));
|
MarkerTracingType::END));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
@ -185,7 +185,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
if (HasConsumer(aDocShell)) {
|
if (HasConsumer(aDocShell)) {
|
||||||
aDocShell->mObserved->AddMarker(std::move(MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest)));
|
aDocShell->mObserved->AddMarker(MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
if (HasConsumer(aDocShell)) {
|
if (HasConsumer(aDocShell)) {
|
||||||
aDocShell->mObserved->AddMarker(std::move(MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest)));
|
aDocShell->mObserved->AddMarker(MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ public:
|
|||||||
public:
|
public:
|
||||||
explicit Iterator(EffectSet& aEffectSet)
|
explicit Iterator(EffectSet& aEffectSet)
|
||||||
: mEffectSet(aEffectSet)
|
: mEffectSet(aEffectSet)
|
||||||
, mHashIterator(std::move(aEffectSet.mEffects.Iter()))
|
, mHashIterator(aEffectSet.mEffects.Iter())
|
||||||
, mIsEndIterator(false)
|
, mIsEndIterator(false)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -493,7 +493,7 @@ CustomElementRegistry::CreateCustomElementCallback(
|
|||||||
if (aAdoptedCallbackArgs) {
|
if (aAdoptedCallbackArgs) {
|
||||||
callback->SetAdoptedCallbackArgs(*aAdoptedCallbackArgs);
|
callback->SetAdoptedCallbackArgs(*aAdoptedCallbackArgs);
|
||||||
}
|
}
|
||||||
return std::move(callback);
|
return callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
|
@ -432,7 +432,7 @@ nsContentPermissionUtils::GetContentPermissionRequestParentById(const TabId& aTa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(parentArray);
|
return parentArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
@ -455,7 +455,7 @@ nsContentPermissionUtils::GetContentPermissionRequestChildById(const TabId& aTab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(childArray);
|
return childArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ void
|
/* static */ void
|
||||||
|
@ -5565,9 +5565,9 @@ nsIDocument::GetClientInfo() const
|
|||||||
{
|
{
|
||||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||||
if (inner) {
|
if (inner) {
|
||||||
return std::move(inner->GetClientInfo());
|
return inner->GetClientInfo();
|
||||||
}
|
}
|
||||||
return std::move(Maybe<ClientInfo>());
|
return Maybe<ClientInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ClientState>
|
Maybe<ClientState>
|
||||||
@ -5575,9 +5575,9 @@ nsIDocument::GetClientState() const
|
|||||||
{
|
{
|
||||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||||
if (inner) {
|
if (inner) {
|
||||||
return std::move(inner->GetClientState());
|
return inner->GetClientState();
|
||||||
}
|
}
|
||||||
return std::move(Maybe<ClientState>());
|
return Maybe<ClientState>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ServiceWorkerDescriptor>
|
Maybe<ServiceWorkerDescriptor>
|
||||||
@ -5585,9 +5585,9 @@ nsIDocument::GetController() const
|
|||||||
{
|
{
|
||||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||||
if (inner) {
|
if (inner) {
|
||||||
return std::move(inner->GetController());
|
return inner->GetController();
|
||||||
}
|
}
|
||||||
return std::move(Maybe<ServiceWorkerDescriptor>());
|
return Maybe<ServiceWorkerDescriptor>();
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -2320,25 +2320,25 @@ nsPIDOMWindowInner::SyncStateFromParentWindow()
|
|||||||
Maybe<ClientInfo>
|
Maybe<ClientInfo>
|
||||||
nsPIDOMWindowInner::GetClientInfo() const
|
nsPIDOMWindowInner::GetClientInfo() const
|
||||||
{
|
{
|
||||||
return std::move(nsGlobalWindowInner::Cast(this)->GetClientInfo());
|
return nsGlobalWindowInner::Cast(this)->GetClientInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ClientState>
|
Maybe<ClientState>
|
||||||
nsPIDOMWindowInner::GetClientState() const
|
nsPIDOMWindowInner::GetClientState() const
|
||||||
{
|
{
|
||||||
return std::move(nsGlobalWindowInner::Cast(this)->GetClientState());
|
return nsGlobalWindowInner::Cast(this)->GetClientState();
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ServiceWorkerDescriptor>
|
Maybe<ServiceWorkerDescriptor>
|
||||||
nsPIDOMWindowInner::GetController() const
|
nsPIDOMWindowInner::GetController() const
|
||||||
{
|
{
|
||||||
return std::move(nsGlobalWindowInner::Cast(this)->GetController());
|
return nsGlobalWindowInner::Cast(this)->GetController();
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<mozilla::dom::ServiceWorker>
|
RefPtr<mozilla::dom::ServiceWorker>
|
||||||
nsPIDOMWindowInner::GetOrCreateServiceWorker(const mozilla::dom::ServiceWorkerDescriptor& aDescriptor)
|
nsPIDOMWindowInner::GetOrCreateServiceWorker(const mozilla::dom::ServiceWorkerDescriptor& aDescriptor)
|
||||||
{
|
{
|
||||||
return std::move(nsGlobalWindowInner::Cast(this)->GetOrCreateServiceWorker(aDescriptor));
|
return nsGlobalWindowInner::Cast(this)->GetOrCreateServiceWorker(aDescriptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -5498,7 +5498,7 @@ nsGlobalWindowInner::ShowSlowScriptDialog(const nsString& aAddonId)
|
|||||||
|
|
||||||
// GetStringFromName can return NS_OK and still give nullptr string
|
// GetStringFromName can return NS_OK and still give nullptr string
|
||||||
failed = failed || NS_FAILED(rv) || result.IsEmpty();
|
failed = failed || NS_FAILED(rv) || result.IsEmpty();
|
||||||
return std::move(result);
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool isAddonScript = !aAddonId.IsEmpty();
|
bool isAddonScript = !aAddonId.IsEmpty();
|
||||||
@ -6329,7 +6329,7 @@ nsGlobalWindowInner::GetClientInfo() const
|
|||||||
if (mClientSource) {
|
if (mClientSource) {
|
||||||
clientInfo.emplace(mClientSource->Info());
|
clientInfo.emplace(mClientSource->Info());
|
||||||
}
|
}
|
||||||
return std::move(clientInfo);
|
return clientInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ClientState>
|
Maybe<ClientState>
|
||||||
@ -6344,7 +6344,7 @@ nsGlobalWindowInner::GetClientState() const
|
|||||||
clientState.emplace(state);
|
clientState.emplace(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return std::move(clientState);
|
return clientState;
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ServiceWorkerDescriptor>
|
Maybe<ServiceWorkerDescriptor>
|
||||||
@ -6355,7 +6355,7 @@ nsGlobalWindowInner::GetController() const
|
|||||||
if (mClientSource) {
|
if (mClientSource) {
|
||||||
controller = mClientSource->GetController();
|
controller = mClientSource->GetController();
|
||||||
}
|
}
|
||||||
return std::move(controller);
|
return controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<ServiceWorker>
|
RefPtr<ServiceWorker>
|
||||||
|
@ -804,7 +804,7 @@ ImageBitmap::ToCloneData() const
|
|||||||
result->mSurface = surface->GetDataSurface();
|
result->mSurface = surface->GetDataSurface();
|
||||||
MOZ_ASSERT(result->mSurface);
|
MOZ_ASSERT(result->mSurface);
|
||||||
|
|
||||||
return std::move(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ already_AddRefed<ImageBitmap>
|
/* static */ already_AddRefed<ImageBitmap>
|
||||||
|
@ -827,7 +827,7 @@ FormatUsageAuthority::CreateForWebGL1(gl::GLContext* gl)
|
|||||||
if (!AddUnsizedFormats(ptr, gl))
|
if (!AddUnsizedFormats(ptr, gl))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
UniquePtr<FormatUsageAuthority>
|
UniquePtr<FormatUsageAuthority>
|
||||||
@ -1062,7 +1062,7 @@ FormatUsageAuthority::CreateForWebGL2(gl::GLContext* gl)
|
|||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -227,7 +227,7 @@ FromImageBitmap(WebGLContext* webgl, const char* funcName, TexImageTarget target
|
|||||||
uint32_t width, uint32_t height, uint32_t depth,
|
uint32_t width, uint32_t height, uint32_t depth,
|
||||||
const dom::ImageBitmap& imageBitmap)
|
const dom::ImageBitmap& imageBitmap)
|
||||||
{
|
{
|
||||||
UniquePtr<dom::ImageBitmapCloneData> cloneData = std::move(imageBitmap.ToCloneData());
|
UniquePtr<dom::ImageBitmapCloneData> cloneData = imageBitmap.ToCloneData();
|
||||||
if (!cloneData) {
|
if (!cloneData) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
@ -460,7 +460,7 @@ ValidateTexOrSubImage(WebGLContext* webgl, const char* funcName, TexImageTarget
|
|||||||
if (!blob || !blob->Validate(webgl, funcName, pi))
|
if (!blob || !blob->Validate(webgl, funcName, pi))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
return std::move(blob);
|
return blob;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -203,7 +203,7 @@ ClientHandle::OnDetach()
|
|||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<GenericPromise> ref(mDetachPromise);
|
RefPtr<GenericPromise> ref(mDetachPromise);
|
||||||
return std::move(ref);
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
|
@ -145,7 +145,7 @@ ClientInfo::GetPrincipal() const
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
nsCOMPtr<nsIPrincipal> ref = PrincipalInfoToPrincipal(PrincipalInfo());
|
nsCOMPtr<nsIPrincipal> ref = PrincipalInfoToPrincipal(PrincipalInfo());
|
||||||
return std::move(ref);
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dom
|
} // namespace dom
|
||||||
|
@ -136,7 +136,7 @@ ClientManager::CreateSourceInternal(ClientType aType,
|
|||||||
ClientSourceConstructorArgs args(id, aType, aPrincipal, TimeStamp::Now());
|
ClientSourceConstructorArgs args(id, aType, aPrincipal, TimeStamp::Now());
|
||||||
UniquePtr<ClientSource> source(new ClientSource(this, aEventTarget, args));
|
UniquePtr<ClientSource> source(new ClientSource(this, aEventTarget, args));
|
||||||
source->Shutdown();
|
source->Shutdown();
|
||||||
return std::move(source);
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientSourceConstructorArgs args(id, aType, aPrincipal, TimeStamp::Now());
|
ClientSourceConstructorArgs args(id, aType, aPrincipal, TimeStamp::Now());
|
||||||
@ -144,12 +144,12 @@ ClientManager::CreateSourceInternal(ClientType aType,
|
|||||||
|
|
||||||
if (IsShutdown()) {
|
if (IsShutdown()) {
|
||||||
source->Shutdown();
|
source->Shutdown();
|
||||||
return std::move(source);
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
source->Activate(GetActor());
|
source->Activate(GetActor());
|
||||||
|
|
||||||
return std::move(source);
|
return source;
|
||||||
}
|
}
|
||||||
|
|
||||||
already_AddRefed<ClientHandle>
|
already_AddRefed<ClientHandle>
|
||||||
|
@ -438,8 +438,8 @@ ClientManagerService::MatchAll(const ClientMatchAllArgs& aArgs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
promiseList->AddPromise(
|
promiseList->AddPromise(
|
||||||
source->StartOp(std::move(ClientGetInfoAndStateArgs(source->Info().Id(),
|
source->StartOp(ClientGetInfoAndStateArgs(source->Info().Id(),
|
||||||
source->Info().PrincipalInfo()))));
|
source->Info().PrincipalInfo())));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maybe finish the promise now in case we didn't find any matching clients.
|
// Maybe finish the promise now in case we didn't find any matching clients.
|
||||||
|
@ -2887,8 +2887,8 @@ Console::MonotonicTimer(JSContext* aCx, MethodName aMethodName,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
timelines->AddMarkerForDocShell(docShell, std::move(
|
timelines->AddMarkerForDocShell(docShell,
|
||||||
MakeUnique<TimestampTimelineMarker>(key)));
|
MakeUnique<TimestampTimelineMarker>(key));
|
||||||
}
|
}
|
||||||
// For `console.time(foo)` and `console.timeEnd(foo)`.
|
// For `console.time(foo)` and `console.timeEnd(foo)`.
|
||||||
else if (isTimelineRecording && aData.Length() == 1) {
|
else if (isTimelineRecording && aData.Length() == 1) {
|
||||||
@ -2903,10 +2903,10 @@ Console::MonotonicTimer(JSContext* aCx, MethodName aMethodName,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
timelines->AddMarkerForDocShell(docShell, std::move(
|
timelines->AddMarkerForDocShell(docShell,
|
||||||
MakeUnique<ConsoleTimelineMarker>(
|
MakeUnique<ConsoleTimelineMarker>(
|
||||||
key, aMethodName == MethodTime ? MarkerTracingType::START
|
key, aMethodName == MethodTime ? MarkerTracingType::START
|
||||||
: MarkerTracingType::END)));
|
: MarkerTracingType::END));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -1245,9 +1245,9 @@ EventListenerManager::HandleEventInternal(nsPresContext* aPresContext,
|
|||||||
nsAutoString typeStr;
|
nsAutoString typeStr;
|
||||||
(*aDOMEvent)->GetType(typeStr);
|
(*aDOMEvent)->GetType(typeStr);
|
||||||
uint16_t phase = (*aDOMEvent)->EventPhase();
|
uint16_t phase = (*aDOMEvent)->EventPhase();
|
||||||
timelines->AddMarkerForDocShell(docShell, std::move(
|
timelines->AddMarkerForDocShell(docShell,
|
||||||
MakeUnique<EventTimelineMarker>(
|
MakeUnique<EventTimelineMarker>(
|
||||||
typeStr, phase, MarkerTracingType::START)));
|
typeStr, phase, MarkerTracingType::START));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -546,7 +546,7 @@ private:
|
|||||||
nsresult rv = svc->GetXpcomWillShutdown(getter_AddRefs(phase));
|
nsresult rv = svc->GetXpcomWillShutdown(getter_AddRefs(phase));
|
||||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||||
|
|
||||||
return std::move(phase);
|
return phase;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCString mURI;
|
nsCString mURI;
|
||||||
|
@ -1164,7 +1164,7 @@ Geolocation::GetCurrentPosition(PositionCallback& aCallback,
|
|||||||
{
|
{
|
||||||
nsresult rv = GetCurrentPosition(GeoPositionCallback(&aCallback),
|
nsresult rv = GetCurrentPosition(GeoPositionCallback(&aCallback),
|
||||||
GeoPositionErrorCallback(aErrorCallback),
|
GeoPositionErrorCallback(aErrorCallback),
|
||||||
std::move(CreatePositionOptionsCopy(aOptions)),
|
CreatePositionOptionsCopy(aOptions),
|
||||||
aCallerType);
|
aCallerType);
|
||||||
|
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
@ -1242,7 +1242,7 @@ Geolocation::WatchPosition(PositionCallback& aCallback,
|
|||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
nsresult rv = WatchPosition(GeoPositionCallback(&aCallback),
|
nsresult rv = WatchPosition(GeoPositionCallback(&aCallback),
|
||||||
GeoPositionErrorCallback(aErrorCallback),
|
GeoPositionErrorCallback(aErrorCallback),
|
||||||
std::move(CreatePositionOptionsCopy(aOptions)),
|
CreatePositionOptionsCopy(aOptions),
|
||||||
aCallerType,
|
aCallerType,
|
||||||
&ret);
|
&ret);
|
||||||
|
|
||||||
|
@ -4469,8 +4469,8 @@ ContentParent::RecvNotifyTabDestroying(const TabId& aTabId,
|
|||||||
nsTArray<TabContext>
|
nsTArray<TabContext>
|
||||||
ContentParent::GetManagedTabContext()
|
ContentParent::GetManagedTabContext()
|
||||||
{
|
{
|
||||||
return std::move(ContentProcessManager::GetSingleton()->
|
return ContentProcessManager::GetSingleton()->
|
||||||
GetTabContextByContentProcess(this->ChildID()));
|
GetTabContextByContentProcess(this->ChildID());
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::docshell::POfflineCacheUpdateParent*
|
mozilla::docshell::POfflineCacheUpdateParent*
|
||||||
|
@ -125,7 +125,7 @@ ContentProcessManager::GetAllChildProcessById(const ContentParentId& aParentCpId
|
|||||||
auto iter = mContentParentMap.find(aParentCpId);
|
auto iter = mContentParentMap.find(aParentCpId);
|
||||||
if (NS_WARN_IF(iter == mContentParentMap.end())) {
|
if (NS_WARN_IF(iter == mContentParentMap.end())) {
|
||||||
ASSERT_UNLESS_FUZZING();
|
ASSERT_UNLESS_FUZZING();
|
||||||
return std::move(cpIdArray);
|
return cpIdArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto cpIter = iter->second.mChildrenCpId.begin();
|
for (auto cpIter = iter->second.mChildrenCpId.begin();
|
||||||
@ -134,7 +134,7 @@ ContentProcessManager::GetAllChildProcessById(const ContentParentId& aParentCpId
|
|||||||
cpIdArray.AppendElement(*cpIter);
|
cpIdArray.AppendElement(*cpIter);
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(cpIdArray);
|
return cpIdArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -236,7 +236,7 @@ ContentProcessManager::GetTabContextByContentProcess(const ContentParentId& aChi
|
|||||||
auto iter = mContentParentMap.find(aChildCpId);
|
auto iter = mContentParentMap.find(aChildCpId);
|
||||||
if (NS_WARN_IF(iter == mContentParentMap.end())) {
|
if (NS_WARN_IF(iter == mContentParentMap.end())) {
|
||||||
ASSERT_UNLESS_FUZZING();
|
ASSERT_UNLESS_FUZZING();
|
||||||
return std::move(tabContextArray);
|
return tabContextArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto remoteFrameIter = iter->second.mRemoteFrames.begin();
|
for (auto remoteFrameIter = iter->second.mRemoteFrames.begin();
|
||||||
@ -245,7 +245,7 @@ ContentProcessManager::GetTabContextByContentProcess(const ContentParentId& aChi
|
|||||||
tabContextArray.AppendElement(remoteFrameIter->second.mContext);
|
tabContextArray.AppendElement(remoteFrameIter->second.mContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(tabContextArray);
|
return tabContextArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -337,7 +337,7 @@ ContentProcessManager::GetTabParentsByProcessId(const ContentParentId& aChildCpI
|
|||||||
auto iter = mContentParentMap.find(aChildCpId);
|
auto iter = mContentParentMap.find(aChildCpId);
|
||||||
if (NS_WARN_IF(iter == mContentParentMap.end())) {
|
if (NS_WARN_IF(iter == mContentParentMap.end())) {
|
||||||
ASSERT_UNLESS_FUZZING();
|
ASSERT_UNLESS_FUZZING();
|
||||||
return std::move(tabIdList);
|
return tabIdList;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto remoteFrameIter = iter->second.mRemoteFrames.begin();
|
for (auto remoteFrameIter = iter->second.mRemoteFrames.begin();
|
||||||
@ -346,7 +346,7 @@ ContentProcessManager::GetTabParentsByProcessId(const ContentParentId& aChildCpI
|
|||||||
tabIdList.AppendElement(remoteFrameIter->first);
|
tabIdList.AppendElement(remoteFrameIter->first);
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(tabIdList);
|
return tabIdList;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
|
@ -2592,7 +2592,7 @@ MediaStream::SetTrackEnabledImpl(TrackID aTrackID, DisabledTrackMode aMode)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mDisabledTracks.AppendElement(std::move(DisabledTrack(aTrackID, aMode)));
|
mDisabledTracks.AppendElement(DisabledTrack(aTrackID, aMode));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -764,7 +764,7 @@ GetSupportedCapabilities(
|
|||||||
// Note: omitting steps 3.13.2, our robustness is not sophisticated enough
|
// Note: omitting steps 3.13.2, our robustness is not sophisticated enough
|
||||||
// to require considering all requirements together.
|
// to require considering all requirements together.
|
||||||
}
|
}
|
||||||
return std::move(supportedCapabilities);
|
return supportedCapabilities;
|
||||||
}
|
}
|
||||||
|
|
||||||
// "Get Supported Configuration and Consent" algorithm, steps 4-7 for
|
// "Get Supported Configuration and Consent" algorithm, steps 4-7 for
|
||||||
|
@ -1078,7 +1078,7 @@ ChromiumCDMParent::RecvDrainComplete()
|
|||||||
|
|
||||||
MediaDataDecoder::DecodedData samples;
|
MediaDataDecoder::DecodedData samples;
|
||||||
while (!mReorderQueue.IsEmpty()) {
|
while (!mReorderQueue.IsEmpty()) {
|
||||||
samples.AppendElement(std::move(mReorderQueue.Pop()));
|
samples.AppendElement(mReorderQueue.Pop());
|
||||||
}
|
}
|
||||||
|
|
||||||
mDecodePromise.ResolveIfExists(std::move(samples), __func__);
|
mDecodePromise.ResolveIfExists(std::move(samples), __func__);
|
||||||
|
@ -946,7 +946,7 @@ already_AddRefed<GMPContentParent>
|
|||||||
GMPParent::ForgetGMPContentParent()
|
GMPParent::ForgetGMPContentParent()
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(mGetContentParentPromises.IsEmpty());
|
MOZ_ASSERT(mGetContentParentPromises.IsEmpty());
|
||||||
return std::move(mGMPContentParent.forget());
|
return mGMPContentParent.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -1885,7 +1885,7 @@ GMPServiceParent::ActorDestroy(ActorDestroyReason aWhy)
|
|||||||
&GMPServiceParent::CloseTransport,
|
&GMPServiceParent::CloseTransport,
|
||||||
&monitor,
|
&monitor,
|
||||||
&completed);
|
&completed);
|
||||||
XRE_GetIOMessageLoop()->PostTask(std::move(task.forget()));
|
XRE_GetIOMessageLoop()->PostTask(task.forget());
|
||||||
|
|
||||||
while (!completed) {
|
while (!completed) {
|
||||||
lock.Wait();
|
lock.Wait();
|
||||||
|
@ -26,7 +26,7 @@ ToArray(const uint8_t* aData, uint32_t aDataSize)
|
|||||||
{
|
{
|
||||||
nsTArray<uint8_t> data;
|
nsTArray<uint8_t> data;
|
||||||
data.AppendElements(aData, aDataSize);
|
data.AppendElements(aData, aDataSize);
|
||||||
return std::move(data);
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
@ -44,7 +44,7 @@ VideoDecoderManagerParent::StoreImage(Image* aImage, TextureClient* aTexture)
|
|||||||
|
|
||||||
mImageMap[ret.handle()] = aImage;
|
mImageMap[ret.handle()] = aImage;
|
||||||
mTextureMap[ret.handle()] = aTexture;
|
mTextureMap[ret.handle()] = aTexture;
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
StaticRefPtr<nsIThread> sVideoDecoderManagerThread;
|
StaticRefPtr<nsIThread> sVideoDecoderManagerThread;
|
||||||
|
@ -257,7 +257,7 @@ AppleVTDecoder::ProcessDrain()
|
|||||||
MonitorAutoLock mon(mMonitor);
|
MonitorAutoLock mon(mMonitor);
|
||||||
DecodedData samples;
|
DecodedData samples;
|
||||||
while (!mReorderQueue.IsEmpty()) {
|
while (!mReorderQueue.IsEmpty()) {
|
||||||
samples.AppendElement(std::move(mReorderQueue.Pop()));
|
samples.AppendElement(mReorderQueue.Pop());
|
||||||
}
|
}
|
||||||
return DecodePromise::CreateAndResolve(std::move(samples), __func__);
|
return DecodePromise::CreateAndResolve(std::move(samples), __func__);
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ ConfigForMime(const nsACString& aMimeType)
|
|||||||
conf.reset(new OmxAmrConfig<OmxAmrSampleRate::kWideBand>());
|
conf.reset(new OmxAmrConfig<OmxAmrSampleRate::kWideBand>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return std::move(conf);
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
// There should be a better way to calculate it.
|
// There should be a better way to calculate it.
|
||||||
@ -231,7 +231,7 @@ ConfigForMime(const nsACString& aMimeType)
|
|||||||
if (OmxPlatformLayer::SupportsMimeType(aMimeType)) {
|
if (OmxPlatformLayer::SupportsMimeType(aMimeType)) {
|
||||||
conf.reset(new OmxCommonVideoConfig());
|
conf.reset(new OmxCommonVideoConfig());
|
||||||
}
|
}
|
||||||
return std::move(conf);
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
OMX_ERRORTYPE
|
OMX_ERRORTYPE
|
||||||
|
@ -103,7 +103,7 @@ ServiceWorkerDescriptor::GetPrincipal() const
|
|||||||
{
|
{
|
||||||
AssertIsOnMainThread();
|
AssertIsOnMainThread();
|
||||||
nsCOMPtr<nsIPrincipal> ref = PrincipalInfoToPrincipal(mData->principalInfo());
|
nsCOMPtr<nsIPrincipal> ref = PrincipalInfoToPrincipal(mData->principalInfo());
|
||||||
return std::move(ref);
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
const nsCString&
|
const nsCString&
|
||||||
|
@ -324,7 +324,7 @@ ServiceWorkerManager::StartControllingClient(const ClientInfo& aClientInfo,
|
|||||||
RefPtr<ServiceWorkerRegistrationInfo> old =
|
RefPtr<ServiceWorkerRegistrationInfo> old =
|
||||||
entry.Data()->mRegistrationInfo.forget();
|
entry.Data()->mRegistrationInfo.forget();
|
||||||
|
|
||||||
ref = std::move(entry.Data()->mClientHandle->Control(active));
|
ref = entry.Data()->mClientHandle->Control(active);
|
||||||
entry.Data()->mRegistrationInfo = aRegistrationInfo;
|
entry.Data()->mRegistrationInfo = aRegistrationInfo;
|
||||||
|
|
||||||
if (old != aRegistrationInfo) {
|
if (old != aRegistrationInfo) {
|
||||||
@ -334,14 +334,14 @@ ServiceWorkerManager::StartControllingClient(const ClientInfo& aClientInfo,
|
|||||||
|
|
||||||
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1);
|
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1);
|
||||||
|
|
||||||
return std::move(ref);
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<ClientHandle> clientHandle =
|
RefPtr<ClientHandle> clientHandle =
|
||||||
ClientManager::CreateHandle(aClientInfo,
|
ClientManager::CreateHandle(aClientInfo,
|
||||||
SystemGroup::EventTargetFor(TaskCategory::Other));
|
SystemGroup::EventTargetFor(TaskCategory::Other));
|
||||||
|
|
||||||
ref = std::move(clientHandle->Control(active));
|
ref = clientHandle->Control(active);
|
||||||
|
|
||||||
aRegistrationInfo->StartControllingClient();
|
aRegistrationInfo->StartControllingClient();
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ ServiceWorkerManager::StartControllingClient(const ClientInfo& aClientInfo,
|
|||||||
|
|
||||||
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1);
|
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1);
|
||||||
|
|
||||||
return std::move(ref);
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1281,7 +1281,7 @@ ServiceWorkerRegistrar::GetShutdownPhase() const
|
|||||||
nsCOMPtr<nsIAsyncShutdownClient> client;
|
nsCOMPtr<nsIAsyncShutdownClient> client;
|
||||||
rv = svc->GetProfileBeforeChange(getter_AddRefs(client));
|
rv = svc->GetProfileBeforeChange(getter_AddRefs(client));
|
||||||
RELEASE_ASSERT_SUCCEEDED(rv, "profileBeforeChange shutdown blocker");
|
RELEASE_ASSERT_SUCCEEDED(rv, "profileBeforeChange shutdown blocker");
|
||||||
return std::move(client);
|
return client;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef RELEASE_ASSERT_SUCCEEDED
|
#undef RELEASE_ASSERT_SUCCEEDED
|
||||||
|
@ -27,7 +27,7 @@ ServiceWorkerRegistrationDescriptor::NewestInternal() const
|
|||||||
} else if (mData->active().type() != OptionalIPCServiceWorkerDescriptor::Tvoid_t) {
|
} else if (mData->active().type() != OptionalIPCServiceWorkerDescriptor::Tvoid_t) {
|
||||||
result.emplace(mData->active().get_IPCServiceWorkerDescriptor());
|
result.emplace(mData->active().get_IPCServiceWorkerDescriptor());
|
||||||
}
|
}
|
||||||
return std::move(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceWorkerRegistrationDescriptor::ServiceWorkerRegistrationDescriptor(
|
ServiceWorkerRegistrationDescriptor::ServiceWorkerRegistrationDescriptor(
|
||||||
@ -138,7 +138,7 @@ ServiceWorkerRegistrationDescriptor::GetPrincipal() const
|
|||||||
{
|
{
|
||||||
AssertIsOnMainThread();
|
AssertIsOnMainThread();
|
||||||
nsCOMPtr<nsIPrincipal> ref = PrincipalInfoToPrincipal(mData->principalInfo());
|
nsCOMPtr<nsIPrincipal> ref = PrincipalInfoToPrincipal(mData->principalInfo());
|
||||||
return std::move(ref);
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
const nsCString&
|
const nsCString&
|
||||||
@ -157,7 +157,7 @@ ServiceWorkerRegistrationDescriptor::GetInstalling() const
|
|||||||
mData->installing().get_IPCServiceWorkerDescriptor()));
|
mData->installing().get_IPCServiceWorkerDescriptor()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ServiceWorkerDescriptor>
|
Maybe<ServiceWorkerDescriptor>
|
||||||
@ -170,7 +170,7 @@ ServiceWorkerRegistrationDescriptor::GetWaiting() const
|
|||||||
mData->waiting().get_IPCServiceWorkerDescriptor()));
|
mData->waiting().get_IPCServiceWorkerDescriptor()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ServiceWorkerDescriptor>
|
Maybe<ServiceWorkerDescriptor>
|
||||||
@ -183,7 +183,7 @@ ServiceWorkerRegistrationDescriptor::GetActive() const
|
|||||||
mData->active().get_IPCServiceWorkerDescriptor()));
|
mData->active().get_IPCServiceWorkerDescriptor()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ServiceWorkerDescriptor>
|
Maybe<ServiceWorkerDescriptor>
|
||||||
@ -194,7 +194,7 @@ ServiceWorkerRegistrationDescriptor::Newest() const
|
|||||||
if (newest.isSome()) {
|
if (newest.isSome()) {
|
||||||
result.emplace(ServiceWorkerDescriptor(newest.ref()));
|
result.emplace(ServiceWorkerDescriptor(newest.ref()));
|
||||||
}
|
}
|
||||||
return std::move(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -277,7 +277,7 @@ U2F::Register(const nsAString& aAppId,
|
|||||||
null_t() /* no extra info for U2F */);
|
null_t() /* no extra info for U2F */);
|
||||||
|
|
||||||
MOZ_ASSERT(mTransaction.isNothing());
|
MOZ_ASSERT(mTransaction.isNothing());
|
||||||
mTransaction = Some(U2FTransaction(std::move(AsVariant(callback))));
|
mTransaction = Some(U2FTransaction(AsVariant(callback)));
|
||||||
mChild->SendRequestRegister(mTransaction.ref().mId, info);
|
mChild->SendRequestRegister(mTransaction.ref().mId, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,7 +423,7 @@ U2F::Sign(const nsAString& aAppId,
|
|||||||
null_t() /* no extra info for U2F */);
|
null_t() /* no extra info for U2F */);
|
||||||
|
|
||||||
MOZ_ASSERT(mTransaction.isNothing());
|
MOZ_ASSERT(mTransaction.isNothing());
|
||||||
mTransaction = Some(U2FTransaction(std::move(AsVariant(callback))));
|
mTransaction = Some(U2FTransaction(AsVariant(callback)));
|
||||||
mChild->SendRequestSign(mTransaction.ref().mId, info);
|
mChild->SendRequestSign(mTransaction.ref().mId, info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3497,10 +3497,10 @@ WorkerPrivate::GetClientInfo() const
|
|||||||
Maybe<ClientInfo> clientInfo;
|
Maybe<ClientInfo> clientInfo;
|
||||||
if (!mClientSource) {
|
if (!mClientSource) {
|
||||||
MOZ_DIAGNOSTIC_ASSERT(mStatus >= Terminating);
|
MOZ_DIAGNOSTIC_ASSERT(mStatus >= Terminating);
|
||||||
return std::move(clientInfo);
|
return clientInfo;
|
||||||
}
|
}
|
||||||
clientInfo.emplace(mClientSource->Info());
|
clientInfo.emplace(mClientSource->Info());
|
||||||
return std::move(clientInfo);
|
return clientInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
const ClientState
|
const ClientState
|
||||||
@ -3510,7 +3510,7 @@ WorkerPrivate::GetClientState() const
|
|||||||
MOZ_DIAGNOSTIC_ASSERT(mClientSource);
|
MOZ_DIAGNOSTIC_ASSERT(mClientSource);
|
||||||
ClientState state;
|
ClientState state;
|
||||||
mClientSource->SnapshotState(&state);
|
mClientSource->SnapshotState(&state);
|
||||||
return std::move(state);
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Maybe<ServiceWorkerDescriptor>
|
const Maybe<ServiceWorkerDescriptor>
|
||||||
|
@ -548,7 +548,7 @@ WorkerGlobalScope::GetClientState() const
|
|||||||
{
|
{
|
||||||
Maybe<ClientState> state;
|
Maybe<ClientState> state;
|
||||||
state.emplace(mWorkerPrivate->GetClientState());
|
state.emplace(mWorkerPrivate->GetClientState());
|
||||||
return std::move(state);
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<ServiceWorkerDescriptor>
|
Maybe<ServiceWorkerDescriptor>
|
||||||
|
@ -230,7 +230,7 @@ HTMLEditor::CreateAnonymousElement(nsAtom* aTag,
|
|||||||
// display the element
|
// display the element
|
||||||
ps->PostRecreateFramesFor(newContent);
|
ps->PostRecreateFramesFor(newContent);
|
||||||
|
|
||||||
return std::move(newContent);
|
return newContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Removes event listener and calls DeleteRefToAnonymousNode.
|
// Removes event listener and calls DeleteRefToAnonymousNode.
|
||||||
|
@ -6021,8 +6021,7 @@ HTMLEditRules::CreateStyleForInsertText(nsIDocument& aDocument)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// process clearing any styles first
|
// process clearing any styles first
|
||||||
UniquePtr<PropItem> item =
|
UniquePtr<PropItem> item = HTMLEditorRef().mTypeInState->TakeClearProperty();
|
||||||
std::move(HTMLEditorRef().mTypeInState->TakeClearProperty());
|
|
||||||
|
|
||||||
{
|
{
|
||||||
// Transactions may set selection, but we will set selection if necessary.
|
// Transactions may set selection, but we will set selection if necessary.
|
||||||
@ -6040,14 +6039,14 @@ HTMLEditRules::CreateStyleForInsertText(nsIDocument& aDocument)
|
|||||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
item = std::move(HTMLEditorRef().mTypeInState->TakeClearProperty());
|
item = HTMLEditorRef().mTypeInState->TakeClearProperty();
|
||||||
weDidSomething = true;
|
weDidSomething = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// then process setting any styles
|
// then process setting any styles
|
||||||
int32_t relFontSize = HTMLEditorRef().mTypeInState->TakeRelativeFontSize();
|
int32_t relFontSize = HTMLEditorRef().mTypeInState->TakeRelativeFontSize();
|
||||||
item = std::move(HTMLEditorRef().mTypeInState->TakeSetProperty());
|
item = HTMLEditorRef().mTypeInState->TakeSetProperty();
|
||||||
|
|
||||||
if (item || relFontSize) {
|
if (item || relFontSize) {
|
||||||
// we have at least one style to add; make a new text node to insert style
|
// we have at least one style to add; make a new text node to insert style
|
||||||
|
@ -145,7 +145,7 @@ HTMLEditor::CreateResizer(int16_t aLocation,
|
|||||||
nsresult rv =
|
nsresult rv =
|
||||||
ret->SetAttr(kNameSpaceID_None, nsGkAtoms::anonlocation, locationStr, true);
|
ret->SetAttr(kNameSpaceID_None, nsGkAtoms::anonlocation, locationStr, true);
|
||||||
NS_ENSURE_SUCCESS(rv, nullptr);
|
NS_ENSURE_SUCCESS(rv, nullptr);
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ManualNACPtr
|
ManualNACPtr
|
||||||
|
@ -39,7 +39,7 @@ RemoteSpellcheckEngineChild::SetCurrentDictionaryFromList(
|
|||||||
RefPtr<GenericPromise> result = promiseHolder->Ensure(__func__);
|
RefPtr<GenericPromise> result = promiseHolder->Ensure(__func__);
|
||||||
// promiseHolder will removed by receive message
|
// promiseHolder will removed by receive message
|
||||||
mResponsePromises.AppendElement(std::move(promiseHolder));
|
mResponsePromises.AppendElement(std::move(promiseHolder));
|
||||||
return std::move(result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
mozilla::ipc::IPCResult
|
mozilla::ipc::IPCResult
|
||||||
|
@ -139,7 +139,7 @@ SFNTData::Create(const uint8_t *aFontData, uint32_t aDataLength)
|
|||||||
++offset;
|
++offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(sfntData);
|
return sfntData;
|
||||||
}
|
}
|
||||||
|
|
||||||
UniquePtr<SFNTData> sfntData(new SFNTData);
|
UniquePtr<SFNTData> sfntData(new SFNTData);
|
||||||
@ -147,7 +147,7 @@ SFNTData::Create(const uint8_t *aFontData, uint32_t aDataLength)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(sfntData);
|
return sfntData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
|
@ -48,7 +48,7 @@ GLScreenBuffer::Create(GLContext* gl,
|
|||||||
if (caps.antialias &&
|
if (caps.antialias &&
|
||||||
!gl->IsSupported(GLFeature::framebuffer_multisample))
|
!gl->IsSupported(GLFeature::framebuffer_multisample))
|
||||||
{
|
{
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
layers::TextureFlags flags = layers::TextureFlags::ORIGIN_BOTTOM_LEFT;
|
layers::TextureFlags flags = layers::TextureFlags::ORIGIN_BOTTOM_LEFT;
|
||||||
@ -59,7 +59,7 @@ GLScreenBuffer::Create(GLContext* gl,
|
|||||||
UniquePtr<SurfaceFactory> factory = MakeUnique<SurfaceFactory_Basic>(gl, caps, flags);
|
UniquePtr<SurfaceFactory> factory = MakeUnique<SurfaceFactory_Basic>(gl, caps, flags);
|
||||||
|
|
||||||
ret.reset( new GLScreenBuffer(gl, caps, std::move(factory)) );
|
ret.reset( new GLScreenBuffer(gl, caps, std::move(factory)) );
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ UniquePtr<SurfaceFactory>
|
/* static */ UniquePtr<SurfaceFactory>
|
||||||
@ -953,7 +953,7 @@ ReadBuffer::Create(GLContext* gl,
|
|||||||
if (!isComplete)
|
if (!isComplete)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadBuffer::~ReadBuffer()
|
ReadBuffer::~ReadBuffer()
|
||||||
|
@ -134,7 +134,7 @@ MozFramebuffer::CreateWith(GLContext* const gl, const gfx::IntSize& size,
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(mozFB);
|
return mozFB;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
|
@ -332,7 +332,7 @@ SurfaceFactory::NewTexClient(const gfx::IntSize& size)
|
|||||||
StopRecycling(cur);
|
StopRecycling(cur);
|
||||||
}
|
}
|
||||||
|
|
||||||
UniquePtr<SharedSurface> surf = std::move(CreateShared(size));
|
UniquePtr<SharedSurface> surf = CreateShared(size);
|
||||||
if (!surf)
|
if (!surf)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -30,13 +30,13 @@ SharedSurface_EGLImage::Create(GLContext* prodGL,
|
|||||||
UniquePtr<SharedSurface_EGLImage> ret;
|
UniquePtr<SharedSurface_EGLImage> ret;
|
||||||
|
|
||||||
if (!HasExtensions(egl, prodGL)) {
|
if (!HasExtensions(egl, prodGL)) {
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
MOZ_ALWAYS_TRUE(prodGL->MakeCurrent());
|
MOZ_ALWAYS_TRUE(prodGL->MakeCurrent());
|
||||||
GLuint prodTex = CreateTextureForOffscreen(prodGL, formats, size);
|
GLuint prodTex = CreateTextureForOffscreen(prodGL, formats, size);
|
||||||
if (!prodTex) {
|
if (!prodTex) {
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
EGLClientBuffer buffer = reinterpret_cast<EGLClientBuffer>(uintptr_t(prodTex));
|
EGLClientBuffer buffer = reinterpret_cast<EGLClientBuffer>(uintptr_t(prodTex));
|
||||||
@ -45,12 +45,12 @@ SharedSurface_EGLImage::Create(GLContext* prodGL,
|
|||||||
nullptr);
|
nullptr);
|
||||||
if (!image) {
|
if (!image) {
|
||||||
prodGL->fDeleteTextures(1, &prodTex);
|
prodGL->fDeleteTextures(1, &prodTex);
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.reset( new SharedSurface_EGLImage(prodGL, egl, size, hasAlpha,
|
ret.reset( new SharedSurface_EGLImage(prodGL, egl, size, hasAlpha,
|
||||||
formats, prodTex, image) );
|
formats, prodTex, image) );
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -177,7 +177,7 @@ SurfaceFactory_EGLImage::Create(GLContext* prodGL, const SurfaceCaps& caps,
|
|||||||
ret.reset( new ptrT(prodGL, caps, allocator, flags, context) );
|
ret.reset( new ptrT(prodGL, caps, allocator, flags, context) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
@ -200,12 +200,12 @@ SharedSurface_SurfaceTexture::Create(GLContext* prodGL,
|
|||||||
MOZ_ASSERT(egl);
|
MOZ_ASSERT(egl);
|
||||||
EGLSurface eglSurface = egl->CreateCompatibleSurface(window.NativeWindow());
|
EGLSurface eglSurface = egl->CreateCompatibleSurface(window.NativeWindow());
|
||||||
if (!eglSurface) {
|
if (!eglSurface) {
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.reset(new SharedSurface_SurfaceTexture(prodGL, size, hasAlpha,
|
ret.reset(new SharedSurface_SurfaceTexture(prodGL, size, hasAlpha,
|
||||||
formats, surface, eglSurface));
|
formats, surface, eglSurface));
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedSurface_SurfaceTexture::SharedSurface_SurfaceTexture(GLContext* gl,
|
SharedSurface_SurfaceTexture::SharedSurface_SurfaceTexture(GLContext* gl,
|
||||||
@ -292,7 +292,7 @@ SurfaceFactory_SurfaceTexture::Create(GLContext* prodGL, const SurfaceCaps& caps
|
|||||||
{
|
{
|
||||||
UniquePtr<SurfaceFactory_SurfaceTexture> ret(
|
UniquePtr<SurfaceFactory_SurfaceTexture> ret(
|
||||||
new SurfaceFactory_SurfaceTexture(prodGL, caps, allocator, flags));
|
new SurfaceFactory_SurfaceTexture(prodGL, caps, allocator, flags));
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
UniquePtr<SharedSurface>
|
UniquePtr<SharedSurface>
|
||||||
|
@ -33,12 +33,12 @@ SharedSurface_Basic::Create(GLContext* gl,
|
|||||||
MOZ_ASSERT_IF(err != LOCAL_GL_NO_ERROR, err == LOCAL_GL_OUT_OF_MEMORY);
|
MOZ_ASSERT_IF(err != LOCAL_GL_NO_ERROR, err == LOCAL_GL_OUT_OF_MEMORY);
|
||||||
if (err) {
|
if (err) {
|
||||||
gl->fDeleteTextures(1, &tex);
|
gl->fDeleteTextures(1, &tex);
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ownsTex = true;
|
bool ownsTex = true;
|
||||||
ret.reset( new SharedSurface_Basic(gl, size, hasAlpha, tex, ownsTex) );
|
ret.reset( new SharedSurface_Basic(gl, size, hasAlpha, tex, ownsTex) );
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ SharedSurface_Basic::Wrap(GLContext* gl,
|
|||||||
bool ownsTex = false;
|
bool ownsTex = false;
|
||||||
UniquePtr<SharedSurface_Basic> ret( new SharedSurface_Basic(gl, size, hasAlpha, tex,
|
UniquePtr<SharedSurface_Basic> ret( new SharedSurface_Basic(gl, size, hasAlpha, tex,
|
||||||
ownsTex) );
|
ownsTex) );
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedSurface_Basic::SharedSurface_Basic(GLContext* gl,
|
SharedSurface_Basic::SharedSurface_Basic(GLContext* gl,
|
||||||
@ -126,12 +126,12 @@ SharedSurface_GLTexture::Create(GLContext* prodGL,
|
|||||||
MOZ_ASSERT_IF(err, err == LOCAL_GL_OUT_OF_MEMORY);
|
MOZ_ASSERT_IF(err, err == LOCAL_GL_OUT_OF_MEMORY);
|
||||||
if (err) {
|
if (err) {
|
||||||
prodGL->fDeleteTextures(1, &tex);
|
prodGL->fDeleteTextures(1, &tex);
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret.reset(new SharedSurface_GLTexture(prodGL, size,
|
ret.reset(new SharedSurface_GLTexture(prodGL, size,
|
||||||
hasAlpha, tex));
|
hasAlpha, tex));
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
SharedSurface_GLTexture::~SharedSurface_GLTexture()
|
SharedSurface_GLTexture::~SharedSurface_GLTexture()
|
||||||
|
@ -26,7 +26,7 @@ SharedSurface_IOSurface::Create(const RefPtr<MacIOSurface>& ioSurf,
|
|||||||
|
|
||||||
typedef SharedSurface_IOSurface ptrT;
|
typedef SharedSurface_IOSurface ptrT;
|
||||||
UniquePtr<ptrT> ret( new ptrT(ioSurf, gl, size, hasAlpha) );
|
UniquePtr<ptrT> ret( new ptrT(ioSurf, gl, size, hasAlpha) );
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -219,7 +219,7 @@ SurfaceFactory_IOSurface::Create(GLContext* gl, const SurfaceCaps& caps,
|
|||||||
|
|
||||||
typedef SurfaceFactory_IOSurface ptrT;
|
typedef SurfaceFactory_IOSurface ptrT;
|
||||||
UniquePtr<ptrT> ret( new ptrT(gl, caps, allocator, flags, maxDims) );
|
UniquePtr<ptrT> ret( new ptrT(gl, caps, allocator, flags, maxDims) );
|
||||||
return std::move(ret);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
UniquePtr<SharedSurface>
|
UniquePtr<SharedSurface>
|
||||||
|
@ -113,7 +113,7 @@ CompositorAnimationStorage::SetAnimatedValue(uint64_t aId,
|
|||||||
const TransformData dontCare = {};
|
const TransformData dontCare = {};
|
||||||
SetAnimatedValue(aId,
|
SetAnimatedValue(aId,
|
||||||
std::move(aTransformInDevSpace),
|
std::move(aTransformInDevSpace),
|
||||||
std::move(gfx::Matrix4x4()),
|
gfx::Matrix4x4(),
|
||||||
dontCare);
|
dontCare);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,8 +581,8 @@ AnimationHelper::SetAnimations(
|
|||||||
animation.iterationStart(),
|
animation.iterationStart(),
|
||||||
static_cast<dom::PlaybackDirection>(animation.direction()),
|
static_cast<dom::PlaybackDirection>(animation.direction()),
|
||||||
static_cast<dom::FillMode>(animation.fillMode()),
|
static_cast<dom::FillMode>(animation.fillMode()),
|
||||||
std::move(AnimationUtils::TimingFunctionToComputedTimingFunction(
|
AnimationUtils::TimingFunctionToComputedTimingFunction(
|
||||||
animation.easingFunction()))
|
animation.easingFunction())
|
||||||
};
|
};
|
||||||
InfallibleTArray<Maybe<ComputedTimingFunction>>& functions =
|
InfallibleTArray<Maybe<ComputedTimingFunction>>& functions =
|
||||||
data->mFunctions;
|
data->mFunctions;
|
||||||
|
@ -346,7 +346,7 @@ struct ContainerLayerProperties : public LayerPropertiesBase
|
|||||||
{
|
{
|
||||||
for (Layer* child = aLayer->GetFirstChild(); child; child = child->GetNextSibling()) {
|
for (Layer* child = aLayer->GetFirstChild(); child; child = child->GetNextSibling()) {
|
||||||
child->CheckCanary();
|
child->CheckCanary();
|
||||||
mChildren.AppendElement(std::move(CloneLayerTreePropertiesInternal(child)));
|
mChildren.AppendElement(CloneLayerTreePropertiesInternal(child));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ CompositorVsyncScheduler::PostVRTask(TimeStamp aTimestamp)
|
|||||||
&CompositorVsyncScheduler::DispatchVREvents,
|
&CompositorVsyncScheduler::DispatchVREvents,
|
||||||
aTimestamp);
|
aTimestamp);
|
||||||
mCurrentVRListenerTask = task;
|
mCurrentVRListenerTask = task;
|
||||||
VRListenerThreadHolder::Loop()->PostDelayedTask(std::move(task.forget()), 0);
|
VRListenerThreadHolder::Loop()->PostDelayedTask(task.forget(), 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ UiCompositorControllerParent::GetFromRootLayerTreeId(const LayersId& aRootLayerT
|
|||||||
[&](LayerTreeState& aState) -> void {
|
[&](LayerTreeState& aState) -> void {
|
||||||
controller = aState.mUiControllerParent;
|
controller = aState.mUiControllerParent;
|
||||||
});
|
});
|
||||||
return std::move(controller);
|
return controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ RefPtr<UiCompositorControllerParent>
|
/* static */ RefPtr<UiCompositorControllerParent>
|
||||||
|
@ -1543,7 +1543,7 @@ PaintByLayer(nsDisplayItem* aItem,
|
|||||||
{
|
{
|
||||||
UniquePtr<LayerProperties> props;
|
UniquePtr<LayerProperties> props;
|
||||||
if (aManager->GetRoot()) {
|
if (aManager->GetRoot()) {
|
||||||
props = std::move(LayerProperties::CloneFrom(aManager->GetRoot()));
|
props = LayerProperties::CloneFrom(aManager->GetRoot());
|
||||||
}
|
}
|
||||||
FrameLayerBuilder* layerBuilder = new FrameLayerBuilder();
|
FrameLayerBuilder* layerBuilder = new FrameLayerBuilder();
|
||||||
layerBuilder->Init(aDisplayListBuilder, aManager, nullptr, true);
|
layerBuilder->Init(aDisplayListBuilder, aManager, nullptr, true);
|
||||||
|
@ -2554,7 +2554,7 @@ gfxFont::Measure(const gfxTextRun *aTextRun,
|
|||||||
if (aBoundingBoxType == TIGHT_HINTED_OUTLINE_EXTENTS &&
|
if (aBoundingBoxType == TIGHT_HINTED_OUTLINE_EXTENTS &&
|
||||||
mAntialiasOption != kAntialiasNone) {
|
mAntialiasOption != kAntialiasNone) {
|
||||||
if (!mNonAAFont) {
|
if (!mNonAAFont) {
|
||||||
mNonAAFont = std::move(CopyWithAntialiasOption(kAntialiasNone));
|
mNonAAFont = CopyWithAntialiasOption(kAntialiasNone);
|
||||||
}
|
}
|
||||||
// if font subclass doesn't implement CopyWithAntialiasOption(),
|
// if font subclass doesn't implement CopyWithAntialiasOption(),
|
||||||
// it will return null and we'll proceed to use the existing font
|
// it will return null and we'll proceed to use the existing font
|
||||||
|
@ -1834,7 +1834,7 @@ gfxPlatform::GetBackendPrefs() const
|
|||||||
data.mCanvasDefault = BackendType::CAIRO;
|
data.mCanvasDefault = BackendType::CAIRO;
|
||||||
data.mContentDefault = BackendType::CAIRO;
|
data.mContentDefault = BackendType::CAIRO;
|
||||||
|
|
||||||
return std::move(data);
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -103,7 +103,7 @@ gfxPlatformMac::GetBackendPrefs() const
|
|||||||
data.mCanvasDefault = BackendType::SKIA;
|
data.mCanvasDefault = BackendType::SKIA;
|
||||||
data.mContentDefault = BackendType::SKIA;
|
data.mContentDefault = BackendType::SKIA;
|
||||||
|
|
||||||
return std::move(data);
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -203,7 +203,7 @@ nsICODecoder::IterateUnsizedDirEntry()
|
|||||||
// The first time we are here, there is no entry selected. We must prepare a
|
// The first time we are here, there is no entry selected. We must prepare a
|
||||||
// new iterator for the contained decoder to advance as it wills. Cloning at
|
// new iterator for the contained decoder to advance as it wills. Cloning at
|
||||||
// this point ensures it will begin at the end of the dir entries.
|
// this point ensures it will begin at the end of the dir entries.
|
||||||
mReturnIterator = std::move(mLexer.Clone(*mIterator, SIZE_MAX));
|
mReturnIterator = mLexer.Clone(*mIterator, SIZE_MAX);
|
||||||
if (mReturnIterator.isNothing()) {
|
if (mReturnIterator.isNothing()) {
|
||||||
// If we cannot read further than this point, then there is no resource
|
// If we cannot read further than this point, then there is no resource
|
||||||
// data to read.
|
// data to read.
|
||||||
@ -223,7 +223,7 @@ nsICODecoder::IterateUnsizedDirEntry()
|
|||||||
|
|
||||||
// Our iterator is at an unknown point, so reset it to the point that we
|
// Our iterator is at an unknown point, so reset it to the point that we
|
||||||
// saved.
|
// saved.
|
||||||
mIterator = std::move(mLexer.Clone(*mReturnIterator, SIZE_MAX));
|
mIterator = mLexer.Clone(*mReturnIterator, SIZE_MAX);
|
||||||
if (mIterator.isNothing()) {
|
if (mIterator.isNothing()) {
|
||||||
MOZ_ASSERT_UNREACHABLE("Cannot re-clone return iterator");
|
MOZ_ASSERT_UNREACHABLE("Cannot re-clone return iterator");
|
||||||
return Transition::TerminateFailure();
|
return Transition::TerminateFailure();
|
||||||
|
@ -241,8 +241,8 @@ WriteUninterpolatedPixels(SurfaceFilter* aFilter,
|
|||||||
for (int32_t row = 0; row < aSize.height; ++row) {
|
for (int32_t row = 0; row < aSize.height; ++row) {
|
||||||
// Compute uninterpolated pixels for this row.
|
// Compute uninterpolated pixels for this row.
|
||||||
vector<BGRAColor> pixels =
|
vector<BGRAColor> pixels =
|
||||||
std::move(ADAM7HorizontallyInterpolatedRow(aPass, row, aSize.width,
|
ADAM7HorizontallyInterpolatedRow(aPass, row, aSize.width,
|
||||||
ShouldInterpolate::eNo, aColors));
|
ShouldInterpolate::eNo, aColors);
|
||||||
|
|
||||||
// Write them to the surface.
|
// Write them to the surface.
|
||||||
auto pixelIterator = pixels.cbegin();
|
auto pixelIterator = pixels.cbegin();
|
||||||
@ -275,8 +275,8 @@ CheckHorizontallyInterpolatedImage(Decoder* aDecoder,
|
|||||||
// Compute the expected pixels, *with* interpolation to match what the
|
// Compute the expected pixels, *with* interpolation to match what the
|
||||||
// filter should have done.
|
// filter should have done.
|
||||||
vector<BGRAColor> expectedPixels =
|
vector<BGRAColor> expectedPixels =
|
||||||
std::move(ADAM7HorizontallyInterpolatedRow(aPass, row, aSize.width,
|
ADAM7HorizontallyInterpolatedRow(aPass, row, aSize.width,
|
||||||
ShouldInterpolate::eYes, aColors));
|
ShouldInterpolate::eYes, aColors);
|
||||||
|
|
||||||
if (!RowHasPixels(surface, row, expectedPixels)) {
|
if (!RowHasPixels(surface, row, expectedPixels)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -28,7 +28,7 @@ Fill(AnimationFrameBuffer& buffer, size_t aLength)
|
|||||||
bool keepDecoding = false;
|
bool keepDecoding = false;
|
||||||
for (size_t i = 0; i < aLength; ++i) {
|
for (size_t i = 0; i < aLength; ++i) {
|
||||||
RawAccessFrameRef frame = CreateEmptyFrame();
|
RawAccessFrameRef frame = CreateEmptyFrame();
|
||||||
keepDecoding = buffer.Insert(std::move(frame->RawAccessRef()));
|
keepDecoding = buffer.Insert(frame->RawAccessRef());
|
||||||
}
|
}
|
||||||
return keepDecoding;
|
return keepDecoding;
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ TEST_F(ImageAnimationFrameBuffer, FinishUnderBatchAndThreshold)
|
|||||||
RawAccessFrameRef firstFrame;
|
RawAccessFrameRef firstFrame;
|
||||||
for (size_t i = 0; i < 5; ++i) {
|
for (size_t i = 0; i < 5; ++i) {
|
||||||
RawAccessFrameRef frame = CreateEmptyFrame();
|
RawAccessFrameRef frame = CreateEmptyFrame();
|
||||||
bool keepDecoding = buffer.Insert(std::move(frame->RawAccessRef()));
|
bool keepDecoding = buffer.Insert(frame->RawAccessRef());
|
||||||
EXPECT_TRUE(keepDecoding);
|
EXPECT_TRUE(keepDecoding);
|
||||||
EXPECT_FALSE(buffer.SizeKnown());
|
EXPECT_FALSE(buffer.SizeKnown());
|
||||||
|
|
||||||
|
@ -613,7 +613,8 @@ TEST_F(ImageSourceBuffer, SourceBufferIteratorsCanBeMoved)
|
|||||||
|
|
||||||
// Move-construct |movedIterator| from the iterator returned from
|
// Move-construct |movedIterator| from the iterator returned from
|
||||||
// GetIterator() and check that its state is as we expect.
|
// GetIterator() and check that its state is as we expect.
|
||||||
SourceBufferIterator movedIterator = std::move(GetIterator());
|
SourceBufferIterator tmpIterator = GetIterator();
|
||||||
|
SourceBufferIterator movedIterator(std::move(tmpIterator));
|
||||||
EXPECT_TRUE(movedIterator.Data());
|
EXPECT_TRUE(movedIterator.Data());
|
||||||
EXPECT_EQ(chunkLength, movedIterator.Length());
|
EXPECT_EQ(chunkLength, movedIterator.Length());
|
||||||
ExpectChunkAndByteCount(movedIterator, 1, chunkLength);
|
ExpectChunkAndByteCount(movedIterator, 1, chunkLength);
|
||||||
@ -626,7 +627,8 @@ TEST_F(ImageSourceBuffer, SourceBufferIteratorsCanBeMoved)
|
|||||||
|
|
||||||
// Move-assign |movedIterator| from the iterator returned from
|
// Move-assign |movedIterator| from the iterator returned from
|
||||||
// GetIterator() and check that its state is as we expect.
|
// GetIterator() and check that its state is as we expect.
|
||||||
movedIterator = std::move(GetIterator());
|
tmpIterator = GetIterator();
|
||||||
|
movedIterator = std::move(tmpIterator);
|
||||||
EXPECT_TRUE(movedIterator.Data());
|
EXPECT_TRUE(movedIterator.Data());
|
||||||
EXPECT_EQ(chunkLength, movedIterator.Length());
|
EXPECT_EQ(chunkLength, movedIterator.Length());
|
||||||
ExpectChunkAndByteCount(movedIterator, 1, chunkLength);
|
ExpectChunkAndByteCount(movedIterator, 1, chunkLength);
|
||||||
|
@ -26,7 +26,7 @@ public:
|
|||||||
static SurfacePipe SimpleSurfacePipe()
|
static SurfacePipe SimpleSurfacePipe()
|
||||||
{
|
{
|
||||||
SurfacePipe pipe;
|
SurfacePipe pipe;
|
||||||
return std::move(pipe);
|
return pipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
@ -3527,7 +3527,7 @@ struct FindPathHandler {
|
|||||||
EdgeName edgeName = DuplicateString(cx, edge.name.get());
|
EdgeName edgeName = DuplicateString(cx, edge.name.get());
|
||||||
if (!edgeName)
|
if (!edgeName)
|
||||||
return false;
|
return false;
|
||||||
*backEdge = std::move(BackEdge(origin, std::move(edgeName)));
|
*backEdge = BackEdge(origin, std::move(edgeName));
|
||||||
|
|
||||||
// Have we reached our final target node?
|
// Have we reached our final target node?
|
||||||
if (edge.referent == target) {
|
if (edge.referent == target) {
|
||||||
|
@ -5758,7 +5758,7 @@ ArrayType::BuildFFIType(JSContext* cx, JSObject* obj)
|
|||||||
ffiType->elements[i] = ffiBaseType;
|
ffiType->elements[i] = ffiBaseType;
|
||||||
ffiType->elements[length] = nullptr;
|
ffiType->elements[length] = nullptr;
|
||||||
|
|
||||||
return std::move(ffiType);
|
return ffiType;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
@ -6306,7 +6306,7 @@ StructType::BuildFFIType(JSContext* cx, JSObject* obj)
|
|||||||
ffiType->alignment = structAlign;
|
ffiType->alignment = structAlign;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return std::move(ffiType);
|
return ffiType;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -51,11 +51,11 @@ void
|
|||||||
LifoAlloc::freeAll()
|
LifoAlloc::freeAll()
|
||||||
{
|
{
|
||||||
while (!chunks_.empty()) {
|
while (!chunks_.empty()) {
|
||||||
BumpChunk bc = std::move(chunks_.popFirst());
|
BumpChunk bc = chunks_.popFirst();
|
||||||
decrementCurSize(bc->computedSizeOfIncludingThis());
|
decrementCurSize(bc->computedSizeOfIncludingThis());
|
||||||
}
|
}
|
||||||
while (!unused_.empty()) {
|
while (!unused_.empty()) {
|
||||||
BumpChunk bc = std::move(unused_.popFirst());
|
BumpChunk bc = unused_.popFirst();
|
||||||
decrementCurSize(bc->computedSizeOfIncludingThis());
|
decrementCurSize(bc->computedSizeOfIncludingThis());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ LifoAlloc::getOrCreateChunk(size_t n)
|
|||||||
// chunks.
|
// chunks.
|
||||||
if (!unused_.empty()) {
|
if (!unused_.empty()) {
|
||||||
if (unused_.begin()->canAlloc(n)) {
|
if (unused_.begin()->canAlloc(n)) {
|
||||||
chunks_.append(std::move(unused_.popFirst()));
|
chunks_.append(unused_.popFirst());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,8 +114,8 @@ LifoAlloc::getOrCreateChunk(size_t n)
|
|||||||
detail::BumpChunk* elem = i->next();
|
detail::BumpChunk* elem = i->next();
|
||||||
MOZ_ASSERT(elem->empty());
|
MOZ_ASSERT(elem->empty());
|
||||||
if (elem->canAlloc(n)) {
|
if (elem->canAlloc(n)) {
|
||||||
BumpChunkList temp = std::move(unused_.splitAfter(i.get()));
|
BumpChunkList temp = unused_.splitAfter(i.get());
|
||||||
chunks_.append(std::move(temp.popFirst()));
|
chunks_.append(temp.popFirst());
|
||||||
unused_.appendAll(std::move(temp));
|
unused_.appendAll(std::move(temp));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -711,7 +711,7 @@ class LifoAlloc
|
|||||||
if (!mark.markedChunk())
|
if (!mark.markedChunk())
|
||||||
released = std::move(chunks_);
|
released = std::move(chunks_);
|
||||||
else
|
else
|
||||||
released = std::move(chunks_.splitAfter(mark.markedChunk()));
|
released = chunks_.splitAfter(mark.markedChunk());
|
||||||
|
|
||||||
// Release the content of all the blocks which are after the marks.
|
// Release the content of all the blocks which are after the marks.
|
||||||
for (detail::BumpChunk& bc : released)
|
for (detail::BumpChunk& bc : released)
|
||||||
|
@ -516,7 +516,7 @@ LCovRealm::lookupOrAdd(JS::Realm* realm, const char* name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Allocate a new LCovSource for the current top-level.
|
// Allocate a new LCovSource for the current top-level.
|
||||||
if (!sources_->append(std::move(LCovSource(&alloc_, source_name)))) {
|
if (!sources_->append(LCovSource(&alloc_, source_name))) {
|
||||||
outTN_.reportOutOfMemory();
|
outTN_.reportOutOfMemory();
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ class EdgeVectorTracer : public JS::CallbackTracer {
|
|||||||
// ownership of name; if the append succeeds, the vector element
|
// ownership of name; if the append succeeds, the vector element
|
||||||
// then takes ownership; if the append fails, then the temporary
|
// then takes ownership; if the append fails, then the temporary
|
||||||
// retains it, and its destructor will free it.
|
// retains it, and its destructor will free it.
|
||||||
if (!vec->append(std::move(Edge(name16, Node(thing))))) {
|
if (!vec->append(Edge(name16, Node(thing)))) {
|
||||||
okay = false;
|
okay = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -548,7 +548,7 @@ RootList::addRoot(Node node, const char16_t* edgeName)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return edges.append(std::move(Edge(name.release(), node)));
|
return edges.append(Edge(name.release(), node));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char16_t Concrete<RootList>::concreteTypeName[] = u"JS::ubi::RootList";
|
const char16_t Concrete<RootList>::concreteTypeName[] = u"JS::ubi::RootList";
|
||||||
|
@ -28,7 +28,7 @@ BackEdge::clone() const
|
|||||||
if (!clone->name_)
|
if (!clone->name_)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
return std::move(clone);
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -1601,7 +1601,7 @@ DecodeExportName(Decoder& d, CStringSet* dupSet)
|
|||||||
if (!dupSet->add(p, exportName.get()))
|
if (!dupSet->add(p, exportName.get()))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
return std::move(exportName);
|
return exportName;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -624,11 +624,11 @@ URLPreloader::CacheKey::ToFileLocation()
|
|||||||
nsCOMPtr<nsIFile> file;
|
nsCOMPtr<nsIFile> file;
|
||||||
MOZ_TRY(NS_NewLocalFile(NS_ConvertUTF8toUTF16(mPath), false,
|
MOZ_TRY(NS_NewLocalFile(NS_ConvertUTF8toUTF16(mPath), false,
|
||||||
getter_AddRefs(file)));
|
getter_AddRefs(file)));
|
||||||
return std::move(FileLocation(file));
|
return FileLocation(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<nsZipArchive> zip = Archive();
|
RefPtr<nsZipArchive> zip = Archive();
|
||||||
return std::move(FileLocation(zip, mPath.get()));
|
return FileLocation(zip, mPath.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
Result<const nsCString, nsresult>
|
Result<const nsCString, nsresult>
|
||||||
|
@ -6253,7 +6253,7 @@ PresShell::Paint(nsView* aViewToPaint,
|
|||||||
// calling ComputeDifferences in that case because it assumes non-null
|
// calling ComputeDifferences in that case because it assumes non-null
|
||||||
// and crashes.
|
// and crashes.
|
||||||
if (computeInvalidRect && layerManager->GetRoot()) {
|
if (computeInvalidRect && layerManager->GetRoot()) {
|
||||||
props = std::move(LayerProperties::CloneFrom(layerManager->GetRoot()));
|
props = LayerProperties::CloneFrom(layerManager->GetRoot());
|
||||||
}
|
}
|
||||||
|
|
||||||
MaybeSetupTransactionIdAllocator(layerManager, presContext);
|
MaybeSetupTransactionIdAllocator(layerManager, presContext);
|
||||||
|
@ -6618,8 +6618,8 @@ FrameLayerBuilder::DrawPaintedLayer(PaintedLayer* aLayer,
|
|||||||
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
||||||
|
|
||||||
if (timelines && timelines->HasConsumer(docShell)) {
|
if (timelines && timelines->HasConsumer(docShell)) {
|
||||||
timelines->AddMarkerForDocShell(docShell, std::move(
|
timelines->AddMarkerForDocShell(docShell,
|
||||||
MakeUnique<LayerTimelineMarker>(aRegionToDraw)));
|
MakeUnique<LayerTimelineMarker>(aRegionToDraw));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ RetainedDisplayListBuilder::MergeDisplayLists(nsDisplayList* aNewList,
|
|||||||
previousItemIndex = Some(merge.ProcessItemFromNewList(item, previousItemIndex));
|
previousItemIndex = Some(merge.ProcessItemFromNewList(item, previousItemIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
*aOutList = std::move(merge.Finalize());
|
*aOutList = merge.Finalize();
|
||||||
aOutContainerASR = merge.mContainerASR;
|
aOutContainerASR = merge.mContainerASR;
|
||||||
return merge.mResultIsModified;
|
return merge.mResultIsModified;
|
||||||
}
|
}
|
||||||
|
@ -2733,7 +2733,7 @@ already_AddRefed<LayerManager> nsDisplayList::PaintRoot(nsDisplayListBuilder* aB
|
|||||||
widgetTransaction;
|
widgetTransaction;
|
||||||
|
|
||||||
if (computeInvalidRect) {
|
if (computeInvalidRect) {
|
||||||
props = std::move(LayerProperties::CloneFrom(layerManager->GetRoot()));
|
props = LayerProperties::CloneFrom(layerManager->GetRoot());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doBeginTransaction) {
|
if (doBeginTransaction) {
|
||||||
|
@ -1046,7 +1046,7 @@ StyleSheet::ParseSheet(css::Loader* aLoader,
|
|||||||
aLoader->GetCompatibilityMode());
|
aLoader->GetCompatibilityMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::move(p);
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -606,7 +606,7 @@ AppendKeyframe(double aOffset,
|
|||||||
RefPtr<RawServoDeclarationBlock> decl =
|
RefPtr<RawServoDeclarationBlock> decl =
|
||||||
Servo_AnimationValue_Uncompute(aValue.mServo).Consume();
|
Servo_AnimationValue_Uncompute(aValue.mServo).Consume();
|
||||||
frame.mPropertyValues.AppendElement(
|
frame.mPropertyValues.AppendElement(
|
||||||
std::move(PropertyValuePair(aProperty, std::move(decl))));
|
PropertyValuePair(aProperty, std::move(decl)));
|
||||||
} else {
|
} else {
|
||||||
MOZ_CRASH("old style system disabled");
|
MOZ_CRASH("old style system disabled");
|
||||||
}
|
}
|
||||||
|
@ -1511,10 +1511,10 @@ class NewSdpTest : public ::testing::Test,
|
|||||||
void ParseSdp(const std::string &sdp, bool expectSuccess = true) {
|
void ParseSdp(const std::string &sdp, bool expectSuccess = true) {
|
||||||
if (::testing::get<1>(GetParam())) {
|
if (::testing::get<1>(GetParam())) {
|
||||||
mSdpErrorHolder = &mSipccParser;
|
mSdpErrorHolder = &mSipccParser;
|
||||||
mSdp = std::move(mSipccParser.Parse(sdp));
|
mSdp = mSipccParser.Parse(sdp);
|
||||||
} else {
|
} else {
|
||||||
mSdpErrorHolder = &mRustParser;
|
mSdpErrorHolder = &mRustParser;
|
||||||
mSdp = std::move(mRustParser.Parse(sdp));
|
mSdp = mRustParser.Parse(sdp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Are we configured to do a parse and serialize before actually
|
// Are we configured to do a parse and serialize before actually
|
||||||
@ -1531,9 +1531,9 @@ class NewSdpTest : public ::testing::Test,
|
|||||||
// Serialize and re-parse
|
// Serialize and re-parse
|
||||||
mSdp->Serialize(os);
|
mSdp->Serialize(os);
|
||||||
if (::testing::get<1>(GetParam())) {
|
if (::testing::get<1>(GetParam())) {
|
||||||
mSdp = std::move(mSipccParser.Parse(os.str()));
|
mSdp = mSipccParser.Parse(os.str());
|
||||||
} else {
|
} else {
|
||||||
mSdp = std::move(mRustParser.Parse(os.str()));
|
mSdp = mRustParser.Parse(os.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whether we expected the parse to work or not, it should
|
// Whether we expected the parse to work or not, it should
|
||||||
|
@ -75,7 +75,7 @@ static UniqueA
|
|||||||
ReturnLocalA()
|
ReturnLocalA()
|
||||||
{
|
{
|
||||||
UniqueA a(new A);
|
UniqueA a(new A);
|
||||||
return std::move(a);
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -368,7 +368,7 @@ MallocedInt(int aI)
|
|||||||
UniquePtr<int, FreeSignature>
|
UniquePtr<int, FreeSignature>
|
||||||
ptr(static_cast<int*>(malloc(sizeof(int))), free);
|
ptr(static_cast<int*>(malloc(sizeof(int))), free);
|
||||||
*ptr = aI;
|
*ptr = aI;
|
||||||
return std::move(ptr);
|
return ptr;
|
||||||
}
|
}
|
||||||
static bool
|
static bool
|
||||||
TestFunctionReferenceDeleter()
|
TestFunctionReferenceDeleter()
|
||||||
|
@ -183,8 +183,8 @@ TEST_F(CTSerializationTest, EncodesSCTList)
|
|||||||
const uint8_t SCT_2[] = { 0x64, 0x65, 0x66 };
|
const uint8_t SCT_2[] = { 0x64, 0x65, 0x66 };
|
||||||
|
|
||||||
Vector<Input> list;
|
Vector<Input> list;
|
||||||
ASSERT_TRUE(list.append(std::move(Input(SCT_1))));
|
ASSERT_TRUE(list.append(Input(SCT_1)));
|
||||||
ASSERT_TRUE(list.append(std::move(Input(SCT_2))));
|
ASSERT_TRUE(list.append(Input(SCT_2)));
|
||||||
|
|
||||||
Buffer encodedList;
|
Buffer encodedList;
|
||||||
ASSERT_EQ(Success, EncodeSCTList(list, encodedList));
|
ASSERT_EQ(Success, EncodeSCTList(list, encodedList));
|
||||||
|
@ -302,7 +302,7 @@ nsPKCS12Blob::newPKCS12FilePassword(uint32_t& passwordBufferLength,
|
|||||||
if (!pressedOK) {
|
if (!pressedOK) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
passwordBuffer = std::move(stringToBigEndianBytes(password, passwordBufferLength));
|
passwordBuffer = stringToBigEndianBytes(password, passwordBufferLength);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ nsPKCS12Blob::getPKCS12FilePassword(uint32_t& passwordBufferLength,
|
|||||||
if (!pressedOK) {
|
if (!pressedOK) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
passwordBuffer = std::move(stringToBigEndianBytes(password, passwordBufferLength));
|
passwordBuffer = stringToBigEndianBytes(password, passwordBufferLength);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ WebRequestService::RegisterChannel(ChannelWrapper* aChannel)
|
|||||||
MOZ_DIAGNOSTIC_ASSERT(!key);
|
MOZ_DIAGNOSTIC_ASSERT(!key);
|
||||||
key.OrInsert([&entry]() { return entry.get(); });
|
key.OrInsert([&entry]() { return entry.get(); });
|
||||||
|
|
||||||
return std::move(entry);
|
return entry;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ GetClassifier()
|
|||||||
nsresult rv = classifier->Open(*file);
|
nsresult rv = classifier->Open(*file);
|
||||||
EXPECT_TRUE(rv == NS_OK);
|
EXPECT_TRUE(rv == NS_OK);
|
||||||
|
|
||||||
return std::move(classifier);
|
return classifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
static nsresult
|
static nsresult
|
||||||
|
@ -1792,7 +1792,7 @@ CollectJavaThreadProfileData()
|
|||||||
}
|
}
|
||||||
sampleId++;
|
sampleId++;
|
||||||
}
|
}
|
||||||
return std::move(buffer);
|
return buffer;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ protected:
|
|||||||
// Ownership of event object transfers to the return value.
|
// Ownership of event object transfers to the return value.
|
||||||
mozilla::UniquePtr<Event> event(mQueue.popFirst());
|
mozilla::UniquePtr<Event> event(mQueue.popFirst());
|
||||||
if (!event || !event->mPostTime) {
|
if (!event || !event->mPostTime) {
|
||||||
return std::move(event);
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EARLY_BETA_OR_EARLIER
|
#ifdef EARLY_BETA_OR_EARLIER
|
||||||
@ -255,7 +255,7 @@ protected:
|
|||||||
sLatencyCount[latencyType]++;
|
sLatencyCount[latencyType]++;
|
||||||
sLatencyTime[latencyType] += latency;
|
sLatencyTime[latencyType] += latency;
|
||||||
#endif
|
#endif
|
||||||
return std::move(event);
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
} mEventQueue;
|
} mEventQueue;
|
||||||
|
@ -197,7 +197,14 @@ TEST(PLDHashTableTest, MoveSemantics)
|
|||||||
PLDHashTable t2(&trivialOps, sizeof(PLDHashEntryStub));
|
PLDHashTable t2(&trivialOps, sizeof(PLDHashEntryStub));
|
||||||
t2.Add((const void*)99);
|
t2.Add((const void*)99);
|
||||||
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wself-move"
|
||||||
|
#endif
|
||||||
t1 = std::move(t1); // self-move
|
t1 = std::move(t1); // self-move
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
t1 = std::move(t2); // empty overwritten with empty
|
t1 = std::move(t2); // empty overwritten with empty
|
||||||
|
|
||||||
|
@ -138,8 +138,16 @@ TEST(TArray, AssignmentOperatorSelfAssignment)
|
|||||||
|
|
||||||
array = *&array;
|
array = *&array;
|
||||||
ASSERT_EQ(DummyArray(), array);
|
ASSERT_EQ(DummyArray(), array);
|
||||||
array = std::move(array);
|
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wself-move"
|
||||||
|
#endif
|
||||||
|
array = std::move(array); // self-move
|
||||||
ASSERT_EQ(DummyArray(), array);
|
ASSERT_EQ(DummyArray(), array);
|
||||||
|
#if defined(__clang__)
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(TArray, CopyOverlappingForwards)
|
TEST(TArray, CopyOverlappingForwards)
|
||||||
|
Loading…
Reference in New Issue
Block a user