--- a/accessible/base/nsAccUtils.cpp
+++ b/accessible/base/nsAccUtils.cpp
@@ -347,17 +347,17 @@ nsAccUtils::ConvertScreenCoordsTo(int32_
{
nsIntPoint coords = GetScreenCoordsForParent(aAccessible);
*aX -= coords.x;
*aY -= coords.y;
break;
}
default:
- MOZ_ASSERT_UNREACHABLE("invalid coord type!");
+ MOZ_ASSERT_UNREACHABLE("invalid coord type!");
}
}
nsIntPoint
nsAccUtils::GetScreenCoordsForParent(Accessible* aAccessible)
{
Accessible* parent = aAccessible->Parent();
if (!parent)
--- a/dom/animation/CSSPseudoElement.cpp
+++ b/dom/animation/CSSPseudoElement.cpp
@@ -115,15 +115,15 @@ CSSPseudoElement::GetCSSPseudoElementPro
case CSSPseudoElementType::before:
return nsGkAtoms::cssPseudoElementBeforeProperty;
case CSSPseudoElementType::after:
return nsGkAtoms::cssPseudoElementAfterProperty;
default:
MOZ_ASSERT_UNREACHABLE("Should not try to get CSSPseudoElement "
- "other than ::before or ::after");
+ "other than ::before or ::after");
return nullptr;
}
}
} // namespace dom
} // namespace mozilla
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -476,18 +476,18 @@ EffectCompositor::GetElementToRestyle(do
if (aPseudoType == CSSPseudoElementType::before) {
return nsLayoutUtils::GetBeforePseudo(aElement);
}
if (aPseudoType == CSSPseudoElementType::after) {
return nsLayoutUtils::GetAfterPseudo(aElement);
}
- MOZ_ASSERT_UNREACHABLE("Should not try to get the element to restyle for a pseudo "
- "other that :before or :after");
+ MOZ_ASSERT_UNREACHABLE("Should not try to get the element to restyle for "
+ "a pseudo other that :before or :after");
return nullptr;
}
bool
EffectCompositor::HasPendingStyleUpdates() const
{
for (auto& elementSet : mElementsToRestyle) {
if (elementSet.Count()) {
--- a/dom/animation/EffectSet.cpp
+++ b/dom/animation/EffectSet.cpp
@@ -137,18 +137,18 @@ EffectSet::GetEffectSetPropertyAtom(CSSP
case CSSPseudoElementType::before:
return nsGkAtoms::animationEffectsForBeforeProperty;
case CSSPseudoElementType::after:
return nsGkAtoms::animationEffectsForAfterProperty;
default:
- MOZ_ASSERT_UNREACHABLE("Should not try to get animation effects for a pseudo "
- "other that :before or :after");
+ MOZ_ASSERT_UNREACHABLE("Should not try to get animation effects for "
+ "a pseudo other that :before or :after");
return nullptr;
}
}
void
EffectSet::AddEffect(dom::KeyframeEffect& aEffect)
{
if (mEffects.Contains(&aEffect)) {
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -8214,17 +8214,18 @@ void
nsDocument::UnblockOnload(bool aFireSync)
{
if (mDisplayDocument) {
mDisplayDocument->UnblockOnload(aFireSync);
return;
}
if (mOnloadBlockCount == 0 && mAsyncOnloadBlockCount == 0) {
- MOZ_ASSERT_UNREACHABLE("More UnblockOnload() calls than BlockOnload() calls; dropping call");
+ MOZ_ASSERT_UNREACHABLE("More UnblockOnload() calls than BlockOnload() "
+ "calls; dropping call");
return;
}
--mOnloadBlockCount;
if (mOnloadBlockCount == 0) {
if (mScriptGlobalObject) {
// Only manipulate the loadgroup in this case, because if mScriptGlobalObject
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -556,19 +556,17 @@ nsObjectLoadingContent::SetupFrameLoader
{
nsCOMPtr<nsIContent> thisContent =
do_QueryInterface(static_cast<nsIImageLoadingContent*>(this));
NS_ASSERTION(thisContent, "must be a content");
mFrameLoader = nsFrameLoader::Create(thisContent->AsElement(),
/* aOpener = */ nullptr,
mNetworkCreated, aJSPluginId);
- if (!mFrameLoader) {
- MOZ_ASSERT_UNREACHABLE("nsFrameLoader::Create failed");
- }
+ MOZ_ASSERT(mFrameLoader, "nsFrameLoader::Create failed");
}
// Helper to spawn the frameloader and return a pointer to its docshell.
already_AddRefed<nsIDocShell>
nsObjectLoadingContent::SetupDocShell(nsIURI* aRecursionCheckURI)
{
SetupFrameLoader(nsFakePluginTag::NOT_JSPLUGIN);
if (!mFrameLoader) {
@@ -995,23 +993,25 @@ nsObjectLoadingContent::OnStartRequest(n
return NS_BINDING_ABORTED;
}
// If we already switched to type plugin, this channel can just be passed to
// the final listener.
if (mType == eType_Plugin) {
if (!mInstanceOwner) {
// We drop mChannel when stopping plugins, so something is wrong
- MOZ_ASSERT_UNREACHABLE("Opened a channel in plugin mode, but don't have a plugin");
+ MOZ_ASSERT_UNREACHABLE("Opened a channel in plugin mode, but don't have "
+ "a plugin");
return NS_BINDING_ABORTED;
}
if (MakePluginListener()) {
return mFinalListener->OnStartRequest(aRequest, nullptr);
}
- MOZ_ASSERT_UNREACHABLE("Failed to create PluginStreamListener, aborting channel");
+ MOZ_ASSERT_UNREACHABLE("Failed to create PluginStreamListener, aborting "
+ "channel");
return NS_BINDING_ABORTED;
}
// Otherwise we should be state loading, and call LoadObject with the channel
if (mType != eType_Loading) {
MOZ_ASSERT_UNREACHABLE("Should be type loading at this point");
return NS_BINDING_ABORTED;
}
@@ -1109,17 +1109,18 @@ nsObjectLoadingContent::OnDataAvailable(
if (mFinalListener) {
// This may re-enter in the case of plugin listeners
nsCOMPtr<nsIStreamListener> listenerGrip(mFinalListener);
return listenerGrip->OnDataAvailable(aRequest, aContext, aInputStream,
aOffset, aCount);
}
// We shouldn't have a connected channel with no final listener
- MOZ_ASSERT_UNREACHABLE("Got data for channel with no connected final listener");
+ MOZ_ASSERT_UNREACHABLE("Got data for channel with no connected final "
+ "listener");
mChannel = nullptr;
return NS_ERROR_UNEXPECTED;
}
// nsIFrameLoaderOwner
NS_IMETHODIMP_(already_AddRefed<nsFrameLoader>)
nsObjectLoadingContent::GetFrameLoader()
@@ -1509,17 +1510,18 @@ nsObjectLoadingContent::CheckProcessPoli
break;
// FIXME Fake plugins look just like real plugins to CSP, should they use
// the fake plugin's handler URI and look like documents instead?
case eType_FakePlugin:
case eType_Plugin:
objectType = GetContentPolicyType();
break;
default:
- MOZ_ASSERT_UNREACHABLE("Calling checkProcessPolicy with a unloadable type");
+ MOZ_ASSERT_UNREACHABLE("Calling checkProcessPolicy with an unloadable "
+ "type");
return false;
}
nsCOMPtr<nsILoadInfo> secCheckLoadInfo =
new LoadInfo(doc->NodePrincipal(), // loading principal
doc->NodePrincipal(), // triggering principal
thisContent,
nsILoadInfo::SEC_ONLY_FOR_EXPLICIT_CONTENTSEC_CHECK,
@@ -2281,17 +2283,18 @@ nsObjectLoadingContent::LoadObject(bool
}
nsCOMPtr<nsIURI> handlerURI;
if (tag) {
tag->GetHandlerURI(getter_AddRefs(handlerURI));
}
if (!handlerURI) {
- MOZ_ASSERT_UNREACHABLE("Selected type is not a proper fake plugin handler");
+ MOZ_ASSERT_UNREACHABLE("Selected type is not a proper fake plugin "
+ "handler");
rv = NS_ERROR_FAILURE;
break;
}
nsCString spec;
handlerURI->GetSpec(spec);
LOG(("OBJLC [%p]: Loading fake plugin handler (%s)", this, spec.get()));
@@ -2303,17 +2306,18 @@ nsObjectLoadingContent::LoadObject(bool
}
}
break;
case eType_Document:
{
if (!mChannel) {
// We could mFrameLoader->LoadURI(mURI), but UpdateObjectParameters
// requires documents have a channel, so this is not a valid state.
- MOZ_ASSERT_UNREACHABLE("Attempting to load a document without a channel");
+ MOZ_ASSERT_UNREACHABLE("Attempting to load a document without a "
+ "channel");
rv = NS_ERROR_FAILURE;
break;
}
nsCOMPtr<nsIDocShell> docShell = SetupDocShell(mURI);
if (!docShell) {
rv = NS_ERROR_FAILURE;
break;
--- a/dom/base/nsStyleLinkElement.cpp
+++ b/dom/base/nsStyleLinkElement.cpp
@@ -172,17 +172,17 @@ nsStyleLinkElement::GetCharset(nsAString
{
aCharset.Truncate();
}
/* virtual */ void
nsStyleLinkElement::OverrideBaseURI(nsIURI* aNewBaseURI)
{
MOZ_ASSERT_UNREACHABLE("Base URI can't be overriden in this implementation "
- "of nsIStyleSheetLinkingElement.");
+ "of nsIStyleSheetLinkingElement.");
}
/* virtual */ void
nsStyleLinkElement::SetLineNumber(uint32_t aLineNumber)
{
mLineNumber = aLineNumber;
}
--- a/dom/html/HTMLInputElement.h
+++ b/dom/html/HTMLInputElement.h
@@ -1220,20 +1220,20 @@ protected:
switch (GetValueMode()) {
case VALUE_MODE_DEFAULT:
return true;
case VALUE_MODE_DEFAULT_ON:
return GetCheckedChanged();
case VALUE_MODE_VALUE:
case VALUE_MODE_FILENAME:
return mValueChanged;
- default:
- MOZ_ASSERT_UNREACHABLE("We should not be there: there are no other modes.");
- return false;
}
+
+ MOZ_ASSERT_UNREACHABLE("We should not be there: there are no other modes.");
+ return false;
}
/**
* Returns the radio group container if the element has one, null otherwise.
* The radio group container will be the form owner if there is one.
* The current document otherwise.
* @return the radio group container if the element has one, null otherwise.
*/
--- a/dom/html/PluginDocument.cpp
+++ b/dom/html/PluginDocument.cpp
@@ -85,17 +85,18 @@ PluginStreamListener::OnStartRequest(nsI
{
AUTO_PROFILER_LABEL("PluginStreamListener::OnStartRequest", NETWORK);
nsCOMPtr<nsIContent> embed = mPluginDoc->GetPluginContent();
nsCOMPtr<nsIObjectLoadingContent> objlc = do_QueryInterface(embed);
nsCOMPtr<nsIStreamListener> objListener = do_QueryInterface(objlc);
if (!objListener) {
- MOZ_ASSERT_UNREACHABLE("PluginStreamListener without appropriate content node");
+ MOZ_ASSERT_UNREACHABLE("PluginStreamListener without appropriate content "
+ "node");
return NS_BINDING_ABORTED;
}
SetStreamListener(objListener);
// Sets up the ObjectLoadingContent tag as if it is waiting for a
// channel, so it can proceed with a load normally once it gets OnStartRequest
nsresult rv = objlc->InitializeFromChannel(request);
--- a/dom/media/webaudio/AudioNodeEngine.h
+++ b/dom/media/webaudio/AudioNodeEngine.h
@@ -324,17 +324,17 @@ public:
* Produce the next block of audio samples, before input is provided.
* ProcessBlock() will be called later, and it then should not change
* aOutput. This is used only for DelayNodeEngine in a feedback loop.
*/
virtual void ProduceBlockBeforeInput(AudioNodeStream* aStream,
GraphTime aFrom,
AudioBlock* aOutput)
{
- MOZ_ASSERT_UNREACHABLE("ProduceBlockBeforeInput called on wrong engine\n");
+ MOZ_ASSERT_UNREACHABLE("ProduceBlockBeforeInput called on wrong engine");
}
/**
* Produce the next block of audio samples, given input samples in the aInput
* array. There is one input sample per active port in aInput, in order.
* This is the multi-input/output version of ProcessBlock. Only one kind
* of ProcessBlock is called on each node, depending on whether the
* number of inputs and outputs are both 1 or not.
--- a/dom/media/webaudio/PannerNode.cpp
+++ b/dom/media/webaudio/PannerNode.cpp
@@ -120,33 +120,33 @@ public:
switch (PanningModelType(aParam)) {
case PanningModelType::Equalpower:
mPanningModelFunction = &PannerNodeEngine::EqualPowerPanningFunction;
break;
case PanningModelType::HRTF:
mPanningModelFunction = &PannerNodeEngine::HRTFPanningFunction;
break;
default:
- MOZ_ASSERT_UNREACHABLE("We should never see the alternate names here");
+ MOZ_ASSERT_UNREACHABLE("We should never see alternate names here");
break;
}
break;
case PannerNode::DISTANCE_MODEL:
switch (DistanceModelType(aParam)) {
case DistanceModelType::Inverse:
mDistanceModelFunction = &PannerNodeEngine::InverseGainFunction;
break;
case DistanceModelType::Linear:
mDistanceModelFunction = &PannerNodeEngine::LinearGainFunction;
break;
case DistanceModelType::Exponential:
mDistanceModelFunction = &PannerNodeEngine::ExponentialGainFunction;
break;
default:
- MOZ_ASSERT_UNREACHABLE("We should never see the alternate names here");
+ MOZ_ASSERT_UNREACHABLE("We should never see alternate names here");
break;
}
break;
default:
NS_ERROR("Bad PannerNodeEngine Int32Parameter");
}
}
void SetThreeDPointParameter(uint32_t aIndex, const ThreeDPoint& aParam) override
--- a/dom/plugins/base/nsNPAPIPluginStreamListener.cpp
+++ b/dom/plugins/base/nsNPAPIPluginStreamListener.cpp
@@ -411,18 +411,18 @@ nsNPAPIPluginStreamListener::OnDataAvail
MOZ_ASSERT(bytesToRead > 0);
uint32_t amountRead = 0;
rv = input->Read(mStreamBuffer + mStreamBufferByteCount, bytesToRead,
&amountRead);
NS_ENSURE_SUCCESS(rv, rv);
if (amountRead == 0) {
- MOZ_ASSERT_UNREACHABLE("input->Read() returns no data, it's almost impossible "
- "to get here");
+ MOZ_ASSERT_UNREACHABLE("input->Read() returns no data, it's almost "
+ "impossible to get here");
break;
}
mStreamBufferByteCount += amountRead;
length -= amountRead;
} else {
// No input, nothing to read. Set length to 0 so that we don't
--- a/dom/plugins/ipc/NPEventOSX.h
+++ b/dom/plugins/ipc/NPEventOSX.h
@@ -71,17 +71,18 @@ struct ParamTraits<mozilla::plugins::NPR
aMsg->WriteDouble(aParam.event.data.draw.y);
aMsg->WriteDouble(aParam.event.data.draw.width);
aMsg->WriteDouble(aParam.event.data.draw.height);
break;
case NPCocoaEventTextInput:
WriteParam(aMsg, aParam.event.data.text.text);
break;
default:
- MOZ_ASSERT_UNREACHABLE("Attempted to serialize unknown event type.");
+ MOZ_ASSERT_UNREACHABLE("Attempted to serialize unknown event "
+ "type.");
return;
}
aMsg->WriteDouble(aParam.contentsScaleFactor);
}
static bool Read(const Message* aMsg, PickleIterator* aIter, paramType* aResult)
{
int type = 0;
@@ -168,17 +169,18 @@ struct ParamTraits<mozilla::plugins::NPR
}
break;
case NPCocoaEventTextInput:
if (!ReadParam(aMsg, aIter, &aResult->event.data.text.text)) {
return false;
}
break;
default:
- MOZ_ASSERT_UNREACHABLE("Attempted to de-serialize unknown event type.");
+ MOZ_ASSERT_UNREACHABLE("Attempted to de-serialize unknown "
+ "event type.");
return false;
}
if (!aMsg->ReadDouble(aIter, &aResult->contentsScaleFactor)) {
return false;
}
return true;
}
--- a/dom/plugins/ipc/PluginInstanceChild.cpp
+++ b/dom/plugins/ipc/PluginInstanceChild.cpp
@@ -299,17 +299,18 @@ PluginInstanceChild::InternalGetNPObject
NS_ASSERTION(actor, "Null actor!");
PluginModuleChild::sBrowserFuncs.retainobject(
actor->GetObject(false));
}
}
break;
default:
- MOZ_ASSERT_UNREACHABLE("Don't know what to do with this value type!");
+ MOZ_ASSERT_UNREACHABLE("Don't know what to do with this value "
+ "type!");
}
#ifdef DEBUG
{
NPError currentResult;
PPluginScriptableObjectChild* currentActor = nullptr;
switch (aValue) {
@@ -515,24 +516,25 @@ PluginInstanceChild::NPN_GetValue(NPNVar
return NPERR_NO_ERROR;
}
#endif /* defined(XP_MACOSX) || defined(XP_WIN) */
case NPNVCSSZoomFactor: {
*static_cast<double*>(aValue) = mCSSZoomFactor;
return NPERR_NO_ERROR;
}
+
#ifdef DEBUG
case NPNVjavascriptEnabledBool:
case NPNVasdEnabledBool:
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
- MOZ_ASSERT_UNREACHABLE("NPNVariable should be handled in PluginModuleChild.");
- MOZ_FALLTHROUGH;
+ MOZ_FALLTHROUGH_ASSERT("NPNVariable should be handled in "
+ "PluginModuleChild.");
#endif
default:
MOZ_LOG(GetPluginLog(), LogLevel::Warning,
("In PluginInstanceChild::NPN_GetValue: Unhandled NPNVariable %i (%s)",
(int) aVar, NPNVariableToString(aVar)));
return NPERR_GENERIC_ERROR;
}
@@ -1119,30 +1121,30 @@ PluginInstanceChild::AnswerCreateChildPl
return IPC_FAIL_NO_REASON(this);
}
MOZ_ASSERT(mPluginWindowHWND);
*aChildPluginWindow = mPluginWindowHWND;
return IPC_OK();
#else
- MOZ_ASSERT_UNREACHABLE("PluginInstanceChild::CreateChildPluginWindow not implemented!");
+ MOZ_ASSERT_UNREACHABLE("CreateChildPluginWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
mozilla::ipc::IPCResult
PluginInstanceChild::RecvCreateChildPopupSurrogate(const NativeWindowHandle& aNetscapeWindow)
{
#if defined(XP_WIN)
mCachedWinlessPluginHWND = aNetscapeWindow;
CreateWinlessPopupSurrogate();
return IPC_OK();
#else
- MOZ_ASSERT_UNREACHABLE("PluginInstanceChild::CreateChildPluginWindow not implemented!");
+ MOZ_ASSERT_UNREACHABLE("CreateChildPluginWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
mozilla::ipc::IPCResult
PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
{
PLUGIN_LOG_DEBUG(("%s (aWindow=<window: 0x%" PRIx64 ", x: %d, y: %d, width: %d, height: %d>)",
@@ -2449,17 +2451,17 @@ PluginInstanceChild::AnswerSetPluginFocu
// when a button click brings up a full screen window. Since we send
// this in response to a WM_SETFOCUS event on our parent, the parent
// should have focus when we receive this. If not, ignore the call.
if (::GetFocus() == mPluginWindowHWND)
return IPC_OK();
::SetFocus(mPluginWindowHWND);
return IPC_OK();
#else
- MOZ_ASSERT_UNREACHABLE("PluginInstanceChild::AnswerSetPluginFocus not implemented!");
+ MOZ_ASSERT_UNREACHABLE("AnswerSetPluginFocus not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
mozilla::ipc::IPCResult
PluginInstanceChild::AnswerUpdateWindow()
{
MOZ_LOG(GetPluginLog(), LogLevel::Debug, ("%s", FULLFUNCTION));
@@ -2469,17 +2471,17 @@ PluginInstanceChild::AnswerUpdateWindow(
RECT rect;
if (GetUpdateRect(GetParent(mPluginWindowHWND), &rect, FALSE)) {
::InvalidateRect(mPluginWindowHWND, &rect, FALSE);
}
UpdateWindow(mPluginWindowHWND);
}
return IPC_OK();
#else
- MOZ_ASSERT_UNREACHABLE("PluginInstanceChild::AnswerUpdateWindow not implemented!");
+ MOZ_ASSERT_UNREACHABLE("AnswerUpdateWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
mozilla::ipc::IPCResult
PluginInstanceChild::RecvNPP_DidComposite()
{
if (mPluginIface->didComposite) {
--- a/dom/plugins/ipc/PluginInstanceParent.cpp
+++ b/dom/plugins/ipc/PluginInstanceParent.cpp
@@ -1994,17 +1994,17 @@ PluginInstanceParent::RecvSetNetscapeWin
#if defined(XP_WIN)
nsPluginInstanceOwner* owner = GetOwner();
if (!owner || NS_FAILED(owner->SetNetscapeWindowAsParent(childWindow))) {
NS_WARNING("Failed to set Netscape window as parent.");
}
return IPC_OK();
#else
- MOZ_ASSERT_UNREACHABLE("PluginInstanceParent::RecvSetNetscapeWindowAsParent not implemented!");
+ MOZ_ASSERT_UNREACHABLE("RecvSetNetscapeWindowAsParent not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
#if defined(OS_WIN)
/*
plugin focus changes between processes
@@ -2225,17 +2225,17 @@ PluginInstanceParent::AnswerPluginFocusC
owner->GetDOMElement(getter_AddRefs(element));
if (fm && element) {
fm->SetFocus(element, 0);
}
}
}
return IPC_OK();
#else
- MOZ_ASSERT_UNREACHABLE("PluginInstanceParent::AnswerPluginFocusChange not implemented!");
+ MOZ_ASSERT_UNREACHABLE("AnswerPluginFocusChange not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
PluginInstanceParent*
PluginInstanceParent::Cast(NPP aInstance)
{
auto ip = static_cast<PluginInstanceParent*>(aInstance->pdata);
--- a/dom/presentation/ipc/PresentationChild.cpp
+++ b/dom/presentation/ipc/PresentationChild.cpp
@@ -43,17 +43,18 @@ PresentationChild::ActorDestroy(ActorDes
mActorDestroyed = true;
mService->NotifyPresentationChildDestroyed();
mService = nullptr;
}
PPresentationRequestChild*
PresentationChild::AllocPPresentationRequestChild(const PresentationIPCRequest& aRequest)
{
- MOZ_ASSERT_UNREACHABLE("We should never be manually allocating PPresentationRequestChild actors");
+ MOZ_ASSERT_UNREACHABLE("We should never be manually allocating "
+ "PPresentationRequestChild actors");
return nullptr;
}
bool
PresentationChild::DeallocPPresentationRequestChild(PPresentationRequestChild* aActor)
{
delete aActor;
return true;
--- a/dom/presentation/ipc/PresentationParent.cpp
+++ b/dom/presentation/ipc/PresentationParent.cpp
@@ -193,17 +193,18 @@ PresentationParent::DeallocPPresentation
dont_AddRef(static_cast<PresentationRequestParent*>(aActor));
return true;
}
PPresentationBuilderParent*
PresentationParent::AllocPPresentationBuilderParent(const nsString& aSessionId,
const uint8_t& aRole)
{
- MOZ_ASSERT_UNREACHABLE("We should never be manually allocating AllocPPresentationBuilderParent actors");
+ MOZ_ASSERT_UNREACHABLE("We should never be manually allocating "
+ "AllocPPresentationBuilderParent actors");
return nullptr;
}
bool
PresentationParent::DeallocPPresentationBuilderParent(
PPresentationBuilderParent* aActor)
{
return true;
--- a/dom/smil/nsSMILAnimationFunction.cpp
+++ b/dom/smil/nsSMILAnimationFunction.cpp
@@ -606,17 +606,17 @@ nsSMILAnimationFunction::ComputePacedPos
aFrom = &aValues[i];
aTo = &aValues[i+1];
aIntervalProgress = remainingDist / curIntervalDist;
return NS_OK;
}
}
MOZ_ASSERT_UNREACHABLE("shouldn't complete loop & get here -- if we do, "
- "then aSimpleProgress was probably out of bounds");
+ "then aSimpleProgress was probably out of bounds");
return NS_ERROR_FAILURE;
}
/*
* Computes the total distance to be travelled by a paced animation.
*
* Returns the total distance, or returns COMPUTE_DISTANCE_ERROR if
* our values don't support distance computation.
--- a/dom/svg/DOMSVGPathSegList.cpp
+++ b/dom/svg/DOMSVGPathSegList.cpp
@@ -121,17 +121,18 @@ DOMSVGPathSegList::InternalListWillChang
{
// When the number of items in our internal counterpart changes, we MUST stay
// in sync. Everything in the scary comment in
// DOMSVGLengthList::InternalBaseValListWillChangeTo applies here just as
// much, but we have the additional issue that failing to stay in sync would
// mean that - assuming we aren't reading bad memory - we would likely end up
// decoding command types from argument floats when looking in our
// SVGPathData's data array! Either way, we'll likely then go down
- // MOZ_ASSERT_UNREACHABLE code paths, or end up reading/setting more bad memory!!
+ // MOZ_ASSERT_UNREACHABLE code paths, or end up reading/setting more bad
+ // memory!!
// The only time that our other DOM list type implementations remove items is
// if those items become surplus items due to an attribute change or SMIL
// animation sample shortening the list. In general though, they try to keep
// their existing DOM items, even when things change. To be consistent, we'd
// really like to do the same thing. However, because different types of path
// segment correspond to different DOMSVGPathSeg subclasses, the type of
// items in our list are generally not the same, which makes this harder for
--- a/dom/svg/SVGLength.cpp
+++ b/dom/svg/SVGLength.cpp
@@ -205,17 +205,18 @@ static void
GetUnitString(nsAString& unit, uint16_t unitType)
{
if (SVGLength::IsValidUnitType(unitType)) {
if (unitMap[unitType]) {
(*unitMap[unitType])->ToString(unit);
}
return;
}
- MOZ_ASSERT_UNREACHABLE("Unknown unit type"); // Someone's using an SVGLength with an invalid unit?
+ MOZ_ASSERT_UNREACHABLE("Unknown unit type! Someone's using an SVGLength "
+ "with an invalid unit?");
}
static uint16_t
GetUnitTypeForString(const nsAString& unitStr)
{
if (unitStr.IsEmpty())
return SVGLengthBinding::SVG_LENGTHTYPE_NUMBER;
--- a/dom/svg/SVGMotionSMILAnimationFunction.cpp
+++ b/dom/svg/SVGMotionSMILAnimationFunction.cpp
@@ -40,17 +40,18 @@ SVGMotionSMILAnimationFunction::MarkStal
} else if (aAttribute == nsGkAtoms::values) {
isAffected = (mPathSourceType <= ePathSourceType_ValuesAttr);
} else if (aAttribute == nsGkAtoms::from ||
aAttribute == nsGkAtoms::to) {
isAffected = (mPathSourceType <= ePathSourceType_ToAttr);
} else if (aAttribute == nsGkAtoms::by) {
isAffected = (mPathSourceType <= ePathSourceType_ByAttr);
} else {
- MOZ_ASSERT_UNREACHABLE("Should only call this method for path-describing attrs");
+ MOZ_ASSERT_UNREACHABLE("Should only call this method for path-describing "
+ "attrs");
isAffected = false;
}
if (isAffected) {
mIsPathStale = true;
mHasChanged = true;
}
}
--- a/dom/svg/SVGMotionSMILAttr.cpp
+++ b/dom/svg/SVGMotionSMILAttr.cpp
@@ -17,18 +17,18 @@
namespace mozilla {
nsresult
SVGMotionSMILAttr::ValueFromString(const nsAString& aStr,
const dom::SVGAnimationElement* aSrcElement,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{
- MOZ_ASSERT_UNREACHABLE("Shouldn't using nsISMILAttr::ValueFromString for parsing "
- "animateMotion's SMIL values.");
+ MOZ_ASSERT_UNREACHABLE("Shouldn't using nsISMILAttr::ValueFromString for "
+ "parsing animateMotion's SMIL values.");
return NS_ERROR_FAILURE;
}
nsSMILValue
SVGMotionSMILAttr::GetBaseValue() const
{
return nsSMILValue(&SVGMotionSMILType::sSingleton);
}
--- a/dom/xhr/XMLHttpRequestMainThread.cpp
+++ b/dom/xhr/XMLHttpRequestMainThread.cpp
@@ -3410,17 +3410,18 @@ XMLHttpRequestMainThread::MozSystem() co
{
return IsSystemXHR();
}
void
XMLHttpRequestMainThread::HandleTimeoutCallback()
{
if (mState == XMLHttpRequestBinding::DONE) {
- MOZ_ASSERT_UNREACHABLE("XMLHttpRequestMainThread::HandleTimeoutCallback with completed request");
+ MOZ_ASSERT_UNREACHABLE("XMLHttpRequestMainThread::HandleTimeoutCallback "
+ "with completed request");
// do nothing!
return;
}
mFlagTimedOut = true;
CloseRequestWithError(ProgressEventType::timeout);
}
--- a/dom/xslt/xpath/txExpr.h
+++ b/dom/xslt/xpath/txExpr.h
@@ -178,17 +178,17 @@ TX_IMPL_EXPR_STUBS_BASE(_class, _ReturnT
Expr* \
_class::getSubExprAt(uint32_t aPos) \
{ \
return nullptr; \
} \
void \
_class::setSubExprAt(uint32_t aPos, Expr* aExpr) \
{ \
- MOZ_ASSERT_UNREACHABLE("setting bad subexpression index"); \
+ MOZ_ASSERT_UNREACHABLE("setting bad subexpression index");\
}
#define TX_IMPL_EXPR_STUBS_1(_class, _ReturnType, _Expr1) \
TX_IMPL_EXPR_STUBS_BASE(_class, _ReturnType) \
Expr* \
_class::getSubExprAt(uint32_t aPos) \
{ \
if (aPos == 0) { \
--- a/dom/xslt/xslt/txXSLTPatterns.h
+++ b/dom/xslt/xslt/txXSLTPatterns.h
@@ -107,29 +107,29 @@ public:
Expr* \
_class::getSubExprAt(uint32_t aPos) \
{ \
return nullptr; \
} \
void \
_class::setSubExprAt(uint32_t aPos, Expr* aExpr) \
{ \
- MOZ_ASSERT_UNREACHABLE("setting bad subexpression index"); \
+ MOZ_ASSERT_UNREACHABLE("setting bad subexpression index");\
}
#define TX_IMPL_PATTERN_STUBS_NO_SUB_PATTERN(_class) \
txPattern* \
_class::getSubPatternAt(uint32_t aPos) \
{ \
return nullptr; \
} \
void \
_class::setSubPatternAt(uint32_t aPos, txPattern* aPattern) \
{ \
- MOZ_ASSERT_UNREACHABLE("setting bad subexpression index"); \
+ MOZ_ASSERT_UNREACHABLE("setting bad subexpression index");\
}
class txUnionPattern : public txPattern
{
public:
nsresult addPattern(txPattern* aPattern)
{
return mLocPathPatterns.AppendElement(aPattern) ?
--- a/dom/xul/XULDocument.cpp
+++ b/dom/xul/XULDocument.cpp
@@ -2559,17 +2559,17 @@ XULDocument::ResumeWalk()
// an inline script could have removed the root element
rv = CreateAndInsertPI(piProto, parent, nullptr);
NS_ENSURE_SUCCESS(rv, rv);
}
}
break;
default:
- MOZ_ASSERT_UNREACHABLE("Unexpected nsXULPrototypeNode::Type value");
+ MOZ_ASSERT_UNREACHABLE("Unexpected nsXULPrototypeNode::Type");
}
}
// Once we get here, the context stack will have been
// depleted. That means that the entire prototype has been
// walked and content has been constructed.
// If we're not already, mark us as now processing overlays.
--- a/editor/libeditor/EditorBase.cpp
+++ b/editor/libeditor/EditorBase.cpp
@@ -2327,19 +2327,18 @@ EditorBase::DebugDumpContent()
#endif
return NS_OK;
}
NS_IMETHODIMP
EditorBase::DebugUnitTests(int32_t* outNumTests,
int32_t* outNumTestsFailed)
{
-#ifdef DEBUG
- MOZ_ASSERT_UNREACHABLE("This should never get called. Overridden by subclasses");
-#endif
+ MOZ_ASSERT_UNREACHABLE("This should never get called. Overridden by "
+ "subclasses");
return NS_OK;
}
bool
EditorBase::ArePreservingSelection()
{
return !(mSavedSel.IsEmpty());
}
--- a/editor/libeditor/PlaceholderTransaction.cpp
+++ b/editor/libeditor/PlaceholderTransaction.cpp
@@ -103,17 +103,18 @@ PlaceholderTransaction::Merge(nsITransac
bool* aDidMerge)
{
NS_ENSURE_TRUE(aDidMerge && aTransaction, NS_ERROR_NULL_POINTER);
// set out param default value
*aDidMerge=false;
if (mForwarding) {
- MOZ_ASSERT_UNREACHABLE("tried to merge into a placeholder that was in forwarding mode!");
+ MOZ_ASSERT_UNREACHABLE("tried to merge into a placeholder that was in "
+ "forwarding mode!");
return NS_ERROR_FAILURE;
}
// XXX: hack, not safe! need nsIEditTransaction!
EditTransactionBase* editTransactionBase = (EditTransactionBase*)aTransaction;
// determine if this incoming txn is a placeholder txn
nsCOMPtr<nsIAbsorbingTransaction> absorbingTransaction =
do_QueryObject(editTransactionBase);
--- a/gfx/layers/ipc/CompositorBridgeChild.cpp
+++ b/gfx/layers/ipc/CompositorBridgeChild.cpp
@@ -384,18 +384,18 @@ static void CalculatePluginClip(const La
#endif
mozilla::ipc::IPCResult
CompositorBridgeChild::RecvUpdatePluginConfigurations(const LayoutDeviceIntPoint& aContentOffset,
const LayoutDeviceIntRegion& aParentLayerVisibleRegion,
nsTArray<PluginWindowData>&& aPlugins)
{
#if !defined(XP_WIN) && !defined(MOZ_WIDGET_GTK)
- MOZ_ASSERT_UNREACHABLE("CompositorBridgeChild::RecvUpdatePluginConfigurations calls "
- "unexpected on this platform.");
+ MOZ_ASSERT_UNREACHABLE("CompositorBridgeChild::RecvUpdatePluginConfigurations"
+ " calls unexpected on this platform.");
return IPC_FAIL_NO_REASON(this);
#else
// Now that we are on the main thread, update plugin widget config.
// This should happen a little before we paint to the screen assuming
// the main thread is running freely.
DebugOnly<nsresult> rv;
MOZ_ASSERT(NS_IsMainThread());
@@ -501,17 +501,17 @@ CompositorBridgeChild::RecvCaptureAllPlu
#endif
}
mozilla::ipc::IPCResult
CompositorBridgeChild::RecvHideAllPlugins(const uintptr_t& aParentWidget)
{
#if !defined(XP_WIN) && !defined(MOZ_WIDGET_GTK)
MOZ_ASSERT_UNREACHABLE("CompositorBridgeChild::RecvHideAllPlugins calls "
- "unexpected on this platform.");
+ "unexpected on this platform.");
return IPC_FAIL_NO_REASON(this);
#else
MOZ_ASSERT(NS_IsMainThread());
nsTArray<uintptr_t> list;
nsIWidget::UpdateRegisteredPluginWindowVisibility(aParentWidget, list);
if (!mCanSend) {
return IPC_OK();
}
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -1121,17 +1121,17 @@ CompositorBridgeParent::RecvRemotePlugin
mHaveBlockedForPlugins = false;
ForceComposeToTarget(nullptr);
} else {
ScheduleComposition();
}
return IPC_OK();
#else
MOZ_ASSERT_UNREACHABLE("CompositorBridgeParent::RecvRemotePluginsReady calls "
- "unexpected on this platform.");
+ "unexpected on this platform.");
return IPC_FAIL_NO_REASON(this);
#endif
}
void
CompositorBridgeParent::ForceComposeToTarget(DrawTarget* aTarget, const gfx::IntRect* aRect)
{
AUTO_PROFILER_LABEL("CompositorBridgeParent::ForceComposeToTarget", GRAPHICS);
--- a/gfx/thebes/gfxFontEntry.h
+++ b/gfx/thebes/gfxFontEntry.h
@@ -501,17 +501,18 @@ protected:
virtual gfxFont *CreateFontInstance(const gfxFontStyle *aFontStyle) = 0;
virtual void CheckForGraphiteTables();
// Copy a font table into aBuffer.
// The caller will be responsible for ownership of the data.
virtual nsresult CopyFontTable(uint32_t aTableTag,
nsTArray<uint8_t>& aBuffer) {
- MOZ_ASSERT_UNREACHABLE("forgot to override either GetFontTable or CopyFontTable?");
+ MOZ_ASSERT_UNREACHABLE("forgot to override either GetFontTable or "
+ "CopyFontTable?");
return NS_ERROR_FAILURE;
}
// lookup the cmap in cached font data
virtual already_AddRefed<gfxCharacterMap>
GetCMAPFromFontInfo(FontInfoData *aFontInfoData,
uint32_t& aUVSOffset);
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2313,17 +2313,18 @@ gfxPlatform::Optimal2DFormatForContent(g
switch (GetOffscreenFormat()) {
case SurfaceFormat::A8R8G8B8_UINT32:
return mozilla::gfx::SurfaceFormat::B8G8R8A8;
case SurfaceFormat::X8R8G8B8_UINT32:
return mozilla::gfx::SurfaceFormat::B8G8R8X8;
case SurfaceFormat::R5G6B5_UINT16:
return mozilla::gfx::SurfaceFormat::R5G6B5_UINT16;
default:
- MOZ_ASSERT_UNREACHABLE("unknown gfxImageFormat for gfxContentType::COLOR");
+ MOZ_ASSERT_UNREACHABLE("unknown gfxImageFormat for "
+ "gfxContentType::COLOR");
return mozilla::gfx::SurfaceFormat::B8G8R8A8;
}
case gfxContentType::ALPHA:
return mozilla::gfx::SurfaceFormat::A8;
case gfxContentType::COLOR_ALPHA:
return mozilla::gfx::SurfaceFormat::B8G8R8A8;
default:
MOZ_ASSERT_UNREACHABLE("unknown gfxContentType");
--- a/gfx/thebes/gfxPlatform.h
+++ b/gfx/thebes/gfxPlatform.h
@@ -353,17 +353,18 @@ public:
virtual nsresult UpdateFontList();
/**
* Create the platform font-list object (gfxPlatformFontList concrete subclass).
* This function is responsible to create the appropriate subclass of
* gfxPlatformFontList *and* to call its InitFontList() method.
*/
virtual gfxPlatformFontList *CreatePlatformFontList() {
- MOZ_ASSERT_UNREACHABLE("oops, this platform doesn't have a gfxPlatformFontList implementation");
+ MOZ_ASSERT_UNREACHABLE("oops, this platform doesn't have a "
+ "gfxPlatformFontList implementation");
return nullptr;
}
/**
* Resolving a font name to family name. The result MUST be in the result of GetFontList().
* If the name doesn't in the system, aFamilyName will be empty string, but not failed.
*/
virtual nsresult GetStandardFamilyName(const nsAString& aFontName, nsAString& aFamilyName);
--- a/gfx/thebes/gfxUserFontSet.cpp
+++ b/gfx/thebes/gfxUserFontSet.cpp
@@ -167,17 +167,17 @@ gfxUserFontEntry::Matches(const nsTArray
((!aUnicodeRanges && !mCharacterMap) ||
(aUnicodeRanges && mCharacterMap && mCharacterMap->Equals(aUnicodeRanges)));
}
gfxFont*
gfxUserFontEntry::CreateFontInstance(const gfxFontStyle* aFontStyle)
{
MOZ_ASSERT_UNREACHABLE("should only be creating a gfxFont"
- " with an actual platform font entry");
+ " with an actual platform font entry");
// userfont entry is a container, can't create font from the container
return nullptr;
}
class MOZ_STACK_CLASS gfxOTSContext : public ots::OTSContext {
public:
explicit gfxOTSContext(gfxUserFontEntry* aUserFontEntry)
--- a/intl/unicharutil/util/nsUnicodeProperties.cpp
+++ b/intl/unicharutil/util/nsUnicodeProperties.cpp
@@ -21,17 +21,19 @@ GetCharProps2(uint32_t aCh)
[aCh & ((1 << kCharProp2CharBits) - 1)];
}
if (aCh < (kCharProp2MaxPlane + 1) * 0x10000) {
return sCharProp2Values[sCharProp2Pages[sCharProp2Planes[(aCh >> 16) - 1]]
[(aCh & 0xffff) >> kCharProp2CharBits]]
[aCh & ((1 << kCharProp2CharBits) - 1)];
}
- MOZ_ASSERT_UNREACHABLE("Getting CharProps for codepoint outside Unicode range");
+ MOZ_ASSERT_UNREACHABLE("Getting CharProps for codepoint outside Unicode "
+ "range");
+
// Default values for unassigned
using namespace mozilla::unicode;
static const nsCharProps2 undefined = {
VERTICAL_ORIENTATION_R,
0 // IdentifierType
};
return undefined;
}
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -2626,18 +2626,19 @@ PresShell::VerifyHasDirtyRootAncestor(ns
if (((aFrame->GetStateBits() & NS_FRAME_REFLOW_ROOT) ||
!aFrame->GetParent()) &&
mDirtyRoots.Contains(aFrame)) {
return;
}
aFrame = aFrame->GetParent();
}
+
MOZ_ASSERT_UNREACHABLE("Frame has dirty bits set but isn't scheduled to be "
- "reflowed?");
+ "reflowed?");
}
#endif
void
PresShell::FrameNeedsReflow(nsIFrame *aFrame, IntrinsicDirty aIntrinsicDirty,
nsFrameState aBitToAdd,
ReflowRootHandling aRootHandling)
{
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -9085,18 +9085,18 @@ nsView* nsIFrame::GetClosestView(nsPoint
MOZ_ASSERT_UNREACHABLE("No view on any parent? How did that happen?");
return nullptr;
}
/* virtual */ void
nsFrame::ChildIsDirty(nsIFrame* aChild)
{
- MOZ_ASSERT_UNREACHABLE("should never be called on a frame that doesn't inherit from "
- "nsContainerFrame");
+ MOZ_ASSERT_UNREACHABLE("should never be called on a frame that doesn't "
+ "inherit from nsContainerFrame");
}
#ifdef ACCESSIBILITY
a11y::AccType
nsFrame::AccessibleType()
{
if (IsTableCaption() && !GetRect().IsEmpty()) {
--- a/layout/mathml/nsMathMLmencloseFrame.cpp
+++ b/layout/mathml/nsMathMLmencloseFrame.cpp
@@ -853,17 +853,18 @@ void nsDisplayNotation::Paint(nsDisplayL
// Draw the angled line
aDrawTarget.StrokeLine(rect.BottomLeft(),
rect.BottomLeft() + Point(w, -H),
color, strokeOptions);
return;
}
default:
- MOZ_ASSERT_UNREACHABLE("This notation can not be drawn using nsDisplayNotation");
+ MOZ_ASSERT_UNREACHABLE("This notation can not be drawn using "
+ "nsDisplayNotation");
}
}
void
nsMathMLmencloseFrame::DisplayNotation(nsDisplayListBuilder* aBuilder,
nsIFrame* aFrame, const nsRect& aRect,
const nsDisplayListSet& aLists,
nscoord aThickness,
--- a/layout/painting/nsCSSRenderingBorders.cpp
+++ b/layout/painting/nsCSSRenderingBorders.cpp
@@ -3910,17 +3910,18 @@ nsCSSBorderImageRenderer::nsCSSBorderIma
break;
case eStyleUnit_Factor:
value = coord.GetFactorValue() * borderWidths.Side(s);
break;
case eStyleUnit_Auto: // same as the slice value, in CSS pixels
value = mSlice.Side(s);
break;
default:
- MOZ_ASSERT_UNREACHABLE("unexpected CSS unit for border image area division");
+ MOZ_ASSERT_UNREACHABLE("unexpected CSS unit for border image area "
+ "division");
value = 0;
break;
}
// NSToCoordRoundWithClamp rounds towards infinity, but that's OK
// because we expect value to be non-negative.
MOZ_ASSERT(value >= 0);
mWidths.Side(s) = NSToCoordRoundWithClamp(value);
MOZ_ASSERT(mWidths.Side(s) >= 0);
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -9834,17 +9834,18 @@ nsDisplayFilter::CreateWebRenderCommands
};
wrFilters.AppendElement(filterOp);
break;
}
case NS_STYLE_FILTER_DROP_SHADOW: {
float appUnitsPerDevPixel = mFrame->PresContext()->AppUnitsPerDevPixel();
nsCSSShadowArray* shadows = filter.GetDropShadow();
if (!shadows || shadows->Length() != 1) {
- MOZ_ASSERT_UNREACHABLE("Exactly one drop shadow should have been parsed.");
+ MOZ_ASSERT_UNREACHABLE("Exactly one drop shadow should have been "
+ "parsed.");
return false;
}
nsCSSShadowItem* shadow = shadows->ShadowAt(0);
nscolor color = shadow->mColor;
if (!shadow->mHasColor) {
color = mFrame->StyleColor()->mColor;
}
--- a/layout/painting/nsImageRenderer.cpp
+++ b/layout/painting/nsImageRenderer.cpp
@@ -450,19 +450,21 @@ nsImageRenderer::Draw(nsPresContext*
const nsRect& aDest,
const nsRect& aFill,
const nsPoint& aAnchor,
const nsSize& aRepeatSize,
const CSSIntRect& aSrc,
float aOpacity)
{
if (!IsReady()) {
- MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before calling me");
+ MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before "
+ "calling me");
return ImgDrawResult::TEMPORARY_ERROR;
}
+
if (aDest.IsEmpty() || aFill.IsEmpty() ||
mSize.width <= 0 || mSize.height <= 0) {
return ImgDrawResult::SUCCESS;
}
SamplingFilter samplingFilter = nsLayoutUtils::GetSamplingFilterForFrame(mForFrame);
ImgDrawResult result = ImgDrawResult::SUCCESS;
RefPtr<gfxContext> ctx = &aRenderingContext;
@@ -570,19 +572,21 @@ nsImageRenderer::BuildWebRenderDisplayIt
const nsRect& aDest,
const nsRect& aFill,
const nsPoint& aAnchor,
const nsSize& aRepeatSize,
const CSSIntRect& aSrc,
float aOpacity)
{
if (!IsReady()) {
- MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before calling me");
+ MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before "
+ "calling me");
return ImgDrawResult::NOT_READY;
}
+
if (aDest.IsEmpty() || aFill.IsEmpty() ||
mSize.width <= 0 || mSize.height <= 0) {
return ImgDrawResult::SUCCESS;
}
switch (mType) {
case eStyleImageType_Gradient:
{
@@ -695,19 +699,21 @@ nsImageRenderer::DrawLayer(nsPresContext
const nsRect& aDest,
const nsRect& aFill,
const nsPoint& aAnchor,
const nsRect& aDirty,
const nsSize& aRepeatSize,
float aOpacity)
{
if (!IsReady()) {
- MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before calling me");
+ MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before "
+ "calling me");
return ImgDrawResult::TEMPORARY_ERROR;
}
+
if (aDest.IsEmpty() || aFill.IsEmpty() ||
mSize.width <= 0 || mSize.height <= 0) {
return ImgDrawResult::SUCCESS;
}
return Draw(aPresContext, aRenderingContext,
aDirty, aDest, aFill, aAnchor, aRepeatSize,
CSSIntRect(0, 0,
@@ -726,19 +732,21 @@ nsImageRenderer::BuildWebRenderDisplayIt
const nsRect& aDest,
const nsRect& aFill,
const nsPoint& aAnchor,
const nsRect& aDirty,
const nsSize& aRepeatSize,
float aOpacity)
{
if (!IsReady()) {
- MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before calling me");
+ MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before "
+ "calling me");
return mPrepareResult;
}
+
if (aDest.IsEmpty() || aFill.IsEmpty() ||
mSize.width <= 0 || mSize.height <= 0) {
return ImgDrawResult::SUCCESS;
}
return BuildWebRenderDisplayItems(aPresContext, aBuilder, aResources, aSc,
aManager, aItem,
aDirty, aDest, aFill, aAnchor, aRepeatSize,
CSSIntRect(0, 0,
@@ -860,19 +868,21 @@ nsImageRenderer::DrawBorderImageComponen
StyleBorderImageRepeat aHFill,
StyleBorderImageRepeat aVFill,
const nsSize& aUnitSize,
uint8_t aIndex,
const Maybe<nsSize>& aSVGViewportSize,
const bool aHasIntrinsicRatio)
{
if (!IsReady()) {
- MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before calling me");
+ MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before "
+ "calling me");
return ImgDrawResult::BAD_ARGS;
}
+
if (aFill.IsEmpty() || aSrc.IsEmpty()) {
return ImgDrawResult::SUCCESS;
}
if (mType == eStyleImageType_Image || mType == eStyleImageType_Element) {
nsCOMPtr<imgIContainer> subImage;
// To draw one portion of an image into a border component, we stretch that
@@ -955,17 +965,18 @@ nsImageRenderer::DrawBorderImageComponen
fillRect, destTile.TopLeft(), repeatSize, aSrc);
}
ImgDrawResult
nsImageRenderer::DrawShapeImage(nsPresContext* aPresContext,
gfxContext& aRenderingContext)
{
if (!IsReady()) {
- MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before calling me");
+ MOZ_ASSERT_UNREACHABLE("Ensure PrepareImage() has returned true before "
+ "calling me");
return ImgDrawResult::NOT_READY;
}
if (mSize.width <= 0 || mSize.height <= 0) {
return ImgDrawResult::SUCCESS;
}
ImgDrawResult result = ImgDrawResult::SUCCESS;
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -2548,18 +2548,19 @@ Loader::Stop()
SheetLoadData* data = mPostedEvents[i];
data->mIsCancelled = true;
if (arr.AppendElement(data)) {
// SheetComplete() calls Release(), so give this an extra ref.
NS_ADDREF(data);
}
#ifdef DEBUG
else {
- MOZ_ASSERT_UNREACHABLE("We preallocated this memory... shouldn't really fail, "
- "except we never check that preallocation succeeds.");
+ MOZ_ASSERT_UNREACHABLE("We preallocated this memory... shouldn't really "
+ "fail, except we never check that preallocation "
+ "succeeds.");
}
#endif
}
mPostedEvents.Clear();
mDatasToNotifyOn += arr.Length();
for (i = 0; i < arr.Length(); ++i) {
--mDatasToNotifyOn;
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -1471,18 +1471,18 @@ TextNodeCorrespondenceRecorder::Traverse
"don't know how to handle negative content indexes");
uint32_t undisplayed = 0;
if (!mPreviousNode) {
// Must be the very first text frame.
NS_ASSERTION(mNodeCharIndex == 0, "incorrect tracking of undisplayed "
"characters in text nodes");
if (!mNodeIterator.Current()) {
- MOZ_ASSERT_UNREACHABLE("incorrect tracking of correspondence between text frames "
- "and text nodes");
+ MOZ_ASSERT_UNREACHABLE("incorrect tracking of correspondence between "
+ "text frames and text nodes");
} else {
// Each whole nsTextNode we find before we get to the text node for the
// first text frame must be undisplayed.
while (mNodeIterator.Current() != node) {
undisplayed += mNodeIterator.Current()->TextLength();
NextNode();
}
// If the first text frame starts at a non-zero content offset, then those
--- a/layout/svg/nsCSSFilterInstance.cpp
+++ b/layout/svg/nsCSSFilterInstance.cpp
@@ -351,19 +351,21 @@ nsCSSFilterInstance::BlurRadiusToFilterS
radiusInFrameSpaceInCSSPx);
gfxSize frameSpaceInCSSPxToFilterSpaceScale =
mFrameSpaceInCSSPxToFilterSpaceTransform.ScaleFactors(true);
radiusInFilterSpace.Scale(frameSpaceInCSSPxToFilterSpaceScale.width,
frameSpaceInCSSPxToFilterSpaceScale.height);
// Check the radius limits.
if (radiusInFilterSpace.width < 0 || radiusInFilterSpace.height < 0) {
- MOZ_ASSERT_UNREACHABLE("we shouldn't have parsed a negative radius in the style");
+ MOZ_ASSERT_UNREACHABLE("we shouldn't have parsed a negative radius in the "
+ "style");
return Size();
}
+
Float maxStdDeviation = (Float)kMaxStdDeviation;
radiusInFilterSpace.width = std::min(radiusInFilterSpace.width, maxStdDeviation);
radiusInFilterSpace.height = std::min(radiusInFilterSpace.height, maxStdDeviation);
return radiusInFilterSpace;
}
IntPoint
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -1641,17 +1641,18 @@ nsSVGUtils::GetOpacity(nsStyleSVGOpacity
case eStyleSVGOpacitySource_ContextStrokeOpacity:
if (aContextPaint) {
opacity = aContextPaint->GetStrokeOpacity();
} else {
NS_WARNING("Content used context-stroke-opacity when not in a context element");
}
break;
default:
- MOZ_ASSERT_UNREACHABLE("Unknown object opacity inheritance type for SVG glyph");
+ MOZ_ASSERT_UNREACHABLE("Unknown object opacity inheritance type for SVG "
+ "glyph");
}
return opacity;
}
bool
nsSVGUtils::HasStroke(nsIFrame* aFrame, SVGContextPaint* aContextPaint)
{
const nsStyleSVG *style = aFrame->StyleSVG();
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -2553,17 +2553,17 @@ nsTableFrame::AppendFrames(ChildListID
DrainSelfOverflowList(); // ensure the last frame is in mFrames
// Append the new row group frame to the sibling chain
mFrames.AppendFrame(nullptr, f);
// insert the row group and its rows into the table
InsertRowGroups(nsFrameList::Slice(mFrames, f, nullptr));
} else {
// Nothing special to do, just add the frame to our child list
- MOZ_ASSERT_UNREACHABLE("How did we get here? Frame construction screwed up");
+ MOZ_ASSERT_UNREACHABLE("How did we get here? Frame construction screwed up");
mFrames.AppendFrame(nullptr, f);
}
}
#ifdef DEBUG_TABLE_CELLMAP
printf("=== TableFrame::AppendFrames\n");
Dump(true, true, true);
#endif
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -3053,17 +3053,18 @@ nsTreeBodyFrame::PaintRow(int32_t
nscoord currX;
nsTreeColumn* previousCol = primaryCol->GetPrevious();
if (previousCol) {
nsRect prevColRect;
rv = previousCol->GetRect(this, 0, 0, &prevColRect);
if (NS_SUCCEEDED(rv)) {
currX = (prevColRect.x - mHorzPosition) + prevColRect.width + aPt.x;
} else {
- MOZ_ASSERT_UNREACHABLE("The column before the primary column is invalid");
+ MOZ_ASSERT_UNREACHABLE("The column before the primary column is "
+ "invalid");
currX = rowRect.x;
}
} else {
currX = rowRect.x;
}
int32_t level;
mView->GetLevel(aRowIndex, &level);
--- a/netwerk/base/nsRequestObserverProxy.cpp
+++ b/netwerk/base/nsRequestObserverProxy.cpp
@@ -49,17 +49,18 @@ public:
virtual ~nsOnStartRequestEvent() = default;
NS_IMETHOD Run() override
{
LOG(("nsOnStartRequestEvent::HandleEvent [req=%p]\n", mRequest.get()));
if (!mProxy->mObserver) {
- MOZ_ASSERT_UNREACHABLE("already handled onStopRequest event (observer is null)");
+ MOZ_ASSERT_UNREACHABLE("already handled onStopRequest event "
+ "(observer is null)");
return NS_OK;
}
LOG(("handle startevent=%p\n", this));
nsresult rv = mProxy->mObserver->OnStartRequest(mRequest, mProxy->mContext);
if (NS_FAILED(rv)) {
LOG(("OnStartRequest failed [rv=%" PRIx32 "] canceling request!\n",
static_cast<uint32_t>(rv)));
@@ -90,17 +91,18 @@ public:
virtual ~nsOnStopRequestEvent() = default;
NS_IMETHOD Run() override
{
LOG(("nsOnStopRequestEvent::HandleEvent [req=%p]\n", mRequest.get()));
nsMainThreadPtrHandle<nsIRequestObserver> observer = mProxy->mObserver;
if (!observer) {
- MOZ_ASSERT_UNREACHABLE("already handled onStopRequest event (observer is null)");
+ MOZ_ASSERT_UNREACHABLE("already handled onStopRequest event "
+ "(observer is null)");
return NS_OK;
}
// Do not allow any more events to be handled after OnStopRequest
mProxy->mObserver = nullptr;
nsresult status = NS_OK;
DebugOnly<nsresult> rv = mRequest->GetStatus(&status);
NS_ASSERTION(NS_SUCCEEDED(rv), "GetStatus failed for request!");
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -1218,17 +1218,18 @@ nsSocketTransport::BuildSocket(PRFileDes
rv = provider->NewSocket(mNetAddr.raw.family,
mHttpsProxy ? mProxyHost.get() : socketProviderHost,
mHttpsProxy ? mProxyPort : socketProviderPort,
proxyInfo, mOriginAttributes,
controlFlags, mTlsFlags, &fd,
getter_AddRefs(secinfo));
if (NS_SUCCEEDED(rv) && !fd) {
- MOZ_ASSERT_UNREACHABLE("NewSocket succeeded but failed to create a PRFileDesc");
+ MOZ_ASSERT_UNREACHABLE("NewSocket succeeded but failed to "
+ "create a PRFileDesc");
rv = NS_ERROR_UNEXPECTED;
}
} else {
// the socket has already been allocated,
// so we just want the service to add itself
// to the stack (such as pushing an io layer)
rv = provider->AddToSocket(mNetAddr.raw.family,
host, port, proxyInfo,
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -380,17 +380,18 @@ private:
~InsertCookieDBListener() = default;
public:
NS_DECL_ISUPPORTS
explicit InsertCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
NS_IMETHOD HandleResult(mozIStorageResultSet*) override
{
- MOZ_ASSERT_UNREACHABLE("Unexpected call to InsertCookieDBListener::HandleResult");
+ MOZ_ASSERT_UNREACHABLE("Unexpected call to "
+ "InsertCookieDBListener::HandleResult");
return NS_OK;
}
NS_IMETHOD HandleCompletion(uint16_t aReason) override
{
// If we were rebuilding the db and we succeeded, make our corruptFlag say
// so.
if (mDBState->corruptFlag == DBState::REBUILDING &&
aReason == mozIStorageStatementCallback::REASON_FINISHED) {
@@ -416,17 +417,18 @@ private:
~UpdateCookieDBListener() = default;
public:
NS_DECL_ISUPPORTS
explicit UpdateCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
NS_IMETHOD HandleResult(mozIStorageResultSet*) override
{
- MOZ_ASSERT_UNREACHABLE("Unexpected call to UpdateCookieDBListener::HandleResult");
+ MOZ_ASSERT_UNREACHABLE("Unexpected call to "
+ "UpdateCookieDBListener::HandleResult");
return NS_OK;
}
NS_IMETHOD HandleCompletion(uint16_t aReason) override
{
return NS_OK;
}
};
@@ -444,17 +446,18 @@ private:
~RemoveCookieDBListener() = default;
public:
NS_DECL_ISUPPORTS
explicit RemoveCookieDBListener(DBState* dbState) : DBListenerErrorHandler(dbState) { }
NS_IMETHOD HandleResult(mozIStorageResultSet*) override
{
- MOZ_ASSERT_UNREACHABLE("Unexpected call to RemoveCookieDBListener::HandleResult");
+ MOZ_ASSERT_UNREACHABLE("Unexpected call to "
+ "RemoveCookieDBListener::HandleResult");
return NS_OK;
}
NS_IMETHOD HandleCompletion(uint16_t aReason) override
{
return NS_OK;
}
};
--- a/netwerk/ipc/NeckoChild.cpp
+++ b/netwerk/ipc/NeckoChild.cpp
@@ -71,17 +71,18 @@ void NeckoChild::InitNeckoChild()
PHttpChannelChild*
NeckoChild::AllocPHttpChannelChild(const PBrowserOrId& browser,
const SerializedLoadContext& loadContext,
const HttpChannelCreationArgs& aOpenArgs)
{
// We don't allocate here: instead we always use IPDL constructor that takes
// an existing HttpChildChannel
- MOZ_ASSERT_UNREACHABLE("AllocPHttpChannelChild should not be called on child");
+ MOZ_ASSERT_UNREACHABLE("AllocPHttpChannelChild should not be called on "
+ "child");
return nullptr;
}
bool
NeckoChild::DeallocPHttpChannelChild(PHttpChannelChild* channel)
{
MOZ_ASSERT(IsNeckoChild(), "DeallocPHttpChannelChild called by non-child!");
@@ -90,17 +91,18 @@ NeckoChild::DeallocPHttpChannelChild(PHt
return true;
}
PStunAddrsRequestChild*
NeckoChild::AllocPStunAddrsRequestChild()
{
// We don't allocate here: instead we always use IPDL constructor that takes
// an existing object
- MOZ_ASSERT_UNREACHABLE("AllocPStunAddrsRequestChild should not be called on child");
+ MOZ_ASSERT_UNREACHABLE("AllocPStunAddrsRequestChild should not be called "
+ "on child");
return nullptr;
}
bool
NeckoChild::DeallocPStunAddrsRequestChild(PStunAddrsRequestChild* aActor)
{
#ifdef MOZ_WEBRTC
StunAddrsRequestChild* p = static_cast<StunAddrsRequestChild*>(aActor);
@@ -459,9 +461,8 @@ NeckoChild::RecvNetworkChangeNotificatio
obsService->NotifyObservers(nullptr, NS_NETWORK_LINK_TOPIC,
NS_ConvertUTF8toUTF16(type).get());
}
return IPC_OK();
}
} // namespace net
} // namespace mozilla
-
--- a/parser/html/nsHtml5AtomTable.cpp
+++ b/parser/html/nsHtml5AtomTable.cpp
@@ -10,17 +10,17 @@ nsHtml5AtomEntry::nsHtml5AtomEntry(KeyTy
, mAtom(new nsDynamicAtom(*aStr))
{
}
nsHtml5AtomEntry::nsHtml5AtomEntry(const nsHtml5AtomEntry& aOther)
: nsStringHashKey(aOther)
, mAtom(nullptr)
{
- MOZ_ASSERT_UNREACHABLE("nsHtml5AtomTable is broken and tried to copy an entry");
+ MOZ_ASSERT_UNREACHABLE("nsHtml5AtomTable is broken; tried to copy an entry");
}
nsHtml5AtomEntry::~nsHtml5AtomEntry()
{
delete mAtom;
}
nsHtml5AtomTable::nsHtml5AtomTable()
--- a/parser/html/nsHtml5StreamParser.cpp
+++ b/parser/html/nsHtml5StreamParser.cpp
@@ -1567,19 +1567,21 @@ nsHtml5StreamParser::ContinueAfterScript
}
#ifdef DEBUG
mExecutor->AssertStageEmpty();
#endif
bool speculationFailed = false;
{
mozilla::MutexAutoLock speculationAutoLock(mSpeculationMutex);
if (mSpeculations.IsEmpty()) {
- MOZ_ASSERT_UNREACHABLE("ContinueAfterScripts called without speculations.");
+ MOZ_ASSERT_UNREACHABLE("ContinueAfterScripts called without "
+ "speculations.");
return;
}
+
nsHtml5Speculation* speculation = mSpeculations.ElementAt(0);
if (aLastWasCR || !aTokenizer->isInDataState() ||
!aTreeBuilder->snapshotMatches(speculation->GetSnapshot())) {
speculationFailed = true;
// We've got a failed speculation :-(
MaybeDisableFutureSpeculation();
Interrupt(); // Make the parser thread release the tokenizer mutex sooner
// now fall out of the speculationAutoLock into the tokenizerAutoLock
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -3505,17 +3505,18 @@ nsNavHistory::BookmarkIdToResultNode(int
nsresult rv = stmt->BindInt64ByName(NS_LITERAL_CSTRING("item_id"),
aBookmarkId);
NS_ENSURE_SUCCESS(rv, rv);
bool hasMore = false;
rv = stmt->ExecuteStep(&hasMore);
NS_ENSURE_SUCCESS(rv, rv);
if (!hasMore) {
- MOZ_ASSERT_UNREACHABLE("Trying to get a result node for an invalid bookmark identifier");
+ MOZ_ASSERT_UNREACHABLE("Trying to get a result node for an invalid "
+ "bookmark identifier");
return NS_ERROR_INVALID_ARG;
}
nsCOMPtr<mozIStorageValueArray> row = do_QueryInterface(stmt, &rv);
NS_ENSURE_SUCCESS(rv, rv);
return RowToResult(row, aOptions, aResult);
}
--- a/toolkit/components/places/nsNavHistoryResult.cpp
+++ b/toolkit/components/places/nsNavHistoryResult.cpp
@@ -3449,17 +3449,18 @@ nsNavHistoryFolderResultNode::OnItemAdde
// a bogus index.
if (aIndex < 0) {
MOZ_ASSERT_UNREACHABLE("Invalid index for item adding: <0");
aIndex = 0;
}
else if (aIndex > mChildren.Count()) {
if (!excludeItems) {
// Something wrong happened while updating indexes.
- MOZ_ASSERT_UNREACHABLE("Invalid index for item adding: greater than count");
+ MOZ_ASSERT_UNREACHABLE("Invalid index for item adding: greater than "
+ "count");
}
aIndex = mChildren.Count();
}
nsresult rv;
// Check for query URIs, which are bookmarks, but treated as containers
// in results and views.
--- a/toolkit/components/printingui/ipc/nsPrintingProxy.cpp
+++ b/toolkit/components/printingui/ipc/nsPrintingProxy.cpp
@@ -206,36 +206,36 @@ nsPrintingProxy::SavePrintSettings(nsIPr
return rv;
}
PPrintProgressDialogChild*
nsPrintingProxy::AllocPPrintProgressDialogChild()
{
// The parent process will never initiate the PPrintProgressDialog
// protocol connection, so no need to provide an allocator here.
- MOZ_ASSERT_UNREACHABLE("Allocator for PPrintProgressDialogChild should not be "
- "called on nsPrintingProxy.");
+ MOZ_ASSERT_UNREACHABLE("Allocator for PPrintProgressDialogChild should not "
+ "be called on nsPrintingProxy.");
return nullptr;
}
bool
nsPrintingProxy::DeallocPPrintProgressDialogChild(PPrintProgressDialogChild* aActor)
{
// The PrintProgressDialogChild implements refcounting, and
// will take itself out.
return true;
}
PPrintSettingsDialogChild*
nsPrintingProxy::AllocPPrintSettingsDialogChild()
{
// The parent process will never initiate the PPrintSettingsDialog
// protocol connection, so no need to provide an allocator here.
- MOZ_ASSERT_UNREACHABLE("Allocator for PPrintSettingsDialogChild should not be "
- "called on nsPrintingProxy.");
+ MOZ_ASSERT_UNREACHABLE("Allocator for PPrintSettingsDialogChild should not "
+ "be called on nsPrintingProxy.");
return nullptr;
}
bool
nsPrintingProxy::DeallocPPrintSettingsDialogChild(PPrintSettingsDialogChild* aActor)
{
// The PrintSettingsDialogChild implements refcounting, and
// will take itself out.
--- a/uriloader/prefetch/OfflineCacheUpdateChild.cpp
+++ b/uriloader/prefetch/OfflineCacheUpdateChild.cpp
@@ -222,28 +222,28 @@ OfflineCacheUpdateChild::Init(nsIURI *aM
NS_IMETHODIMP
OfflineCacheUpdateChild::InitPartial(nsIURI *aManifestURI,
const nsACString& clientID,
nsIURI *aDocumentURI,
nsIPrincipal *aLoadingPrincipal)
{
MOZ_ASSERT_UNREACHABLE("Not expected to do partial offline cache updates"
- " on the child process");
+ " on the child process");
// For now leaving this method, we may discover we need it.
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
OfflineCacheUpdateChild::InitForUpdateCheck(nsIURI *aManifestURI,
nsIPrincipal* aLoadingPrincipal,
nsIObserver *aObserver)
{
MOZ_ASSERT_UNREACHABLE("Not expected to do only update checks"
- " from the child process");
+ " from the child process");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
OfflineCacheUpdateChild::GetUpdateDomain(nsACString &aUpdateDomain)
{
NS_ENSURE_TRUE(mState >= STATE_INITIALIZED, NS_ERROR_NOT_INITIALIZED);
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -2268,17 +2268,18 @@ nsBaseWidget::NotifyLiveResizeStopped()
mLiveResizeListeners.Clear();
}
}
void
nsBaseWidget::RegisterPluginWindowForRemoteUpdates()
{
#if !defined(XP_WIN) && !defined(MOZ_WIDGET_GTK)
- MOZ_ASSERT_UNREACHABLE("nsBaseWidget::RegisterPluginWindowForRemoteUpdates not implemented!");
+ MOZ_ASSERT_UNREACHABLE("nsBaseWidget::RegisterPluginWindowForRemoteUpdates "
+ "not implemented!");
return;
#else
MOZ_ASSERT(NS_IsMainThread());
void* id = GetNativeData(NS_NATIVE_PLUGIN_ID);
if (!id) {
NS_WARNING("This is not a valid native widget!");
return;
}
@@ -2286,17 +2287,18 @@ nsBaseWidget::RegisterPluginWindowForRem
sPluginWidgetList->Put(id, this);
#endif
}
void
nsBaseWidget::UnregisterPluginWindowForRemoteUpdates()
{
#if !defined(XP_WIN) && !defined(MOZ_WIDGET_GTK)
- MOZ_ASSERT_UNREACHABLE("nsBaseWidget::UnregisterPluginWindowForRemoteUpdates not implemented!");
+ MOZ_ASSERT_UNREACHABLE("nsBaseWidget::UnregisterPluginWindowForRemoteUpdates "
+ "not implemented!");
return;
#else
MOZ_ASSERT(NS_IsMainThread());
void* id = GetNativeData(NS_NATIVE_PLUGIN_ID);
if (!id) {
NS_WARNING("This is not a valid native widget!");
return;
}
@@ -2317,32 +2319,34 @@ nsBaseWidget::AsyncEnableDragDrop(bool a
kAsyncDragDropTimeout);
}
// static
nsIWidget*
nsIWidget::LookupRegisteredPluginWindow(uintptr_t aWindowID)
{
#if !defined(XP_WIN) && !defined(MOZ_WIDGET_GTK)
- MOZ_ASSERT_UNREACHABLE("nsBaseWidget::LookupRegisteredPluginWindow not implemented!");
+ MOZ_ASSERT_UNREACHABLE("nsBaseWidget::LookupRegisteredPluginWindow "
+ "not implemented!");
return nullptr;
#else
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(sPluginWidgetList);
return sPluginWidgetList->GetWeak((void*)aWindowID);
#endif
}
// static
void
nsIWidget::UpdateRegisteredPluginWindowVisibility(uintptr_t aOwnerWidget,
nsTArray<uintptr_t>& aPluginIds)
{
#if !defined(XP_WIN) && !defined(MOZ_WIDGET_GTK)
- MOZ_ASSERT_UNREACHABLE("nsBaseWidget::UpdateRegisteredPluginWindowVisibility not implemented!");
+ MOZ_ASSERT_UNREACHABLE("nsBaseWidget::UpdateRegisteredPluginWindowVisibility"
+ " not implemented!");
return;
#else
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(sPluginWidgetList);
// Our visible list is associated with a compositor which is associated with
// a specific top level window. We use the parent widget during iteration
// to skip the plugin widgets owned by other top level windows.
--- a/widget/windows/LSPAnnotator.cpp
+++ b/widget/windows/LSPAnnotator.cpp
@@ -57,17 +57,18 @@ LSPAnnotationGatherer::Run()
mThread = NS_GetCurrentThread();
DWORD size = 0;
int err;
// Get the size of the buffer we need
if (SOCKET_ERROR != WSCEnumProtocols(nullptr, nullptr, &size, &err) ||
err != WSAENOBUFS) {
// Er, what?
- MOZ_ASSERT_UNREACHABLE("WSCEnumProtocols suceeded when it should have failed ...");
+ MOZ_ASSERT_UNREACHABLE("WSCEnumProtocols succeeded when it should have "
+ "failed");
return NS_ERROR_FAILURE;
}
auto byteArray = MakeUnique<char[]>(size);
WSAPROTOCOL_INFOW* providers =
reinterpret_cast<WSAPROTOCOL_INFOW*>(byteArray.get());
int n = WSCEnumProtocols(nullptr, providers, &size, &err);
--- a/widget/windows/TaskbarTabPreview.cpp
+++ b/widget/windows/TaskbarTabPreview.cpp
@@ -282,17 +282,18 @@ TaskbarTabPreview::MainWindowHook(void *
WPARAM wParam, LPARAM lParam,
LRESULT *aResult) {
if (nMsg == WM_WINDOWPOSCHANGED) {
TaskbarTabPreview *preview = reinterpret_cast<TaskbarTabPreview*>(aContext);
WINDOWPOS *pos = reinterpret_cast<WINDOWPOS*>(lParam);
if (SWP_FRAMECHANGED == (pos->flags & SWP_FRAMECHANGED))
preview->UpdateProxyWindowStyle();
} else {
- MOZ_ASSERT_UNREACHABLE("Style changed hook fired on non-style changed message");
+ MOZ_ASSERT_UNREACHABLE("Style changed hook fired on non-style changed "
+ "message");
}
return false;
}
void
TaskbarTabPreview::UpdateProxyWindowStyle() {
if (!mProxyWindow)
return;
@@ -349,9 +350,8 @@ TaskbarTabPreview::UpdateNext() {
if (FAILED(mTaskbar->SetTabOrder(mProxyWindow, hNext)))
return NS_ERROR_FAILURE;
return NS_OK;
}
} // namespace widget
} // namespace mozilla
-
--- a/widget/windows/WinTaskbar.cpp
+++ b/widget/windows/WinTaskbar.cpp
@@ -150,24 +150,26 @@ DefaultController::RequestThumbnail(nsIT
NS_IMETHODIMP
DefaultController::RequestPreview(nsITaskbarPreviewCallback *aCallback) {
return NS_OK;
}
NS_IMETHODIMP
DefaultController::OnClose(void) {
- MOZ_ASSERT_UNREACHABLE("OnClose should not be called for TaskbarWindowPreviews");
+ MOZ_ASSERT_UNREACHABLE("OnClose should not be called for "
+ "TaskbarWindowPreviews");
return NS_OK;
}
NS_IMETHODIMP
DefaultController::OnActivate(bool *rAcceptActivation) {
*rAcceptActivation = true;
- MOZ_ASSERT_UNREACHABLE("OnActivate should not be called for TaskbarWindowPreviews");
+ MOZ_ASSERT_UNREACHABLE("OnActivate should not be called for "
+ "TaskbarWindowPreviews");
return NS_OK;
}
NS_IMETHODIMP
DefaultController::OnClick(nsITaskbarPreviewButton *button) {
return NS_OK;
}
@@ -441,9 +443,8 @@ WinTaskbar::PrepareFullScreenHWND(void *
return NS_ERROR_UNEXPECTED;
}
return NS_OK;
}
} // namespace widget
} // namespace mozilla
-
--- a/xpcom/io/nsMultiplexInputStream.cpp
+++ b/xpcom/io/nsMultiplexInputStream.cpp
@@ -419,17 +419,18 @@ nsMultiplexInputStream::Read(char* aBuf,
uint32_t len = mStreams.Length();
while (mCurrentStream < len && aCount) {
uint32_t read;
rv = mStreams[mCurrentStream].mStream->Read(aBuf, aCount, &read);
// XXX some streams return NS_BASE_STREAM_CLOSED to indicate EOF.
// (This is a bug in those stream implementations)
if (rv == NS_BASE_STREAM_CLOSED) {
- MOZ_ASSERT_UNREACHABLE("Input stream's Read method returned NS_BASE_STREAM_CLOSED");
+ MOZ_ASSERT_UNREACHABLE("Input stream's Read method returned "
+ "NS_BASE_STREAM_CLOSED");
rv = NS_OK;
read = 0;
} else if (NS_FAILED(rv)) {
break;
}
if (read == 0) {
++mCurrentStream;
@@ -473,17 +474,18 @@ nsMultiplexInputStream::ReadSegments(nsW
while (mCurrentStream < len && aCount) {
uint32_t read;
rv = mStreams[mCurrentStream].mStream->ReadSegments(ReadSegCb, &state,
aCount, &read);
// XXX some streams return NS_BASE_STREAM_CLOSED to indicate EOF.
// (This is a bug in those stream implementations)
if (rv == NS_BASE_STREAM_CLOSED) {
- MOZ_ASSERT_UNREACHABLE("Input stream's Read method returned NS_BASE_STREAM_CLOSED");
+ MOZ_ASSERT_UNREACHABLE("Input stream's Read method returned "
+ "NS_BASE_STREAM_CLOSED");
rv = NS_OK;
read = 0;
}
// if |aWriter| decided to stop reading segments...
if (state.mDone || NS_FAILED(rv)) {
break;
}
--- a/xpcom/io/nsStorageStream.cpp
+++ b/xpcom/io/nsStorageStream.cpp
@@ -608,17 +608,18 @@ nsStorageInputStream::ExpectedSerialized
MOZ_ASSERT(NS_SUCCEEDED(rv));
return Some(remaining);
}
bool
nsStorageInputStream::Deserialize(const InputStreamParams& aParams,
const FileDescriptorArray&)
{
- MOZ_ASSERT_UNREACHABLE("We should never attempt to deserialize a storage input stream.");
+ MOZ_ASSERT_UNREACHABLE("We should never attempt to deserialize a storage "
+ "input stream.");
return false;
}
NS_IMETHODIMP
nsStorageInputStream::GetCloneable(bool* aCloneableOut)
{
*aCloneableOut = true;
return NS_OK;
--- a/xpcom/threads/nsIIdleRunnable.h
+++ b/xpcom/threads/nsIIdleRunnable.h
@@ -28,17 +28,17 @@ public:
/**
* Notify the task of a point in time in the future when the task
* should stop executing.
*/
virtual void SetDeadline(mozilla::TimeStamp aDeadline) {};
virtual void SetTimer(uint32_t aDelay, nsIEventTarget* aTarget)
{
MOZ_ASSERT_UNREACHABLE("The nsIIdleRunnable instance does not support "
- "idle dispatch with timeout!");
+ "idle dispatch with timeout!");
};
protected:
nsIIdleRunnable() { }
virtual ~nsIIdleRunnable() {}
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIIdleRunnable,
NS_IIDLERUNNABLE_IID)
--- a/xpfe/appshell/nsAppShellService.cpp
+++ b/xpfe/appshell/nsAppShellService.cpp
@@ -251,52 +251,57 @@ NS_IMETHODIMP
WebBrowserChrome2Stub::SetStatus(uint32_t aStatusType, const char16_t* aStatus)
{
return NS_OK;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::GetWebBrowser(nsIWebBrowser** aWebBrowser)
{
- MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::GetWebBrowser is not supported");
+ MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::GetWebBrowser is "
+ "not supported");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::SetWebBrowser(nsIWebBrowser* aWebBrowser)
{
- MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::SetWebBrowser is not supported");
+ MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::SetWebBrowser is "
+ "not supported");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::GetChromeFlags(uint32_t* aChromeFlags)
{
*aChromeFlags = 0;
return NS_OK;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::SetChromeFlags(uint32_t aChromeFlags)
{
- MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::SetChromeFlags is not supported");
+ MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::SetChromeFlags is "
+ "not supported");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::DestroyBrowserWindow()
{
- MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::DestroyBrowserWindow is not supported");
+ MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::DestroyBrowserWindow is "
+ "not supported");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::SizeBrowserTo(int32_t aCX, int32_t aCY)
{
- MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::SizeBrowserTo is not supported");
+ MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::SizeBrowserTo is "
+ "not supported");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::ShowAsModal()
{
MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::ShowAsModal is not supported");
return NS_ERROR_NOT_IMPLEMENTED;
@@ -307,17 +312,18 @@ WebBrowserChrome2Stub::IsWindowModal(boo
{
*aResult = false;
return NS_OK;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::ExitModalEventLoop(nsresult aStatus)
{
- MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::ExitModalEventLoop is not supported");
+ MOZ_ASSERT_UNREACHABLE("WebBrowserChrome2Stub::ExitModalEventLoop is "
+ "not supported");
return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP
WebBrowserChrome2Stub::SetStatusWithContext(uint32_t aStatusType,
const nsAString& aStatusText,
nsISupports* aStatusContext)
{