Skip to content

Commit

Permalink
Backed out 2 changesets (bug 1465060) for build bustages on security/…
Browse files Browse the repository at this point in the history
…sandbox/linux/reporter/SandboxReporter.cpp

Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
  • Loading branch information
aiakab committed Jun 3, 2018
1 parent 9a6bff4 commit 7e765f7
Show file tree
Hide file tree
Showing 89 changed files with 182 additions and 192 deletions.
2 changes: 1 addition & 1 deletion accessible/ipc/other/ProxyAccessible.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ ProxyAccessible::RelationByType(RelationType aType) const
if (ProxyAccessible* proxy = mDoc->GetAccessible(targetIDs[i]))
targets.AppendElement(proxy);

return targets;
return std::move(targets);
}

void
Expand Down
6 changes: 6 additions & 0 deletions build/moz.configure/warnings.configure
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ check_and_add_gcc_warning('-Wno-inline-new-delete', cxx_compiler)
# too many false positives
check_and_add_gcc_warning('-Wno-error=maybe-uninitialized')

# Turned on by -Wall, but needs changes to be turned into an error
# (bug 1465060).
check_and_add_gcc_warning('-Wno-error=pessimizing-move')
# This one is probably easier, it's only triggered by tests.
check_and_add_gcc_warning('-Wno-error=self-move')

# we don't want our builds held hostage when a platform-specific API
# becomes deprecated.
check_and_add_gcc_warning('-Wno-error=deprecated-declarations')
Expand Down
4 changes: 2 additions & 2 deletions devtools/shared/heapsnapshot/DeserializedNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class DeserializedEdgeRange : public EdgeRange

auto& edge = node->edges[i];
auto referent = node->getEdgeReferent(edge);
currentEdge = Edge(edge.name
? NS_strdup(edge.name) : nullptr, referent);
currentEdge = std::move(Edge(edge.name ? NS_strdup(edge.name) : nullptr,
referent));
front_ = &currentEdge;
}

Expand Down
6 changes: 3 additions & 3 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2865,7 +2865,7 @@ nsDocShell::GetInitialClientInfo() const
if (mInitialClientSource) {
Maybe<ClientInfo> result;
result.emplace(mInitialClientSource->Info());
return result;
return std::move(result);
}

nsGlobalWindowInner* innerWindow =
Expand Down Expand Up @@ -14067,10 +14067,10 @@ nsDocShell::NotifyJSRunToCompletionStart(const char* aReason,
if (mJSRunToCompletionDepth == 0) {
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
if (timelines && timelines->HasConsumer(this)) {
timelines->AddMarkerForDocShell(this,
timelines->AddMarkerForDocShell(this, std::move(
mozilla::MakeUnique<JavascriptTimelineMarker>(
aReason, aFunctionName, aFilename, aLineNumber, MarkerTracingType::START,
aAsyncStack, aAsyncCause));
aAsyncStack, aAsyncCause)));
}
}

Expand Down
8 changes: 4 additions & 4 deletions docshell/base/timeline/AutoRestyleTimelineMarker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ AutoRestyleTimelineMarker::AutoRestyleTimelineMarker(
}

mDocShell = aDocShell;
timelines->AddMarkerForDocShell(mDocShell,
timelines->AddMarkerForDocShell(mDocShell, std::move(
MakeUnique<RestyleTimelineMarker>(
mIsAnimationOnly,
MarkerTracingType::START));
MarkerTracingType::START)));
}

AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker()
Expand All @@ -51,10 +51,10 @@ AutoRestyleTimelineMarker::~AutoRestyleTimelineMarker()
return;
}

timelines->AddMarkerForDocShell(mDocShell,
timelines->AddMarkerForDocShell(mDocShell, std::move(
MakeUnique<RestyleTimelineMarker>(
mIsAnimationOnly,
MarkerTracingType::END));
MarkerTracingType::END)));
}

} // namespace mozilla
4 changes: 2 additions & 2 deletions docshell/base/timeline/TimelineConsumers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
{
MOZ_ASSERT(NS_IsMainThread());
if (HasConsumer(aDocShell)) {
aDocShell->mObserved->AddMarker(MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest));
aDocShell->mObserved->AddMarker(std::move(MakeUnique<TimelineMarker>(aName, aTracingType, aStackRequest)));
}
}

Expand All @@ -198,7 +198,7 @@ TimelineConsumers::AddMarkerForDocShell(nsDocShell* aDocShell,
{
MOZ_ASSERT(NS_IsMainThread());
if (HasConsumer(aDocShell)) {
aDocShell->mObserved->AddMarker(MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest));
aDocShell->mObserved->AddMarker(std::move(MakeUnique<TimelineMarker>(aName, aTime, aTracingType, aStackRequest)));
}
}

Expand Down
2 changes: 1 addition & 1 deletion dom/animation/EffectSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class EffectSet
public:
explicit Iterator(EffectSet& aEffectSet)
: mEffectSet(aEffectSet)
, mHashIterator(aEffectSet.mEffects.Iter())
, mHashIterator(std::move(aEffectSet.mEffects.Iter()))
, mIsEndIterator(false)
{
#ifdef DEBUG
Expand Down
2 changes: 1 addition & 1 deletion dom/base/CustomElementRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ CustomElementRegistry::CreateCustomElementCallback(
if (aAdoptedCallbackArgs) {
callback->SetAdoptedCallbackArgs(*aAdoptedCallbackArgs);
}
return callback;
return std::move(callback);
}

/* static */ void
Expand Down
4 changes: 2 additions & 2 deletions dom/base/nsContentPermissionHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ nsContentPermissionUtils::GetContentPermissionRequestParentById(const TabId& aTa
}
}

return parentArray;
return std::move(parentArray);
}

/* static */ void
Expand All @@ -455,7 +455,7 @@ nsContentPermissionUtils::GetContentPermissionRequestChildById(const TabId& aTab
}
}

return childArray;
return std::move(childArray);
}

/* static */ void
Expand Down
12 changes: 6 additions & 6 deletions dom/base/nsDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5565,29 +5565,29 @@ nsIDocument::GetClientInfo() const
{
nsPIDOMWindowInner* inner = GetInnerWindow();
if (inner) {
return inner->GetClientInfo();
return std::move(inner->GetClientInfo());
}
return Maybe<ClientInfo>();
return std::move(Maybe<ClientInfo>());
}

Maybe<ClientState>
nsIDocument::GetClientState() const
{
nsPIDOMWindowInner* inner = GetInnerWindow();
if (inner) {
return inner->GetClientState();
return std::move(inner->GetClientState());
}
return Maybe<ClientState>();
return std::move(Maybe<ClientState>());
}

Maybe<ServiceWorkerDescriptor>
nsIDocument::GetController() const
{
nsPIDOMWindowInner* inner = GetInnerWindow();
if (inner) {
return inner->GetController();
return std::move(inner->GetController());
}
return Maybe<ServiceWorkerDescriptor>();
return std::move(Maybe<ServiceWorkerDescriptor>());
}

//
Expand Down
16 changes: 8 additions & 8 deletions dom/base/nsGlobalWindowInner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2320,25 +2320,25 @@ nsPIDOMWindowInner::SyncStateFromParentWindow()
Maybe<ClientInfo>
nsPIDOMWindowInner::GetClientInfo() const
{
return nsGlobalWindowInner::Cast(this)->GetClientInfo();
return std::move(nsGlobalWindowInner::Cast(this)->GetClientInfo());
}

Maybe<ClientState>
nsPIDOMWindowInner::GetClientState() const
{
return nsGlobalWindowInner::Cast(this)->GetClientState();
return std::move(nsGlobalWindowInner::Cast(this)->GetClientState());
}

Maybe<ServiceWorkerDescriptor>
nsPIDOMWindowInner::GetController() const
{
return nsGlobalWindowInner::Cast(this)->GetController();
return std::move(nsGlobalWindowInner::Cast(this)->GetController());
}

RefPtr<mozilla::dom::ServiceWorker>
nsPIDOMWindowInner::GetOrCreateServiceWorker(const mozilla::dom::ServiceWorkerDescriptor& aDescriptor)
{
return nsGlobalWindowInner::Cast(this)->GetOrCreateServiceWorker(aDescriptor);
return std::move(nsGlobalWindowInner::Cast(this)->GetOrCreateServiceWorker(aDescriptor));
}

void
Expand Down Expand Up @@ -5498,7 +5498,7 @@ nsGlobalWindowInner::ShowSlowScriptDialog(const nsString& aAddonId)

// GetStringFromName can return NS_OK and still give nullptr string
failed = failed || NS_FAILED(rv) || result.IsEmpty();
return result;
return std::move(result);
};

bool isAddonScript = !aAddonId.IsEmpty();
Expand Down Expand Up @@ -6329,7 +6329,7 @@ nsGlobalWindowInner::GetClientInfo() const
if (mClientSource) {
clientInfo.emplace(mClientSource->Info());
}
return clientInfo;
return std::move(clientInfo);
}

Maybe<ClientState>
Expand All @@ -6344,7 +6344,7 @@ nsGlobalWindowInner::GetClientState() const
clientState.emplace(state);
}
}
return clientState;
return std::move(clientState);
}

Maybe<ServiceWorkerDescriptor>
Expand All @@ -6355,7 +6355,7 @@ nsGlobalWindowInner::GetController() const
if (mClientSource) {
controller = mClientSource->GetController();
}
return controller;
return std::move(controller);
}

RefPtr<ServiceWorker>
Expand Down
2 changes: 1 addition & 1 deletion dom/canvas/ImageBitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ ImageBitmap::ToCloneData() const
result->mSurface = surface->GetDataSurface();
MOZ_ASSERT(result->mSurface);

return result;
return std::move(result);
}

/* static */ already_AddRefed<ImageBitmap>
Expand Down
4 changes: 2 additions & 2 deletions dom/canvas/WebGLFormats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ FormatUsageAuthority::CreateForWebGL1(gl::GLContext* gl)
if (!AddUnsizedFormats(ptr, gl))
return nullptr;

return ret;
return std::move(ret);
}

UniquePtr<FormatUsageAuthority>
Expand Down Expand Up @@ -1062,7 +1062,7 @@ FormatUsageAuthority::CreateForWebGL2(gl::GLContext* gl)

////////////////////////////////////

return ret;
return std::move(ret);
}

//////////////////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions dom/canvas/WebGLTextureUpload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ FromImageBitmap(WebGLContext* webgl, const char* funcName, TexImageTarget target
uint32_t width, uint32_t height, uint32_t depth,
const dom::ImageBitmap& imageBitmap)
{
UniquePtr<dom::ImageBitmapCloneData> cloneData = imageBitmap.ToCloneData();
UniquePtr<dom::ImageBitmapCloneData> cloneData = std::move(imageBitmap.ToCloneData());
if (!cloneData) {
return nullptr;
}
Expand Down Expand Up @@ -460,7 +460,7 @@ ValidateTexOrSubImage(WebGLContext* webgl, const char* funcName, TexImageTarget
if (!blob || !blob->Validate(webgl, funcName, pi))
return nullptr;

return blob;
return std::move(blob);
}

void
Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/ClientHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ ClientHandle::OnDetach()
}

RefPtr<GenericPromise> ref(mDetachPromise);
return ref;
return std::move(ref);
}

} // namespace dom
Expand Down
2 changes: 1 addition & 1 deletion dom/clients/manager/ClientInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ ClientInfo::GetPrincipal() const
{
MOZ_ASSERT(NS_IsMainThread());
nsCOMPtr<nsIPrincipal> ref = PrincipalInfoToPrincipal(PrincipalInfo());
return ref;
return std::move(ref);
}

} // namespace dom
Expand Down
6 changes: 3 additions & 3 deletions dom/clients/manager/ClientManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,20 @@ ClientManager::CreateSourceInternal(ClientType aType,
ClientSourceConstructorArgs args(id, aType, aPrincipal, TimeStamp::Now());
UniquePtr<ClientSource> source(new ClientSource(this, aEventTarget, args));
source->Shutdown();
return source;
return std::move(source);
}

ClientSourceConstructorArgs args(id, aType, aPrincipal, TimeStamp::Now());
UniquePtr<ClientSource> source(new ClientSource(this, aEventTarget, args));

if (IsShutdown()) {
source->Shutdown();
return source;
return std::move(source);
}

source->Activate(GetActor());

return source;
return std::move(source);
}

already_AddRefed<ClientHandle>
Expand Down
4 changes: 2 additions & 2 deletions dom/clients/manager/ClientManagerService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ ClientManagerService::MatchAll(const ClientMatchAllArgs& aArgs)
}

promiseList->AddPromise(
source->StartOp(ClientGetInfoAndStateArgs(source->Info().Id(),
source->Info().PrincipalInfo())));
source->StartOp(std::move(ClientGetInfoAndStateArgs(source->Info().Id(),
source->Info().PrincipalInfo()))));
}

// Maybe finish the promise now in case we didn't find any matching clients.
Expand Down
8 changes: 4 additions & 4 deletions dom/console/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2887,8 +2887,8 @@ Console::MonotonicTimer(JSContext* aCx, MethodName aMethodName,
return false;
}

timelines->AddMarkerForDocShell(docShell,
MakeUnique<TimestampTimelineMarker>(key));
timelines->AddMarkerForDocShell(docShell, std::move(
MakeUnique<TimestampTimelineMarker>(key)));
}
// For `console.time(foo)` and `console.timeEnd(foo)`.
else if (isTimelineRecording && aData.Length() == 1) {
Expand All @@ -2903,10 +2903,10 @@ Console::MonotonicTimer(JSContext* aCx, MethodName aMethodName,
return false;
}

timelines->AddMarkerForDocShell(docShell,
timelines->AddMarkerForDocShell(docShell, std::move(
MakeUnique<ConsoleTimelineMarker>(
key, aMethodName == MethodTime ? MarkerTracingType::START
: MarkerTracingType::END));
: MarkerTracingType::END)));
}

return true;
Expand Down
4 changes: 2 additions & 2 deletions dom/events/EventListenerManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,9 +1245,9 @@ EventListenerManager::HandleEventInternal(nsPresContext* aPresContext,
nsAutoString typeStr;
(*aDOMEvent)->GetType(typeStr);
uint16_t phase = (*aDOMEvent)->EventPhase();
timelines->AddMarkerForDocShell(docShell,
timelines->AddMarkerForDocShell(docShell, std::move(
MakeUnique<EventTimelineMarker>(
typeStr, phase, MarkerTracingType::START));
typeStr, phase, MarkerTracingType::START)));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion dom/file/uri/BlobURLProtocolHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ class ReleasingTimerHolder final : public Runnable
nsresult rv = svc->GetXpcomWillShutdown(getter_AddRefs(phase));
NS_ENSURE_SUCCESS(rv, nullptr);

return phase;
return std::move(phase);
}

nsCString mURI;
Expand Down
4 changes: 2 additions & 2 deletions dom/geolocation/nsGeolocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ Geolocation::GetCurrentPosition(PositionCallback& aCallback,
{
nsresult rv = GetCurrentPosition(GeoPositionCallback(&aCallback),
GeoPositionErrorCallback(aErrorCallback),
CreatePositionOptionsCopy(aOptions),
std::move(CreatePositionOptionsCopy(aOptions)),
aCallerType);

if (NS_FAILED(rv)) {
Expand Down Expand Up @@ -1242,7 +1242,7 @@ Geolocation::WatchPosition(PositionCallback& aCallback,
int32_t ret = 0;
nsresult rv = WatchPosition(GeoPositionCallback(&aCallback),
GeoPositionErrorCallback(aErrorCallback),
CreatePositionOptionsCopy(aOptions),
std::move(CreatePositionOptionsCopy(aOptions)),
aCallerType,
&ret);

Expand Down
Loading

0 comments on commit 7e765f7

Please sign in to comment.