Bug 1521000 - Part 1: Reformat the tree to ensure everything is formatted correctly with clang-format r=sylvestre

Summary: # ignore-this-changeset

Reviewers: sylvestre

Reviewed By: sylvestre

Subscribers: reviewbot, emilio, jandem, bbouvier, karlt, jya

Bug #: 1521000

Differential Revision: https://phabricator.services.mozilla.com/D16936

--HG--
extra : histedit_source : 4add583bfa729ccc1aef934629ed45ff095189b0
This commit is contained in:
Ehsan Akhgari 2019-01-18 10:12:56 +01:00
parent 3a99ace175
commit 06c3d29113
48 changed files with 242 additions and 233 deletions

View File

@ -63,8 +63,8 @@ bool nsCoreUtils::HasClickListener(nsIContent *aContent) {
listenerManager->HasListenersFor(nsGkAtoms::onmouseup));
}
void nsCoreUtils::DispatchClickEvent(XULTreeElement *aTree,
int32_t aRowIndex, nsTreeColumn *aColumn,
void nsCoreUtils::DispatchClickEvent(XULTreeElement *aTree, int32_t aRowIndex,
nsTreeColumn *aColumn,
const nsAString &aPseudoElt) {
RefPtr<dom::Element> tcElm = aTree->GetTreeBody();
if (!tcElm) return;

View File

@ -1062,9 +1062,8 @@ nsDOMNavigationTiming* nsDocShell::GetNavigationTiming() const {
innerTargetURI = NS_GetInnermostURI(targetURI);
}
return innerOriginURI && innerTargetURI &&
SchemeIsFile(innerOriginURI) &&
SchemeIsFile(innerTargetURI);
return innerOriginURI && innerTargetURI && SchemeIsFile(innerOriginURI) &&
SchemeIsFile(innerTargetURI);
}
nsPresContext* nsDocShell::GetEldestPresContext() {
@ -5508,8 +5507,8 @@ nsDocShell::GetAllowMixedContentAndConnectionData(
// For things with system principal (e.g. scratchpad) there is no uri
// aRootHasSecureConnection should be false.
nsCOMPtr<nsIURI> rootUri = rootPrincipal->GetURI();
if (nsContentUtils::IsSystemPrincipal(rootPrincipal) ||
!rootUri || !SchemeIsHTTPS(rootUri)) {
if (nsContentUtils::IsSystemPrincipal(rootPrincipal) || !rootUri ||
!SchemeIsHTTPS(rootUri)) {
*aRootHasSecureConnection = false;
}
@ -9770,9 +9769,8 @@ nsresult nsDocShell::DoURILoad(nsDocShellLoadState* aLoadState,
true, // aInheritForAboutBlank
isSrcdoc);
bool isURIUniqueOrigin =
nsIOService::IsDataURIUniqueOpaqueOrigin() &&
SchemeIsData(aLoadState->URI());
bool isURIUniqueOrigin = nsIOService::IsDataURIUniqueOpaqueOrigin() &&
SchemeIsData(aLoadState->URI());
inheritPrincipal = inheritAttrs && !isURIUniqueOrigin;
}
@ -9892,8 +9890,8 @@ nsresult nsDocShell::DoURILoad(nsDocShellLoadState* aLoadState,
getter_AddRefs(channel));
} else {
rv = NS_NewInputStreamChannelInternal(
getter_AddRefs(channel), aLoadState->URI(), aSrcdoc,
NS_LITERAL_CSTRING("text/html"), loadInfo, true);
getter_AddRefs(channel), aLoadState->URI(), aSrcdoc,
NS_LITERAL_CSTRING("text/html"), loadInfo, true);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIInputStreamChannel> isc = do_QueryInterface(channel);
MOZ_ASSERT(isc);

View File

@ -222,7 +222,7 @@ EventStateManager::DeltaAccumulator*
EventStateManager::DeltaAccumulator::sInstance = nullptr;
constexpr const StyleCursorKind kInvalidCursorKind =
static_cast<StyleCursorKind>(255);
static_cast<StyleCursorKind>(255);
EventStateManager::EventStateManager()
: mLockCursor(kInvalidCursorKind),
@ -3665,7 +3665,8 @@ void EventStateManager::UpdateCursor(nsPresContext* aPresContext,
// Show busy cursor everywhere before page loads
// and just replace the arrow cursor after page starts loading
if (busyFlags & nsIDocShell::BUSY_FLAGS_BUSY &&
(cursor == StyleCursorKind::Auto || cursor == StyleCursorKind::Default)) {
(cursor == StyleCursorKind::Auto ||
cursor == StyleCursorKind::Default)) {
cursor = StyleCursorKind::Progress;
container = nullptr;
}

View File

@ -74,8 +74,7 @@ class PreallocatedProcessManagerImpl final : public nsIObserver {
/* static */ StaticRefPtr<PreallocatedProcessManagerImpl>
PreallocatedProcessManagerImpl::sSingleton;
/* static */ uint32_t
PreallocatedProcessManagerImpl::sPrelaunchDelayMS = 0;
/* static */ uint32_t PreallocatedProcessManagerImpl::sPrelaunchDelayMS = 0;
/* static */ PreallocatedProcessManagerImpl*
PreallocatedProcessManagerImpl::Singleton() {
@ -101,10 +100,9 @@ PreallocatedProcessManagerImpl::~PreallocatedProcessManagerImpl() {
}
void PreallocatedProcessManagerImpl::Init() {
Preferences::AddUintVarCache(
&sPrelaunchDelayMS,
"dom.ipc.processPrelaunch.delayMs",
DEFAULT_ALLOCATE_DELAY);
Preferences::AddUintVarCache(&sPrelaunchDelayMS,
"dom.ipc.processPrelaunch.delayMs",
DEFAULT_ALLOCATE_DELAY);
Preferences::AddStrongObserver(this, "dom.ipc.processPrelaunch.enabled");
// We have to respect processCount at all time. This is especially important
// for testing.

View File

@ -235,8 +235,9 @@ static bool IsAllowedToPlayInternal(const HTMLMediaElement& aElement) {
}
nsPIDOMWindowInner* window = aContext.GetParentObject();
Document* approver = aContext.GetParentObject() ?
ApproverDocOf(*(window->GetExtantDoc())) : nullptr;
Document* approver = aContext.GetParentObject()
? ApproverDocOf(*(window->GetExtantDoc()))
: nullptr;
if (IsSiteInAutoplayWhiteList(approver)) {
AUTOPLAY_LOG(
"Allow autoplay as document has permanent autoplay permission.");

View File

@ -1017,7 +1017,8 @@ void AudioContext::MaybeUpdateAutoplayTelemetryWhenShutdown() {
}
void AudioContext::ReportBlocked() {
ReportToConsole(nsIScriptError::warningFlag, "BlockAutoplayWebAudioStartError");
ReportToConsole(nsIScriptError::warningFlag,
"BlockAutoplayWebAudioStartError");
mWasAllowedToStart = false;
if (!StaticPrefs::MediaBlockEventEnabled()) {

View File

@ -28,7 +28,7 @@ enum class CallerType : uint32_t;
class XULTreeElement final : public nsXULElement {
public:
explicit XULTreeElement(already_AddRefed<mozilla::dom::NodeInfo> &&aNodeInfo)
explicit XULTreeElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsXULElement(std::move(aNodeInfo)),
mCachedFirstVisibleRow(0),
mTreeBody(nullptr) {}
@ -118,8 +118,8 @@ class XULTreeElement final : public nsXULElement {
virtual ~XULTreeElement() {}
JSObject *WrapNode(JSContext *aCx,
JS::Handle<JSObject *> aGivenProto) override;
JSObject* WrapNode(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
};
} // namespace dom

View File

@ -886,11 +886,11 @@ bool LayerTransactionParent::IsSameProcess() const {
void LayerTransactionParent::SetPendingTransactionId(
TransactionId aId, const VsyncId& aVsyncId,
const TimeStamp& aVsyncStartTime, const TimeStamp& aRefreshStartTime,
const TimeStamp& aTxnStartTime, const TimeStamp& aTxnEndTime, bool aContainsSVG,
const nsCString& aURL, const TimeStamp& aFwdTime) {
mPendingTransactions.AppendElement(
PendingTransaction{aId, aVsyncId, aVsyncStartTime, aRefreshStartTime,
aTxnStartTime, aTxnEndTime, aFwdTime, aURL, aContainsSVG});
const TimeStamp& aTxnStartTime, const TimeStamp& aTxnEndTime,
bool aContainsSVG, const nsCString& aURL, const TimeStamp& aFwdTime) {
mPendingTransactions.AppendElement(PendingTransaction{
aId, aVsyncId, aVsyncStartTime, aRefreshStartTime, aTxnStartTime,
aTxnEndTime, aFwdTime, aURL, aContainsSVG});
}
TransactionId LayerTransactionParent::FlushTransactionId(

View File

@ -410,9 +410,8 @@ struct DIGroup {
geometry->ComputeInvalidationRegion());
aData->mGeometry = std::move(geometry);
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
IntRect transformedRect = ToDeviceSpace(
clippedBounds, aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
aData->mRect = transformedRect.Intersect(mImageBounds);
GP("CGC %s %d %d %d %d\n", aItem->Name(), clippedBounds.x,
clippedBounds.y, clippedBounds.width, clippedBounds.height);
@ -441,9 +440,8 @@ struct DIGroup {
// matrix?
// XXX: TransformBounds is expensive. We should avoid doing it if we have
// no transform
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
IntRect transformedRect = ToDeviceSpace(
clippedBounds, aMatrix, appUnitsPerDevPixel, mLayerBounds.TopLeft());
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
GP("new rect: %d %d %d %d\n", aData->mRect.x, aData->mRect.y,
@ -551,8 +549,8 @@ struct DIGroup {
geometry->ComputeInvalidationRegion());
aData->mGeometry = std::move(geometry);
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix,
appUnitsPerDevPixel, mLayerBounds.TopLeft());
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
InvalidateRect(aData->mRect.Intersect(mImageBounds));
aData->mRect = transformedRect.Intersect(mImageBounds);
InvalidateRect(aData->mRect);
@ -562,8 +560,8 @@ struct DIGroup {
nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
geometry->ComputeInvalidationRegion());
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix,
appUnitsPerDevPixel, mLayerBounds.TopLeft());
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
// The invalid rect should contain the old rect and the new rect
// but may not because the parent may have been removed.
InvalidateRect(aData->mRect);
@ -575,8 +573,8 @@ struct DIGroup {
nsRect clippedBounds = clip.ApplyNonRoundedIntersection(
geometry->ComputeInvalidationRegion());
IntRect transformedRect =
ToDeviceSpace(clippedBounds, aMatrix,
appUnitsPerDevPixel, mLayerBounds.TopLeft());
ToDeviceSpace(clippedBounds, aMatrix, appUnitsPerDevPixel,
mLayerBounds.TopLeft());
auto rect = transformedRect.Intersect(mImageBounds);
GP("Layer NoChange: %s %d %d %d %d\n", aItem->Name(),
aData->mRect.x, aData->mRect.y, aData->mRect.XMost(),

View File

@ -19,8 +19,8 @@
namespace mozilla {
namespace gfx {
class FilterPrimitiveDescription;
} // namespace gfx
} // namespace mozilla
} // namespace gfx
} // namespace mozilla
DECLARE_USE_COPY_CONSTRUCTORS(mozilla::gfx::FilterPrimitiveDescription)

View File

@ -48,13 +48,9 @@ static StaticRefPtr<VRGPUChild> sVRGPUChildSingleton;
sVRGPUChildSingleton = nullptr;
}
void VRGPUChild::ActorDestroy(ActorDestroyReason aWhy) {
mClosed = true;
}
void VRGPUChild::ActorDestroy(ActorDestroyReason aWhy) { mClosed = true; }
bool VRGPUChild::IsClosed() {
return mClosed;
}
bool VRGPUChild::IsClosed() { return mClosed; }
} // namespace gfx
} // namespace mozilla

View File

@ -13,17 +13,14 @@ namespace gfx {
using namespace ipc;
VRGPUParent::VRGPUParent(ProcessId aChildProcessId)
: mClosed(false) {
VRGPUParent::VRGPUParent(ProcessId aChildProcessId) : mClosed(false) {
MOZ_COUNT_CTOR(VRGPUParent);
MOZ_ASSERT(NS_IsMainThread());
SetOtherProcessId(aChildProcessId);
}
VRGPUParent::~VRGPUParent() {
MOZ_COUNT_DTOR(VRGPUParent);
}
VRGPUParent::~VRGPUParent() { MOZ_COUNT_DTOR(VRGPUParent); }
void VRGPUParent::ActorDestroy(ActorDestroyReason aWhy) {
#if !defined(MOZ_WIDGET_ANDROID)
@ -80,9 +77,7 @@ mozilla::ipc::IPCResult VRGPUParent::RecvStopVRService() {
return IPC_OK();
}
bool VRGPUParent::IsClosed() {
return mClosed;
}
bool VRGPUParent::IsClosed() { return mClosed; }
} // namespace gfx
} // namespace mozilla

View File

@ -22,7 +22,6 @@ class VRGPUParent final : public PVRGPUParent {
bool IsClosed();
protected:
void Bind(Endpoint<PVRGPUParent>&& aEndpoint);
virtual mozilla::ipc::IPCResult RecvStartVRService() override;
virtual mozilla::ipc::IPCResult RecvStopVRService() override;

View File

@ -799,12 +799,12 @@ wr::WrSpaceAndClip DisplayListBuilder::DefineScrollLayer(
// We haven't defined aViewId before, so let's define it now.
wr::WrSpaceAndClip defaultParent = wr::RootScrollNode();
//Note: we are currently ignoring the clipId on the stack here
// Note: we are currently ignoring the clipId on the stack here
defaultParent.space = mCurrentSpaceAndClipChain.space;
auto spaceAndClip = wr_dp_define_scroll_layer(
mWrState, aViewId, aParent ? aParent.ptr() : &defaultParent,
aContentRect, aClipRect);
mWrState, aViewId, aParent ? aParent.ptr() : &defaultParent, aContentRect,
aClipRect);
WRDL_LOG("DefineScrollLayer id=%" PRIu64 "/%zu p=%s co=%s cl=%s\n", mWrState,
aViewId, spaceAndClip.space.id,

View File

@ -147,9 +147,7 @@ const CPOWProxyHandler CPOWProxyHandler::singleton;
if (!owner->allowMessage(cx)) { \
return failRetVal; \
} \
{ \
return owner->call args; \
}
{ return owner->call args; }
bool CPOWProxyHandler::getOwnPropertyDescriptor(
JSContext* cx, HandleObject proxy, HandleId id,

View File

@ -4223,8 +4223,7 @@ static void DiscardJITCodeForGC(JSRuntime* rt) {
for (GCZonesIter zone(rt); !zone.done(); zone.next()) {
gcstats::AutoPhase ap(rt->gc.stats(),
gcstats::PhaseKind::MARK_DISCARD_CODE);
zone->discardJitCode(rt->defaultFreeOp(),
Zone::DiscardBaselineCode,
zone->discardJitCode(rt->defaultFreeOp(), Zone::DiscardBaselineCode,
Zone::ReleaseTypes);
}
}

View File

@ -113,6 +113,6 @@ class MOZ_RAII AutoUnlockGC {
AutoUnlockGC& operator=(const AutoUnlockGC&) = delete;
};
} // namespace js
} // namespace js
#endif /* gc_GCLock_h */

View File

@ -191,14 +191,12 @@ class Zone : public JS::shadow::Zone,
DiscardBaselineCode
};
enum ShouldReleaseTypes : bool {
KeepTypes = false,
ReleaseTypes
};
enum ShouldReleaseTypes : bool { KeepTypes = false, ReleaseTypes };
void discardJitCode(js::FreeOp* fop,
ShouldDiscardBaselineCode discardBaselineCode = DiscardBaselineCode,
ShouldReleaseTypes releaseTypes = KeepTypes);
void discardJitCode(
js::FreeOp* fop,
ShouldDiscardBaselineCode discardBaselineCode = DiscardBaselineCode,
ShouldReleaseTypes releaseTypes = KeepTypes);
void addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
size_t* typePool, size_t* regexpZone,

View File

@ -638,9 +638,7 @@ class JS::Realm : public JS::shadow::Realm {
* principals during its lifetime (e.g. in case of lazy parsing).
*/
JSPrincipals* principals() { return principals_; }
void setPrincipals(JSPrincipals* principals) {
principals_ = principals;
}
void setPrincipals(JSPrincipals* principals) { principals_ = principals; }
bool isSystem() const { return isSystem_; }

View File

@ -1143,8 +1143,7 @@ bool Instance::memoryAccessInGuardRegion(uint8_t* addr,
lastByteOffset < memoryMappedSize();
}
bool Instance::memoryAccessInBounds(uint8_t* addr,
unsigned numBytes) const {
bool Instance::memoryAccessInBounds(uint8_t* addr, unsigned numBytes) const {
MOZ_ASSERT(numBytes > 0 && numBytes <= sizeof(double));
if (!metadata().usesMemory()) {

View File

@ -447,23 +447,40 @@ struct AutoHandlingTrap {
static uintptr_t ReadGPR(CONTEXT* context, uint32_t rn) {
switch (rn) {
case 0: return context->uc_mcontext.arm_r0;
case 1: return context->uc_mcontext.arm_r1;
case 2: return context->uc_mcontext.arm_r2;
case 3: return context->uc_mcontext.arm_r3;
case 4: return context->uc_mcontext.arm_r4;
case 5: return context->uc_mcontext.arm_r5;
case 6: return context->uc_mcontext.arm_r6;
case 7: return context->uc_mcontext.arm_r7;
case 8: return context->uc_mcontext.arm_r8;
case 9: return context->uc_mcontext.arm_r9;
case 10: return context->uc_mcontext.arm_r10;
case 11: return context->uc_mcontext.arm_fp;
case 12: return context->uc_mcontext.arm_ip;
case 13: return context->uc_mcontext.arm_sp;
case 14: return context->uc_mcontext.arm_lr;
case 15: return context->uc_mcontext.arm_pc;
default: MOZ_CRASH();
case 0:
return context->uc_mcontext.arm_r0;
case 1:
return context->uc_mcontext.arm_r1;
case 2:
return context->uc_mcontext.arm_r2;
case 3:
return context->uc_mcontext.arm_r3;
case 4:
return context->uc_mcontext.arm_r4;
case 5:
return context->uc_mcontext.arm_r5;
case 6:
return context->uc_mcontext.arm_r6;
case 7:
return context->uc_mcontext.arm_r7;
case 8:
return context->uc_mcontext.arm_r8;
case 9:
return context->uc_mcontext.arm_r9;
case 10:
return context->uc_mcontext.arm_r10;
case 11:
return context->uc_mcontext.arm_fp;
case 12:
return context->uc_mcontext.arm_ip;
case 13:
return context->uc_mcontext.arm_sp;
case 14:
return context->uc_mcontext.arm_lr;
case 15:
return context->uc_mcontext.arm_pc;
default:
MOZ_CRASH();
}
}
@ -482,11 +499,10 @@ static uintptr_t ReadGPR(CONTEXT* context, uint32_t rn) {
// vfp_sigframe and VFP_MAGIC in this form since at least Android 3.4 / 2012;
// Firefox requires Android 4.0 at least and we're probably safe here.
struct vfp_sigframe
{
unsigned long magic;
unsigned long size;
struct user_vfp ufp;
struct vfp_sigframe {
unsigned long magic;
unsigned long size;
struct user_vfp ufp;
struct user_vfp_exc ufp_exc;
};
@ -558,12 +574,13 @@ static bool HandleUnalignedTrap(CONTEXT* context, uint8_t* pc,
// - we're encountering a device that traps on new kinds of accesses,
// perhaps unaligned integer accesses
// - general code generation bugs that lead to SIGBUS
# ifdef ANDROID
__android_log_print(ANDROID_LOG_ERROR, "WASM", "Bad SIGBUS instr %08x", instr);
# endif
# ifdef DEBUG
#ifdef ANDROID
__android_log_print(ANDROID_LOG_ERROR, "WASM", "Bad SIGBUS instr %08x",
instr);
#endif
#ifdef DEBUG
MOZ_CRASH("Unexpected instruction");
# endif
#endif
return false;
}
@ -579,8 +596,8 @@ static bool HandleUnalignedTrap(CONTEXT* context, uint8_t* pc,
uint8_t* p = (uint8_t*)ReadGPR(context, rn) + (isAdd ? offs : -offs);
if (!instance->memoryAccessInBounds(p, isDouble ? sizeof(double)
: sizeof(float))) {
if (!instance->memoryAccessInBounds(
p, isDouble ? sizeof(double) : sizeof(float))) {
return false;
}
@ -619,16 +636,17 @@ static bool HandleUnalignedTrap(CONTEXT* context, uint8_t* pc,
}
#ifdef DEBUG
MOZ_CRASH("SIGBUS handler could not access FP register, incompatible kernel?");
MOZ_CRASH(
"SIGBUS handler could not access FP register, incompatible kernel?");
#endif
return false;
}
#else // __linux__ && __arm__
#else // __linux__ && __arm__
static bool HandleUnalignedTrap(CONTEXT* context, uint8_t* pc,
Instance* instance) {
return false;
}
#endif // __linux__ && __arm__
#endif // __linux__ && __arm__
static MOZ_MUST_USE bool HandleTrap(CONTEXT* context,
bool isUnalignedSignal = false,

View File

@ -1471,7 +1471,7 @@ nsresult nsHTMLFramesetBorderFrame::GetCursor(const nsPoint& aPoint,
aCursor.mCursor = StyleCursorKind::Default;
} else {
aCursor.mCursor =
(mVertical) ? StyleCursorKind::EwResize: StyleCursorKind::NsResize;
(mVertical) ? StyleCursorKind::EwResize : StyleCursorKind::NsResize;
}
return NS_OK;
}

View File

@ -7882,9 +7882,8 @@ bool nsDisplayTransform::CreateWebRenderCommands(
aSc, GetActiveScrolledRoot(), mFrame, this, aBuilder, filters,
LayoutDeviceRect(position, LayoutDeviceSize()), &newTransformMatrix,
animationsId ? &prop : nullptr, nullptr, transformForSC, nullptr,
gfx::CompositionOp::OP_OVER, !BackfaceIsHidden(),
preserve3D, deferredTransformItem, wr::WrStackingContextClip::None(),
animated);
gfx::CompositionOp::OP_OVER, !BackfaceIsHidden(), preserve3D,
deferredTransformItem, wr::WrStackingContextClip::None(), animated);
return mStoredList.CreateWebRenderCommands(aBuilder, aResources, sc, aManager,
aDisplayListBuilder);

View File

@ -174,7 +174,6 @@ class nsStyleCoord {
static bool ConvertsToPercent(const nsStyleUnit aUnit,
const nsStyleUnion aValue) {
if (aUnit == eStyleUnit_Percent) {
return true;
}

View File

@ -227,8 +227,8 @@ void nsImageBoxFrame::UpdateImage() {
nsresult rv = nsContentUtils::LoadImage(
uri, mContent, doc, triggeringPrincipal, requestContextID,
doc->GetDocumentURIAsReferrer(), doc->GetReferrerPolicy(),
mListener, mLoadFlags, EmptyString(),
getter_AddRefs(mImageRequest), contentPolicyType);
mListener, mLoadFlags, EmptyString(), getter_AddRefs(mImageRequest),
contentPolicyType);
if (NS_SUCCEEDED(rv) && mImageRequest) {
nsLayoutUtils::RegisterImageRequestIfAnimated(

View File

@ -5416,13 +5416,15 @@ static NS_DEFINE_CID(kPrefServiceCID, NS_PREFSERVICE_CID);
static NS_DEFINE_CID(kPrefLocalizedStringCID, NS_PREFLOCALIZEDSTRING_CID);
static mozilla::Module::CIDEntry kPrefCIDs[] = {
{&kPrefServiceCID, true, nullptr, PreferencesConstructor, Module::ALLOW_IN_SOCKET_PROCESS},
{&kPrefServiceCID, true, nullptr, PreferencesConstructor,
Module::ALLOW_IN_SOCKET_PROCESS},
{&kPrefLocalizedStringCID, false, nullptr,
nsPrefLocalizedStringConstructor},
{nullptr}};
static mozilla::Module::ContractIDEntry kPrefContracts[] = {
{NS_PREFSERVICE_CONTRACTID, &kPrefServiceCID, Module::ALLOW_IN_SOCKET_PROCESS},
{NS_PREFSERVICE_CONTRACTID, &kPrefServiceCID,
Module::ALLOW_IN_SOCKET_PROCESS},
{NS_PREFLOCALIZEDSTRING_CONTRACTID, &kPrefLocalizedStringCID},
{nullptr}};

View File

@ -930,13 +930,14 @@ static const mozilla::Module::ContractIDEntry kNeckoContracts[] = {
// clang-format on
};
static const mozilla::Module kNeckoModule = {mozilla::Module::kVersion,
kNeckoCIDs,
kNeckoContracts,
kNeckoCategories,
nullptr,
nsNetStartup,
nsNetShutdown,
mozilla::Module::ALLOW_IN_SOCKET_PROCESS};
static const mozilla::Module kNeckoModule = {
mozilla::Module::kVersion,
kNeckoCIDs,
kNeckoContracts,
kNeckoCategories,
nullptr,
nsNetStartup,
nsNetShutdown,
mozilla::Module::ALLOW_IN_SOCKET_PROCESS};
NSMODULE_DEFN(necko) = &kNeckoModule;

View File

@ -158,7 +158,7 @@ mozilla::ipc::IPCResult SocketProcessChild::RecvInitProfiler(
mozilla::ipc::IPCResult SocketProcessChild::RecvSocketProcessTelemetryPing() {
const uint32_t kExpectedUintValue = 42;
Telemetry::ScalarSet(Telemetry::ScalarID::TELEMETRY_TEST_SOCKET_ONLY_UINT,
kExpectedUintValue);
kExpectedUintValue);
return IPC_OK();
}

View File

@ -21,7 +21,7 @@
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wextra"
#endif // __clang__ || __GNUC__
#endif // __clang__ || __GNUC__
#include "mozilla/dom/XULTreeElement.h"
@ -29,7 +29,7 @@
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif // __clang__ || __GNUC__
#endif // __clang__ || __GNUC__
// 4bfaa9f0-1dd2-11b2-afae-a82cbaa0b606
#define NS_NSSASN1OUTINER_CID \

View File

@ -26,7 +26,7 @@
#elif defined(__GNUC__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wextra"
#endif // __clang__ || __GNUC__
#endif // __clang__ || __GNUC__
#include "mozilla/dom/XULTreeElement.h"
@ -34,7 +34,7 @@
#pragma clang diagnostic pop
#elif defined(__GNUC__)
#pragma GCC diagnostic pop
#endif // __clang__ || __GNUC__
#endif // __clang__ || __GNUC__
typedef struct treeArrayElStr treeArrayEl;

View File

@ -1528,7 +1528,8 @@ nsresult PendingLookup::SendRemoteQueryInternal(Reason& aReason) {
if (LOG_ENABLED()) {
nsAutoCString serializedStr(serialized.c_str(), serialized.length());
serializedStr.ReplaceSubstring(NS_LITERAL_CSTRING("\0"), NS_LITERAL_CSTRING("\\0"));
serializedStr.ReplaceSubstring(NS_LITERAL_CSTRING("\0"),
NS_LITERAL_CSTRING("\\0"));
LOG(("Serialized protocol buffer [this = %p]: (length=%d) %s", this,
serializedStr.Length(), serializedStr.get()));

View File

@ -129,8 +129,8 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(DynamicFrameEventFilter)
/* static */ already_AddRefed<nsISupports>
SessionStoreUtils::AddDynamicFrameFilteredListener(
const GlobalObject& aGlobal, EventTarget& aTarget, const nsAString& aType,
JS::Handle<JS::Value> aListener, bool aUseCapture,
bool aMozSystemGroup, ErrorResult& aRv) {
JS::Handle<JS::Value> aListener, bool aUseCapture, bool aMozSystemGroup,
ErrorResult& aRv) {
if (NS_WARN_IF(!aListener.isObject())) {
aRv.Throw(NS_ERROR_INVALID_ARG);
return nullptr;
@ -157,8 +157,8 @@ SessionStoreUtils::AddDynamicFrameFilteredListener(
/* static */ void SessionStoreUtils::RemoveDynamicFrameFilteredListener(
const GlobalObject& global, EventTarget& aTarget, const nsAString& aType,
nsISupports* aListener, bool aUseCapture,
bool aMozSystemGroup, ErrorResult& aRv) {
nsISupports* aListener, bool aUseCapture, bool aMozSystemGroup,
ErrorResult& aRv) {
nsCOMPtr<nsIDOMEventListener> listener = do_QueryInterface(aListener);
if (!listener) {
aRv.Throw(NS_ERROR_NO_INTERFACE);
@ -383,7 +383,8 @@ static void CollectFromTextAreaElement(Document& aDocument,
textArea->GetValue(value);
// In order to reduce XPath generation (which is slow), we only save data
// for form fields that have been changed. (cf. bug 537289)
if (textArea->AttrValueIs(kNameSpaceID_None, nsGkAtoms::value, value, eCaseMatters)) {
if (textArea->AttrValueIs(kNameSpaceID_None, nsGkAtoms::value, value,
eCaseMatters)) {
continue;
}
Record<nsString, OwningStringOrBooleanOrLongOrObject>::EntryType* entry =
@ -406,7 +407,8 @@ static void CollectFromInputElement(JSContext* aCx, Document& aDocument,
uint32_t length = inputlist->Length(true);
for (uint32_t i = 0; i < length; ++i) {
MOZ_ASSERT(inputlist->Item(i), "null item in node list!");
nsCOMPtr<nsIFormControl> formControl = do_QueryInterface(inputlist->Item(i));
nsCOMPtr<nsIFormControl> formControl =
do_QueryInterface(inputlist->Item(i));
if (formControl) {
uint8_t controlType = formControl->ControlType();
if (controlType == NS_FORM_INPUT_PASSWORD ||
@ -469,7 +471,8 @@ static void CollectFromInputElement(JSContext* aCx, Document& aDocument,
// Also, don't want to collect credit card number.
if (value.IsEmpty() || IsValidCCNumber(value) ||
input->HasBeenTypePassword() ||
input->AttrValueIs(kNameSpaceID_None, nsGkAtoms::value, value, eCaseMatters)) {
input->AttrValueIs(kNameSpaceID_None, nsGkAtoms::value, value,
eCaseMatters)) {
continue;
}
if (!id.IsEmpty()) {
@ -485,7 +488,8 @@ static void CollectFromInputElement(JSContext* aCx, Document& aDocument,
if (JS_ParseJSON(aCx, value.get(), value.Length(), &jsval) &&
jsval.isObject()) {
Record<nsString, OwningStringOrBooleanOrLongOrObject>::EntryType*
entry = AppendEntryToCollectedData(input, id, aGeneratedCount, aRetVal);
entry = AppendEntryToCollectedData(input, id, aGeneratedCount,
aRetVal);
entry->mValue.SetAsObject() = &jsval.toObject();
} else {
JS_ClearPendingException(aCx);
@ -622,7 +626,8 @@ static void CollectFromXULTextbox(Document& aDocument,
}
input->GetValue(value, CallerType::System);
if (value.IsEmpty() ||
input->AttrValueIs(kNameSpaceID_None, nsGkAtoms::value, value, eCaseMatters)) {
input->AttrValueIs(kNameSpaceID_None, nsGkAtoms::value, value,
eCaseMatters)) {
continue;
}
uint16_t generatedCount = 0;
@ -635,14 +640,17 @@ static void CollectFromXULTextbox(Document& aDocument,
}
/* static */ void SessionStoreUtils::CollectFormData(
const GlobalObject& aGlobal, Document& aDocument, CollectedFormData& aRetVal) {
const GlobalObject& aGlobal, Document& aDocument,
CollectedFormData& aRetVal) {
uint16_t generatedCount = 0;
/* textarea element */
CollectFromTextAreaElement(aDocument, generatedCount, aRetVal);
/* input element */
CollectFromInputElement(aGlobal.Context(), aDocument, generatedCount, aRetVal);
CollectFromInputElement(aGlobal.Context(), aDocument, generatedCount,
aRetVal);
/* select element */
CollectFromSelectElement(aGlobal.Context(), aDocument, generatedCount, aRetVal);
CollectFromSelectElement(aGlobal.Context(), aDocument, generatedCount,
aRetVal);
/* special case for about:config's search field */
CollectFromXULTextbox(aDocument, aRetVal);

View File

@ -28,13 +28,13 @@ class SessionStoreUtils {
static already_AddRefed<nsISupports> AddDynamicFrameFilteredListener(
const GlobalObject& aGlobal, EventTarget& aTarget, const nsAString& aType,
JS::Handle<JS::Value> aListener, bool aUseCapture,
bool aMozSystemGroup, ErrorResult& aRv);
JS::Handle<JS::Value> aListener, bool aUseCapture, bool aMozSystemGroup,
ErrorResult& aRv);
static void RemoveDynamicFrameFilteredListener(
const GlobalObject& aGlobal, EventTarget& aTarget, const nsAString& aType,
nsISupports* aListener, bool aUseCapture,
bool aMozSystemGroup, ErrorResult& aRv);
nsISupports* aListener, bool aUseCapture, bool aMozSystemGroup,
ErrorResult& aRv);
static void CollectDocShellCapabilities(const GlobalObject& aGlobal,
nsIDocShell* aDocShell,

View File

@ -2175,8 +2175,8 @@ nsresult nsUrlClassifierDBService::LookupURI(
}
uint32_t perm;
rv = permissionManager->TestPermissionFromPrincipal(
aPrincipal, "safe-browsing", &perm);
rv = permissionManager->TestPermissionFromPrincipal(aPrincipal,
"safe-browsing", &perm);
NS_ENSURE_SUCCESS(rv, rv);
bool clean = (perm == nsIPermissionManager::ALLOW_ACTION);

View File

@ -239,7 +239,7 @@ void Channel::PrintMessage(const char* aPrefix, const Message& aMsg) {
switch (aMsg.mType) {
case MessageType::HitExecutionPoint: {
const HitExecutionPointMessage& nmsg =
(const HitExecutionPointMessage&)aMsg;
(const HitExecutionPointMessage&)aMsg;
nmsg.mPoint.ToString(data);
data.AppendPrintf(" Endpoint %d Duration %.2f ms",
nmsg.mRecordingEndpoint,

View File

@ -161,7 +161,10 @@ struct Message {
}
public:
struct FreePolicy { void operator()(Message* msg) { /*free(msg);*/ } };
struct FreePolicy {
void operator()(Message* msg) { /*free(msg);*/
}
};
typedef UniquePtr<Message, FreePolicy> UniquePtr;
UniquePtr Clone() const {

View File

@ -65,7 +65,7 @@ static bool gDebuggerRunsInMiddleman;
// Any response received to the last MiddlemanCallRequest message.
static UniquePtr<MiddlemanCallResponseMessage, Message::FreePolicy>
gCallResponseMessage;
gCallResponseMessage;
// Whether some thread has sent a MiddlemanCallRequest and is waiting for
// gCallResponseMessage to be filled in.

View File

@ -87,7 +87,8 @@ namespace child {
// IPC activity that can be triggered by navigation.
void RespondToRequest(const js::CharBuffer& aBuffer);
void HitExecutionPoint(const js::ExecutionPoint& aPoint, bool aRecordingEndpoint);
void HitExecutionPoint(const js::ExecutionPoint& aPoint,
bool aRecordingEndpoint);
// Optional information about a crash that occurred. If not provided to
// ReportFatalError, the current thread will be treated as crashed.

View File

@ -65,13 +65,13 @@ void ChildProcessInfo::OnIncomingMessage(const Message& aMsg,
case MessageType::FatalError: {
mHasFatalError = true;
const FatalErrorMessage& nmsg =
static_cast<const FatalErrorMessage&>(aMsg);
static_cast<const FatalErrorMessage&>(aMsg);
OnCrash(nmsg.Error());
return;
}
case MessageType::HitExecutionPoint: {
const HitExecutionPointMessage& nmsg =
static_cast<const HitExecutionPointMessage&>(aMsg);
static_cast<const HitExecutionPointMessage&>(aMsg);
mPaused = true;
if (this == GetActiveChild() && !nmsg.mPoint.HasPosition()) {
MaybeUpdateGraphicsAtCheckpoint(nmsg.mPoint.mCheckpoint);
@ -93,7 +93,7 @@ void ChildProcessInfo::OnIncomingMessage(const Message& aMsg,
break;
case MessageType::MiddlemanCallRequest: {
const MiddlemanCallRequestMessage& nmsg =
static_cast<const MiddlemanCallRequestMessage&>(aMsg);
static_cast<const MiddlemanCallRequestMessage&>(aMsg);
Message::UniquePtr response(ProcessMiddlemanCallMessage(nmsg));
SendMessage(*response);
break;
@ -163,10 +163,10 @@ void ChildProcessInfo::LaunchSubprocess(
// deleting or tearing down the old one's state. This is pretty lame and it
// would be nice if we could do something better here, especially because
// with restarts we could create any number of channels over time.
mChannel = new Channel(channelId, IsRecording(),
[=](Message::UniquePtr aMsg) {
ReceiveChildMessageOnMainThread(std::move(aMsg));
});
mChannel =
new Channel(channelId, IsRecording(), [=](Message::UniquePtr aMsg) {
ReceiveChildMessageOnMainThread(std::move(aMsg));
});
MOZ_RELEASE_ASSERT(IsRecording() == aRecordingProcessData.isSome());
if (IsRecording()) {
@ -259,9 +259,7 @@ struct PendingMessage {
return *this;
}
PendingMessage(PendingMessage&& aOther) {
*this = std::move(aOther);
}
PendingMessage(PendingMessage&& aOther) { *this = std::move(aOther); }
};
static StaticInfallibleVector<PendingMessage> gPendingMessages;
@ -364,7 +362,8 @@ Message::UniquePtr ChildProcessInfo::WaitUntilPaused() {
// Execute a task that processes a message received from the child. This is
// called on a channel thread, and the function executes asynchronously on
// the main thread.
void ChildProcessInfo::ReceiveChildMessageOnMainThread(Message::UniquePtr aMsg) {
void ChildProcessInfo::ReceiveChildMessageOnMainThread(
Message::UniquePtr aMsg) {
MOZ_RELEASE_ASSERT(!NS_IsMainThread());
MonitorAutoLock lock(*gMonitor);

View File

@ -150,11 +150,9 @@ bool BreakpointPosition::Decode(JSContext* aCx, HandleObject aObject) {
return true;
}
void
BreakpointPosition::ToString(nsCString& aStr) const
{
void BreakpointPosition::ToString(nsCString& aStr) const {
aStr.AppendPrintf("{ Kind: %s, Script: %d, Offset: %d, Frame: %d }",
KindString(), (int) mScript, (int) mOffset, (int) mFrameIndex);
KindString(), (int)mScript, (int)mOffset, (int)mFrameIndex);
}
///////////////////////////////////////////////////////////////////////////////
@ -178,9 +176,8 @@ JSObject* ExecutionPoint::Encode(JSContext* aCx) const {
}
if (HasPosition()) {
RootedObject position(aCx, mPosition.Encode(aCx));
if (!position ||
!JS_DefineProperty(aCx, obj, gPositionProperty, position,
JSPROP_ENUMERATE)) {
if (!position || !JS_DefineProperty(aCx, obj, gPositionProperty, position,
JSPROP_ENUMERATE)) {
return nullptr;
}
}
@ -205,10 +202,8 @@ bool ExecutionPoint::Decode(JSContext* aCx, HandleObject aObject) {
GetNumberProperty(aCx, aObject, gProgressProperty, &mProgress);
}
void
ExecutionPoint::ToString(nsCString& aStr) const
{
aStr.AppendPrintf("{ Checkpoint %d", (int) mCheckpoint);
void ExecutionPoint::ToString(nsCString& aStr) const {
aStr.AppendPrintf("{ Checkpoint %d", (int)mCheckpoint);
if (HasPosition()) {
aStr.AppendPrintf(" Progress %llu Position ", mProgress);
mPosition.ToString(aStr);
@ -229,10 +224,9 @@ static JSObject* EncodeChannelMessage(JSContext* aCx,
RootedObject pointObject(aCx, aMsg.mPoint.Encode(aCx));
if (!pointObject ||
!JS_DefineProperty(aCx, obj, "point", pointObject,
!JS_DefineProperty(aCx, obj, "point", pointObject, JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, obj, "recordingEndpoint", aMsg.mRecordingEndpoint,
JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, obj, "recordingEndpoint",
aMsg.mRecordingEndpoint, JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, obj, "duration",
aMsg.mDurationMicroseconds / 1000.0,
JSPROP_ENUMERATE)) {
@ -252,7 +246,7 @@ void SetupMiddlemanControl(const Maybe<size_t>& aRecordingChildId) {
MOZ_RELEASE_ASSERT(!gControl);
nsCOMPtr<rrIControl> control =
do_ImportModule("resource://devtools/server/actors/replay/control.js");
do_ImportModule("resource://devtools/server/actors/replay/control.js");
gControl = control.forget();
ClearOnShutdown(&gControl);
@ -270,7 +264,8 @@ void SetupMiddlemanControl(const Maybe<size_t>& aRecordingChildId) {
}
}
void ForwardHitExecutionPointMessage(size_t aId, const HitExecutionPointMessage& aMsg) {
void ForwardHitExecutionPointMessage(size_t aId,
const HitExecutionPointMessage& aMsg) {
MOZ_RELEASE_ASSERT(gControl);
AutoSafeJSContext cx;
@ -361,8 +356,8 @@ static bool Middleman_CanRewind(JSContext* aCx, unsigned aArgc, Value* aVp) {
return true;
}
static bool Middleman_SpawnReplayingChild(JSContext* aCx,
unsigned aArgc, Value* aVp) {
static bool Middleman_SpawnReplayingChild(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
size_t id = parent::SpawnReplayingChild();
@ -370,8 +365,8 @@ static bool Middleman_SpawnReplayingChild(JSContext* aCx,
return true;
}
static bool Middleman_SetActiveChild(JSContext* aCx,
unsigned aArgc, Value* aVp) {
static bool Middleman_SetActiveChild(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
parent::ChildProcessInfo* child = GetChildById(aCx, args.get(0));
@ -385,8 +380,8 @@ static bool Middleman_SetActiveChild(JSContext* aCx,
return true;
}
static bool Middleman_SendSetSaveCheckpoint(JSContext* aCx,
unsigned aArgc, Value* aVp) {
static bool Middleman_SendSetSaveCheckpoint(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
parent::ChildProcessInfo* child = GetChildById(aCx, args.get(0));
@ -407,8 +402,8 @@ static bool Middleman_SendSetSaveCheckpoint(JSContext* aCx,
return true;
}
static bool Middleman_SendFlushRecording(JSContext* aCx,
unsigned aArgc, Value* aVp) {
static bool Middleman_SendFlushRecording(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
parent::ChildProcessInfo* child = GetChildById(aCx, args.get(0));
@ -441,7 +436,8 @@ static bool Middleman_SendResume(JSContext* aCx, unsigned aArgc, Value* aVp) {
return true;
}
static bool Middleman_SendRestoreCheckpoint(JSContext* aCx, unsigned aArgc, Value* aVp) {
static bool Middleman_SendRestoreCheckpoint(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
parent::ChildProcessInfo* child = GetChildById(aCx, args.get(0));
@ -460,7 +456,8 @@ static bool Middleman_SendRestoreCheckpoint(JSContext* aCx, unsigned aArgc, Valu
return true;
}
static bool Middleman_SendRunToPoint(JSContext* aCx, unsigned aArgc, Value* aVp) {
static bool Middleman_SendRunToPoint(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
parent::ChildProcessInfo* child = GetChildById(aCx, args.get(0));
@ -489,13 +486,13 @@ static js::CharBuffer* gResponseBuffer;
void OnDebuggerResponse(const Message& aMsg) {
const DebuggerResponseMessage& nmsg =
static_cast<const DebuggerResponseMessage&>(aMsg);
static_cast<const DebuggerResponseMessage&>(aMsg);
MOZ_RELEASE_ASSERT(gResponseBuffer && gResponseBuffer->empty());
gResponseBuffer->append(nmsg.Buffer(), nmsg.BufferSize());
}
static bool Middleman_SendDebuggerRequest(JSContext* aCx,
unsigned aArgc, Value* aVp) {
static bool Middleman_SendDebuggerRequest(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
parent::ChildProcessInfo* child = GetChildById(aCx, args.get(0));
@ -519,8 +516,8 @@ static bool Middleman_SendDebuggerRequest(JSContext* aCx,
MOZ_RELEASE_ASSERT(!gResponseBuffer);
gResponseBuffer = &responseBuffer;
DebuggerRequestMessage* msg =
DebuggerRequestMessage::New(requestBuffer.begin(), requestBuffer.length());
DebuggerRequestMessage* msg = DebuggerRequestMessage::New(
requestBuffer.begin(), requestBuffer.length());
child->SendMessage(*msg);
free(msg);
@ -534,8 +531,8 @@ static bool Middleman_SendDebuggerRequest(JSContext* aCx,
args.rval());
}
static bool Middleman_SendAddBreakpoint(JSContext* aCx,
unsigned aArgc, Value* aVp) {
static bool Middleman_SendAddBreakpoint(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
parent::ChildProcessInfo* child = GetChildById(aCx, args.get(0));
@ -559,8 +556,8 @@ static bool Middleman_SendAddBreakpoint(JSContext* aCx,
return true;
}
static bool Middleman_SendClearBreakpoints(JSContext* aCx,
unsigned aArgc, Value* aVp) {
static bool Middleman_SendClearBreakpoints(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
parent::ChildProcessInfo* child = GetChildById(aCx, args.get(0));
@ -602,8 +599,8 @@ static bool Middleman_HadRepaintFailure(JSContext* aCx, unsigned aArgc,
return true;
}
static bool Middleman_InRepaintStressMode(JSContext* aCx,
unsigned aArgc, Value* aVp) {
static bool Middleman_InRepaintStressMode(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
args.rval().setBoolean(parent::InRepaintStressMode());
@ -641,7 +638,7 @@ static bool Middleman_WaitUntilPaused(JSContext* aCx, unsigned aArgc,
MOZ_RELEASE_ASSERT(msg->mType == MessageType::HitExecutionPoint);
const HitExecutionPointMessage& nmsg =
static_cast<const HitExecutionPointMessage&>(*msg);
static_cast<const HitExecutionPointMessage&>(*msg);
JSObject* obj = EncodeChannelMessage(aCx, nmsg);
if (!obj) {

View File

@ -69,9 +69,7 @@ bool IsMiddlemanWithRecordingChild() {
return IsMiddleman() && gRecordingChild;
}
ChildProcessInfo* GetActiveChild() {
return gActiveChild;
}
ChildProcessInfo* GetActiveChild() { return gActiveChild; }
ChildProcessInfo* GetChildProcess(size_t aId) {
if (gRecordingChild && gRecordingChild->GetId() == aId) {

View File

@ -151,7 +151,8 @@ class ChildProcessInfo {
const Maybe<RecordingProcessData>& aRecordingProcessData);
public:
explicit ChildProcessInfo(const Maybe<RecordingProcessData>& aRecordingProcessData);
explicit ChildProcessInfo(
const Maybe<RecordingProcessData>& aRecordingProcessData);
~ChildProcessInfo();
size_t GetId() { return mChannel->GetId(); }

View File

@ -260,7 +260,8 @@ std::wstring LauncherRegistryInfo::ResolveImageTimestampValueName() {
}
LauncherVoidResult LauncherRegistryInfo::WriteStartTimestamp(
LauncherRegistryInfo::ProcessType aProcessType, const Maybe<uint64_t>& aValue) {
LauncherRegistryInfo::ProcessType aProcessType,
const Maybe<uint64_t>& aValue) {
LauncherResult<std::wstring> name = ResolveValueName(aProcessType);
if (name.isErr()) {
return LAUNCHER_ERROR_FROM_RESULT(name);

View File

@ -44,8 +44,8 @@ class LauncherRegistryInfo final {
private:
LauncherResult<Disposition> Open();
LauncherVoidResult WriteStartTimestamp(ProcessType aProcessType,
const Maybe<uint64_t>& aValue = Nothing());
LauncherVoidResult WriteStartTimestamp(
ProcessType aProcessType, const Maybe<uint64_t>& aValue = Nothing());
LauncherResult<DWORD> GetCurrentImageTimestamp();
LauncherVoidResult WriteImageTimestamp(DWORD aTimestamp);
LauncherResult<bool> ClearStartTimestamp(ProcessType aProcessType);

View File

@ -674,9 +674,8 @@ int main(int argc, char* argv[]) {
return 1;
}
auto onExit = mozilla::MakeScopeExit([]() {
mozilla::Unused << DeleteAllTimestamps();
});
auto onExit = mozilla::MakeScopeExit(
[]() { mozilla::Unused << DeleteAllTimestamps(); });
VoidResult vr = mozilla::Ok();

View File

@ -3231,14 +3231,14 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent,
MOZ_ASSERT(shouldAccelerate | !useWebRender);
// Some Gtk+ themes use non-rectangular toplevel windows. To fully support
// such themes we need to make toplevel window transparent with ARGB visual.
// It may cause performanance issue so make it configurable
// and enable it by default for selected window managers.
// Also disable it for X11 SW rendering (Bug 1516224) by default.
// such themes we need to make toplevel window transparent with ARGB
// visual. It may cause performanance issue so make it configurable and
// enable it by default for selected window managers. Also disable it for
// X11 SW rendering (Bug 1516224) by default.
if (mWindowType == eWindowType_toplevel &&
(shouldAccelerate || !mIsX11Display ||
Preferences::HasUserValue("mozilla.widget.use-argb-visuals"))) {
needsAlphaVisual = TopLevelWindowUseARGBVisual();
Preferences::HasUserValue("mozilla.widget.use-argb-visuals"))) {
needsAlphaVisual = TopLevelWindowUseARGBVisual();
}
bool isSetVisual = false;

View File

@ -301,14 +301,15 @@ const mozilla::Module::ContractIDEntry kXPCOMContracts[] = {
#undef COMPONENT
#undef COMPONENT_M
const mozilla::Module kXPCOMModule = {mozilla::Module::kVersion,
kXPCOMCIDEntries,
kXPCOMContracts,
nullptr,
nullptr,
nullptr,
nullptr,
Module::ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS};
const mozilla::Module kXPCOMModule = {
mozilla::Module::kVersion,
kXPCOMCIDEntries,
kXPCOMContracts,
nullptr,
nullptr,
nullptr,
nullptr,
Module::ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS};
// gDebug will be freed during shutdown.
static nsIDebug2* gDebug = nullptr;

View File

@ -53,8 +53,10 @@ struct Module {
ALLOW_IN_VR_PROCESS = 0x8,
ALLOW_IN_SOCKET_PROCESS = 0x10,
ALLOW_IN_GPU_AND_VR_PROCESS = ALLOW_IN_GPU_PROCESS | ALLOW_IN_VR_PROCESS,
ALLOW_IN_GPU_AND_SOCKET_PROCESS = ALLOW_IN_GPU_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS = ALLOW_IN_GPU_PROCESS | ALLOW_IN_VR_PROCESS | ALLOW_IN_SOCKET_PROCESS
ALLOW_IN_GPU_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_SOCKET_PROCESS,
ALLOW_IN_GPU_VR_AND_SOCKET_PROCESS =
ALLOW_IN_GPU_PROCESS | ALLOW_IN_VR_PROCESS | ALLOW_IN_SOCKET_PROCESS
};
/**