Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj

This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
This commit is contained in:
Chris Peterson 2018-06-17 22:43:11 -07:00
parent ed185e6484
commit 2afd829d0f
281 changed files with 653 additions and 587 deletions

View file

@ -207,7 +207,7 @@ AccGroupInfo::NextItemTo(Accessible* aItem)
}
}
NS_NOTREACHED("Item in the middle of the group but there's no next item!");
MOZ_ASSERT_UNREACHABLE("Item in the middle of the group but there's no next item!");
return nullptr;
}

View file

@ -319,7 +319,7 @@ DocManager::OnProgressChange(nsIWebProgress* aWebProgress,
int32_t aCurTotalProgress,
int32_t aMaxTotalProgress)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -328,7 +328,7 @@ DocManager::OnLocationChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest, nsIURI* aLocation,
uint32_t aFlags)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -337,7 +337,7 @@ DocManager::OnStatusChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest, nsresult aStatus,
const char16_t* aMessage)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -346,7 +346,7 @@ DocManager::OnSecurityChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest,
uint32_t aState)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}

View file

@ -191,7 +191,7 @@ TextUpdater::ComputeTextChangeEvents(const nsAString& aStr1,
--colIdx;
continue;
}
NS_NOTREACHED("huh?");
MOZ_ASSERT_UNREACHABLE("huh?");
return;
}

View file

@ -320,7 +320,7 @@ nsAccUtils::ConvertToScreenCoords(int32_t aX, int32_t aY,
}
default:
NS_NOTREACHED("invalid coord type!");
MOZ_ASSERT_UNREACHABLE("invalid coord type!");
}
return coords;
@ -352,7 +352,7 @@ nsAccUtils::ConvertScreenCoordsTo(int32_t *aX, int32_t *aY,
}
default:
NS_NOTREACHED("invalid coord type!");
MOZ_ASSERT_UNREACHABLE("invalid coord type!");
}
}

View file

@ -41,14 +41,14 @@ LeafAccessible::ChildAtPoint(int32_t aX, int32_t aY,
bool
LeafAccessible::InsertChildAt(uint32_t aIndex, Accessible* aChild)
{
NS_NOTREACHED("InsertChildAt called on leaf accessible!");
MOZ_ASSERT_UNREACHABLE("InsertChildAt called on leaf accessible!");
return false;
}
bool
LeafAccessible::RemoveChild(Accessible* aChild)
{
NS_NOTREACHED("RemoveChild called on leaf accessible!");
MOZ_ASSERT_UNREACHABLE("RemoveChild called on leaf accessible!");
return false;
}

View file

@ -1259,7 +1259,7 @@ HyperTextAccessible::TextBounds(int32_t aStartOffset, int32_t aEndOffset,
while (childIdx < static_cast<int32_t>(ChildCount())) {
nsIFrame* frame = GetChildAt(childIdx++)->GetFrame();
if (!frame) {
NS_NOTREACHED("No frame for a child!");
MOZ_ASSERT_UNREACHABLE("No frame for a child!");
continue;
}
@ -1505,7 +1505,7 @@ HyperTextAccessible::CaretLineNumber()
caretFrame = parentFrame;
}
NS_NOTREACHED("DOM ancestry had this hypertext but frame ancestry didn't");
MOZ_ASSERT_UNREACHABLE("DOM ancestry had this hypertext but frame ancestry didn't");
return lineNumber;
}

View file

@ -106,7 +106,7 @@ void
HTMLLIAccessible::UpdateBullet(bool aHasBullet)
{
if (aHasBullet == !!mBullet) {
NS_NOTREACHED("Bullet and accessible are in sync already!");
MOZ_ASSERT_UNREACHABLE("Bullet and accessible are in sync already!");
return;
}

View file

@ -720,7 +720,7 @@ ConvertToNSArray(nsTArray<ProxyAccessible*>& aArray)
switch (mRole) {
#include "RoleMap.h"
default:
NS_NOTREACHED("Unknown role.");
MOZ_ASSERT_UNREACHABLE("Unknown role.");
return NSAccessibilityUnknownRole;
}

View file

@ -529,7 +529,7 @@ XULMenupopupAccessible::ContainerWidget() const
menuPopupFrame = static_cast<nsMenuPopupFrame*>(menuParent);
}
NS_NOTREACHED("Shouldn't be a real case.");
MOZ_ASSERT_UNREACHABLE("Shouldn't be a real case.");
return nullptr;
}

View file

@ -178,7 +178,7 @@ nsChromeRegistryContent::GetFlagsFromPackage(const nsCString& aPackage,
// All functions following only make sense in chrome, and therefore assert
#define CONTENT_NOTREACHED() \
NS_NOTREACHED("Content should not be calling this")
MOZ_ASSERT_UNREACHABLE("Content should not be calling this")
#define CONTENT_NOT_IMPLEMENTED() \
CONTENT_NOTREACHED(); \

View file

@ -5585,7 +5585,7 @@ nsDocShell::GetVisibility(bool* aVisibility)
// Null-check for crash in bug 267804
if (!pPresShell) {
NS_NOTREACHED("parent docshell has null pres shell");
MOZ_ASSERT_UNREACHABLE("parent docshell has null pres shell");
return NS_OK;
}
@ -6875,7 +6875,7 @@ NS_IMETHODIMP
nsDocShell::OnLocationChange(nsIWebProgress* aProgress, nsIRequest* aRequest,
nsIURI* aURI, uint32_t aFlags)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -6985,7 +6985,7 @@ nsDocShell::OnStatusChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest,
nsresult aStatus, const char16_t* aMessage)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -6993,7 +6993,7 @@ NS_IMETHODIMP
nsDocShell::OnSecurityChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest, uint32_t aState)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -10884,7 +10884,7 @@ nsDocShell::AddHeadersToChannel(nsIInputStream* aHeadersData,
NS_ENSURE_SUCCESS(rv, rv);
}
NS_NOTREACHED("oops");
MOZ_ASSERT_UNREACHABLE("oops");
return NS_ERROR_UNEXPECTED;
}

View file

@ -196,7 +196,7 @@ ConvertLoadTypeToDocShellInfoLoadType(uint32_t aLoadType)
docShellLoadType = nsIDocShellLoadInfo::loadReloadMixedContent;
break;
default:
NS_NOTREACHED("Unexpected load type value");
MOZ_ASSERT_UNREACHABLE("Unexpected load type value");
}
return docShellLoadType;
@ -278,7 +278,7 @@ ConvertDocShellInfoLoadTypeToLoadType(nsDocShellInfoLoadType aDocShellLoadType)
loadType = LOAD_RELOAD_ALLOW_MIXED_CONTENT;
break;
default:
NS_NOTREACHED("Unexpected nsDocShellInfoLoadType value");
MOZ_ASSERT_UNREACHABLE("Unexpected nsDocShellInfoLoadType value");
}
return loadType;

View file

@ -403,7 +403,7 @@ protected:
} else if (mPendingState == PendingState::PausePending) {
PauseAt(aReadyTime);
} else {
NS_NOTREACHED("Can't finish pending if we're not in a pending state");
MOZ_ASSERT_UNREACHABLE("Can't finish pending if we're not in a pending state");
}
}
void ApplyPendingPlaybackRate()

View file

@ -119,8 +119,8 @@ CSSPseudoElement::GetCSSPseudoElementPropertyAtom(CSSPseudoElementType aType)
return nsGkAtoms::cssPseudoElementAfterProperty;
default:
NS_NOTREACHED("Should not try to get CSSPseudoElement "
"other than ::before or ::after");
MOZ_ASSERT_UNREACHABLE("Should not try to get CSSPseudoElement "
"other than ::before or ::after");
return nullptr;
}
}

View file

@ -481,8 +481,8 @@ EffectCompositor::GetElementToRestyle(dom::Element* aElement,
return nsLayoutUtils::GetAfterPseudo(aElement);
}
NS_NOTREACHED("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;
}

View file

@ -142,8 +142,8 @@ EffectSet::GetEffectSetPropertyAtom(CSSPseudoElementType aPseudoType)
return nsGkAtoms::animationEffectsForAfterProperty;
default:
NS_NOTREACHED("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;
}
}

View file

@ -927,7 +927,7 @@ KeyframeEffect::GetTarget(Nullable<OwningElementOrCSSPseudoElement>& aRv) const
break;
default:
NS_NOTREACHED("Animation of unsupported pseudo-type");
MOZ_ASSERT_UNREACHABLE("Animation of unsupported pseudo-type");
aRv.SetNull();
}
}

View file

@ -3270,7 +3270,7 @@ Element::GetEventTargetParentForLinks(EventChainPreVisitor& aVisitor)
default:
// switch not in sync with the optimization switch earlier in this function
NS_NOTREACHED("switch statements not in sync");
MOZ_ASSERT_UNREACHABLE("switch statements not in sync");
}
}
@ -3384,7 +3384,7 @@ Element::PostHandleEventForLinks(EventChainPostVisitor& aVisitor)
default:
// switch not in sync with the optimization switch earlier in this function
NS_NOTREACHED("switch statements not in sync");
MOZ_ASSERT_UNREACHABLE("switch statements not in sync");
return NS_ERROR_UNEXPECTED;
}

View file

@ -103,7 +103,7 @@ FormData::GetEncodedSubmission(nsIURI* aURI,
nsIInputStream** aPostDataStream,
nsCOMPtr<nsIURI>& aOutURI)
{
NS_NOTREACHED("Shouldn't call FormData::GetEncodedSubmission");
MOZ_ASSERT_UNREACHABLE("Shouldn't call FormData::GetEncodedSubmission");
return NS_OK;
}

View file

@ -2104,7 +2104,7 @@ FragmentOrElement::TextLength() const
{
// We can remove this assertion if it turns out to be useful to be able
// to depend on this returning 0
NS_NOTREACHED("called FragmentOrElement::TextLength");
MOZ_ASSERT_UNREACHABLE("called FragmentOrElement::TextLength");
return 0;
}

View file

@ -170,7 +170,7 @@ ThirdPartyUtil::IsThirdPartyWindow(mozIDOMWindowProxy* aWindow,
currentURI = parentURI;
} while (1);
NS_NOTREACHED("should've returned");
MOZ_ASSERT_UNREACHABLE("should've returned");
return NS_ERROR_UNEXPECTED;
}

View file

@ -327,7 +327,7 @@ nsAttrValue::SetTo(const nsAttrValue& aOther)
// the same size so it doesn't really matter which one we assign
cont->mValue.mSVGAngle = otherCont->mValue.mSVGAngle;
} else {
NS_NOTREACHED("unknown type stored in MiscContainer");
MOZ_ASSERT_UNREACHABLE("unknown type stored in MiscContainer");
}
break;
}
@ -593,7 +593,7 @@ nsAttrValue::ToString(nsAString& aResult) const
#ifdef DEBUG
case eColor:
{
NS_NOTREACHED("color attribute without string data");
MOZ_ASSERT_UNREACHABLE("color attribute without string data");
aResult.Truncate();
break;
}
@ -778,7 +778,7 @@ nsAttrValue::GetEnumString(nsAString& aResult, bool aRealTag) const
table++;
}
NS_NOTREACHED("couldn't find value in EnumTable");
MOZ_ASSERT_UNREACHABLE("couldn't find value in EnumTable");
}
uint32_t
@ -899,7 +899,7 @@ nsAttrValue::HashValue() const
// All SVG types are just pointers to classes so we can treat them alike
return NS_PTR_TO_INT32(cont->mValue.mSVGAngle);
}
NS_NOTREACHED("unknown type stored in MiscContainer");
MOZ_ASSERT_UNREACHABLE("unknown type stored in MiscContainer");
return 0;
}
}
@ -1009,7 +1009,7 @@ nsAttrValue::Equals(const nsAttrValue& aOther) const
MOZ_ASSERT(false, "Comparing nsAttrValues that point to SVG data");
return false;
}
NS_NOTREACHED("unknown type stored in MiscContainer");
MOZ_ASSERT_UNREACHABLE("unknown type stored in MiscContainer");
return false;
}
}
@ -1331,7 +1331,7 @@ nsAttrValue::SetIntValueAndType(int32_t aValue, ValueType aType,
}
default:
{
NS_NOTREACHED("unknown integer type");
MOZ_ASSERT_UNREACHABLE("unknown integer type");
break;
}
}

View file

@ -459,7 +459,7 @@ nsContentIterator::InitInternal(const RawRangeBoundary& aStart,
if (NS_WARN_IF(!cChild)) {
// No child at offset!
NS_NOTREACHED("nsContentIterator::nsContentIterator");
MOZ_ASSERT_UNREACHABLE("nsContentIterator::nsContentIterator");
return NS_ERROR_FAILURE;
}

View file

@ -5071,7 +5071,7 @@ nsContentUtils::ParseFragmentHTML(const nsAString& aSourceBuffer,
AutoTimelineMarker m(aTargetNode->OwnerDoc()->GetDocShell(), "Parse HTML");
if (nsContentUtils::sFragmentParsingActive) {
NS_NOTREACHED("Re-entrant fragment parsing attempted.");
MOZ_ASSERT_UNREACHABLE("Re-entrant fragment parsing attempted.");
return NS_ERROR_DOM_INVALID_STATE_ERR;
}
mozilla::AutoRestore<bool> guard(nsContentUtils::sFragmentParsingActive);
@ -5127,7 +5127,7 @@ nsContentUtils::ParseDocumentHTML(const nsAString& aSourceBuffer,
AutoTimelineMarker m(aTargetDocument->GetDocShell(), "Parse HTML");
if (nsContentUtils::sFragmentParsingActive) {
NS_NOTREACHED("Re-entrant fragment parsing attempted.");
MOZ_ASSERT_UNREACHABLE("Re-entrant fragment parsing attempted.");
return NS_ERROR_DOM_INVALID_STATE_ERR;
}
mozilla::AutoRestore<bool> guard(nsContentUtils::sFragmentParsingActive);
@ -5154,7 +5154,7 @@ nsContentUtils::ParseFragmentXML(const nsAString& aSourceBuffer,
AutoTimelineMarker m(aDocument->GetDocShell(), "Parse XML");
if (nsContentUtils::sFragmentParsingActive) {
NS_NOTREACHED("Re-entrant fragment parsing attempted.");
MOZ_ASSERT_UNREACHABLE("Re-entrant fragment parsing attempted.");
return NS_ERROR_DOM_INVALID_STATE_ERR;
}
mozilla::AutoRestore<bool> guard(nsContentUtils::sFragmentParsingActive);

View file

@ -8167,7 +8167,8 @@ nsDocument::UnblockOnload(bool aFireSync)
}
if (mOnloadBlockCount == 0 && mAsyncOnloadBlockCount == 0) {
NS_NOTREACHED("More UnblockOnload() calls than BlockOnload() calls; dropping call");
MOZ_ASSERT_UNREACHABLE("More UnblockOnload() calls than BlockOnload() "
"calls; dropping call");
return;
}

View file

@ -780,7 +780,7 @@ nsINode::CompareDocumentPosition(nsINode& aOtherNode) const
NodeBinding::DOCUMENT_POSITION_FOLLOWING;
}
}
NS_NOTREACHED("neither attribute in the element");
MOZ_ASSERT_UNREACHABLE("neither attribute in the element");
return NodeBinding::DOCUMENT_POSITION_DISCONNECTED;
}

View file

@ -1438,7 +1438,7 @@ private:
}
cur = parent;
}
NS_NOTREACHED("How did we get here?");
MOZ_ASSERT_UNREACHABLE("How did we get here?");
}
public:

View file

@ -502,7 +502,7 @@ IsPluginEnabledByExtension(nsIURI* uri, nsCString& mimeType)
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
if (!pluginHost) {
NS_NOTREACHED("No pluginhost");
MOZ_ASSERT_UNREACHABLE("No pluginhost");
return false;
}
@ -529,12 +529,12 @@ bool
nsObjectLoadingContent::MakePluginListener()
{
if (!mInstanceOwner) {
NS_NOTREACHED("expecting a spawned plugin");
MOZ_ASSERT_UNREACHABLE("expecting a spawned plugin");
return false;
}
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
if (!pluginHost) {
NS_NOTREACHED("No pluginHost");
MOZ_ASSERT_UNREACHABLE("No pluginHost");
return false;
}
NS_ASSERTION(!mFinalListener, "overwriting a final listener");
@ -561,9 +561,7 @@ nsObjectLoadingContent::SetupFrameLoader(int32_t aJSPluginId)
mFrameLoader = nsFrameLoader::Create(thisContent->AsElement(),
/* aOpener = */ nullptr,
mNetworkCreated, aJSPluginId);
if (!mFrameLoader) {
NS_NOTREACHED("nsFrameLoader::Create failed");
}
MOZ_ASSERT(mFrameLoader, "nsFrameLoader::Create failed");
}
// Helper to spawn the frameloader and return a pointer to its docshell.
@ -583,7 +581,7 @@ nsObjectLoadingContent::SetupDocShell(nsIURI* aRecursionCheckURI)
IgnoredErrorResult result;
docShell = mFrameLoader->GetDocShell(result);
if (result.Failed()) {
NS_NOTREACHED("Could not get DocShell from mFrameLoader?");
MOZ_ASSERT_UNREACHABLE("Could not get DocShell from mFrameLoader?");
}
} else {
LOG(("OBJLC [%p]: Aborting recursive load", this));
@ -673,13 +671,13 @@ nsObjectLoadingContent::~nsObjectLoadingContent()
// Should have been unbound from the tree at this point, and
// CheckPluginStopEvent keeps us alive
if (mFrameLoader) {
NS_NOTREACHED("Should not be tearing down frame loaders at this point");
MOZ_ASSERT_UNREACHABLE("Should not be tearing down frame loaders at this point");
mFrameLoader->Destroy();
}
if (mInstanceOwner || mInstantiating) {
// This is especially bad as delayed stop will try to hold on to this
// object...
NS_NOTREACHED("Should not be tearing down a plugin at this point!");
MOZ_ASSERT_UNREACHABLE("Should not be tearing down a plugin at this point!");
StopPluginInstance();
}
DestroyImageLoadingContent();
@ -731,7 +729,7 @@ nsObjectLoadingContent::InstantiatePluginInstance(bool aIsLoading)
RefPtr<nsPluginHost> pluginHost = nsPluginHost::GetInst();
if (!pluginHost) {
NS_NOTREACHED("No pluginhost");
MOZ_ASSERT_UNREACHABLE("No pluginhost");
return NS_ERROR_FAILURE;
}
@ -1000,19 +998,21 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
if (mType == eType_Plugin) {
if (!mInstanceOwner) {
// We drop mChannel when stopping plugins, so something is wrong
NS_NOTREACHED("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);
}
NS_NOTREACHED("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) {
NS_NOTREACHED("Should be type loading at this point");
MOZ_ASSERT_UNREACHABLE("Should be type loading at this point");
return NS_BINDING_ABORTED;
}
NS_ASSERTION(!mChannelLoaded, "mChannelLoaded set already?");
@ -1114,7 +1114,8 @@ nsObjectLoadingContent::OnDataAvailable(nsIRequest *aRequest,
}
// We shouldn't have a connected channel with no final listener
NS_NOTREACHED("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;
@ -1333,7 +1334,7 @@ nsObjectLoadingContent::ObjectState() const
return NS_EVENT_STATE_VULNERABLE_NO_UPDATE;
}
}
NS_NOTREACHED("unknown type?");
MOZ_ASSERT_UNREACHABLE("unknown type?");
return NS_EVENT_STATE_LOADING;
}
@ -1450,7 +1451,7 @@ bool
nsObjectLoadingContent::CheckLoadPolicy(int16_t *aContentPolicy)
{
if (!aContentPolicy || !mURI) {
NS_NOTREACHED("Doing it wrong");
MOZ_ASSERT_UNREACHABLE("Doing it wrong");
return false;
}
@ -1489,7 +1490,7 @@ bool
nsObjectLoadingContent::CheckProcessPolicy(int16_t *aContentPolicy)
{
if (!aContentPolicy) {
NS_NOTREACHED("Null out variable");
MOZ_ASSERT_UNREACHABLE("Null out variable");
return false;
}
@ -1514,7 +1515,8 @@ nsObjectLoadingContent::CheckProcessPolicy(int16_t *aContentPolicy)
objectType = GetContentPolicyType();
break;
default:
NS_NOTREACHED("Calling checkProcessPolicy with a unloadable type");
MOZ_ASSERT_UNREACHABLE("Calling checkProcessPolicy with an unloadable "
"type");
return false;
}
@ -1632,7 +1634,7 @@ nsObjectLoadingContent::UpdateObjectParameters()
} else if (thisElement->NodeInfo()->Equals(nsGkAtoms::embed)) {
thisElement->GetAttr(kNameSpaceID_None, nsGkAtoms::src, uriStr);
} else {
NS_NOTREACHED("Unrecognized plugin-loading tag");
MOZ_ASSERT_UNREACHABLE("Unrecognized plugin-loading tag");
}
mRewrittenYoutubeEmbed = false;
@ -1699,7 +1701,7 @@ nsObjectLoadingContent::UpdateObjectParameters()
nsCString channelType;
rv = mChannel->GetContentType(channelType);
if (NS_FAILED(rv)) {
NS_NOTREACHED("GetContentType failed");
MOZ_ASSERT_UNREACHABLE("GetContentType failed");
stateInvalid = true;
channelType.Truncate();
}
@ -1719,7 +1721,7 @@ nsObjectLoadingContent::UpdateObjectParameters()
// Channel can change our URI through redirection
rv = NS_GetFinalChannelURI(mChannel, getter_AddRefs(newURI));
if (NS_FAILED(rv)) {
NS_NOTREACHED("NS_GetFinalChannelURI failure");
MOZ_ASSERT_UNREACHABLE("NS_GetFinalChannelURI failure");
stateInvalid = true;
}
@ -1902,7 +1904,7 @@ nsObjectLoadingContent::InitializeFromChannel(nsIRequest *aChannel)
if (mType != eType_Loading || mChannel) {
// We could technically call UnloadObject() here, if consumers have a valid
// reason for wanting to call this on an already-loaded tag.
NS_NOTREACHED("Should not have begun loading at this point");
MOZ_ASSERT_UNREACHABLE("Should not have begun loading at this point");
return NS_ERROR_UNEXPECTED;
}
@ -2045,7 +2047,7 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
// The only time we should have a loaded channel with a changed state is
// when the channel has just opened -- in which case this call should
// have originated from OnStartRequest
NS_NOTREACHED("Loading with a channel, but state doesn't make sense");
MOZ_ASSERT_UNREACHABLE("Loading with a channel, but state doesn't make sense");
return NS_OK;
}
@ -2147,7 +2149,7 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
if (mFrameLoader || mPendingInstantiateEvent || mInstanceOwner ||
mPendingCheckPluginStopEvent || mFinalListener)
{
NS_NOTREACHED("Trying to load new plugin with existing content");
MOZ_ASSERT_UNREACHABLE("Trying to load new plugin with existing content");
rv = NS_ERROR_UNEXPECTED;
return NS_OK;
}
@ -2155,7 +2157,7 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
// More sanity-checking:
// If mChannel is set, mChannelLoaded should be set, and vice-versa
if (mType != eType_Null && !!mChannel != mChannelLoaded) {
NS_NOTREACHED("Trying to load with bad channel state");
MOZ_ASSERT_UNREACHABLE("Trying to load with bad channel state");
rv = NS_ERROR_UNEXPECTED;
return NS_OK;
}
@ -2182,7 +2184,7 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
if (!mChannel) {
// We have a LoadImage() call, but UpdateObjectParameters requires a
// channel for images, so this is not a valid state.
NS_NOTREACHED("Attempting to load image without a channel?");
MOZ_ASSERT_UNREACHABLE("Attempting to load image without a channel?");
rv = NS_ERROR_UNEXPECTED;
break;
}
@ -2286,7 +2288,8 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
}
if (!handlerURI) {
NS_NOTREACHED("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;
}
@ -2308,7 +2311,8 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
if (!mChannel) {
// We could mFrameLoader->LoadURI(mURI), but UpdateObjectParameters
// requires documents have a channel, so this is not a valid state.
NS_NOTREACHED("Attempting to load a document without a channel");
MOZ_ASSERT_UNREACHABLE("Attempting to load a document without a "
"channel");
rv = NS_ERROR_FAILURE;
break;
}
@ -2332,7 +2336,7 @@ nsObjectLoadingContent::LoadObject(bool aNotify,
nsCOMPtr<nsIURILoader>
uriLoader(do_GetService(NS_URI_LOADER_CONTRACTID, &rv));
if (NS_FAILED(rv)) {
NS_NOTREACHED("Failed to get uriLoader service");
MOZ_ASSERT_UNREACHABLE("Failed to get uriLoader service");
mFrameLoader->Destroy();
mFrameLoader = nullptr;
break;
@ -2857,7 +2861,7 @@ nsObjectLoadingContent::ScriptRequestPluginInstance(JSContext* aCx,
NS_LITERAL_STRING("PluginScripted"));
nsresult rv = NS_DispatchToCurrentThread(ev);
if (NS_FAILED(rv)) {
NS_NOTREACHED("failed to dispatch PluginScripted event");
MOZ_ASSERT_UNREACHABLE("failed to dispatch PluginScripted event");
}
mScriptRequested = true;
} else if (callerIsContentJS && mType == eType_Plugin && !mInstanceOwner &&

View file

@ -176,8 +176,8 @@ nsStyleLinkElement::GetCharset(nsAString& aCharset)
/* virtual */ void
nsStyleLinkElement::OverrideBaseURI(nsIURI* aNewBaseURI)
{
NS_NOTREACHED("Base URI can't be overriden in this implementation "
"of nsIStyleSheetLinkingElement.");
MOZ_ASSERT_UNREACHABLE("Base URI can't be overriden in this implementation "
"of nsIStyleSheetLinkingElement.");
}
/* virtual */ void

View file

@ -912,7 +912,7 @@ ExtractByteStreamFromBody(const fetch::OwningBodyInit& aBodyInit,
charset);
}
NS_NOTREACHED("Should never reach here");
MOZ_ASSERT_UNREACHABLE("Should never reach here");
return NS_ERROR_FAILURE;
}
@ -964,7 +964,7 @@ ExtractByteStreamFromBody(const fetch::BodyInit& aBodyInit,
charset);
}
NS_NOTREACHED("Should never reach here");
MOZ_ASSERT_UNREACHABLE("Should never reach here");
return NS_ERROR_FAILURE;
}
@ -1020,7 +1020,7 @@ ExtractByteStreamFromBody(const fetch::ResponseBodyInit& aBodyInit,
charset);
}
NS_NOTREACHED("Should never reach here");
MOZ_ASSERT_UNREACHABLE("Should never reach here");
return NS_ERROR_FAILURE;
}

View file

@ -662,7 +662,7 @@ FetchBodyConsumer<Derived>::ContinueConsumeBody(nsresult aStatus,
break;
}
default:
NS_NOTREACHED("Unexpected consume body type");
MOZ_ASSERT_UNREACHABLE("Unexpected consume body type");
}
error.WouldReportJSException();

View file

@ -66,7 +66,7 @@ BlobURL::GetPrincipalUri(nsIURI** aUri)
NS_IMETHODIMP
BlobURL::Read(nsIObjectInputStream* aStream)
{
NS_NOTREACHED("Use nsIURIMutator.read() instead");
MOZ_ASSERT_UNREACHABLE("Use nsIURIMutator.read() instead");
return NS_ERROR_NOT_IMPLEMENTED;
}

View file

@ -2102,7 +2102,7 @@ HTMLFormElement::OnProgressChange(nsIWebProgress* aWebProgress,
int32_t aCurTotalProgress,
int32_t aMaxTotalProgress)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -2112,7 +2112,7 @@ HTMLFormElement::OnLocationChange(nsIWebProgress* aWebProgress,
nsIURI* location,
uint32_t aFlags)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -2122,7 +2122,7 @@ HTMLFormElement::OnStatusChange(nsIWebProgress* aWebProgress,
nsresult aStatus,
const char16_t* aMessage)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}
@ -2131,7 +2131,7 @@ HTMLFormElement::OnSecurityChange(nsIWebProgress* aWebProgress,
nsIRequest* aRequest,
uint32_t state)
{
NS_NOTREACHED("notification excluded in AddProgressListener(...)");
MOZ_ASSERT_UNREACHABLE("notification excluded in AddProgressListener(...)");
return NS_OK;
}

View file

@ -1569,7 +1569,7 @@ HTMLInputElement::GetNonFileValueInternal(nsAString& aValue) const
return;
case VALUE_MODE_FILENAME:
NS_NOTREACHED("Someone screwed up here");
MOZ_ASSERT_UNREACHABLE("Someone screwed up here");
// We'll just return empty string if someone does screw up.
aValue.Truncate();
return;

View file

@ -1225,10 +1225,10 @@ protected:
case VALUE_MODE_VALUE:
case VALUE_MODE_FILENAME:
return mValueChanged;
default:
NS_NOTREACHED("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;
}
/**

View file

@ -2473,7 +2473,7 @@ HTMLMediaElement::LoadFromSourceChildren()
// If we fail to load, loop back and try loading the next resource.
DispatchAsyncSourceError(child);
}
NS_NOTREACHED("Execution should not reach here!");
MOZ_ASSERT_UNREACHABLE("Execution should not reach here!");
}
void
@ -6703,7 +6703,7 @@ HTMLMediaElement::GetNextSource()
return child->AsElement();
}
}
NS_NOTREACHED("Execution should not reach here!");
MOZ_ASSERT_UNREACHABLE("Execution should not reach here!");
return nullptr;
}

View file

@ -90,7 +90,8 @@ PluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
nsCOMPtr<nsIStreamListener> objListener = do_QueryInterface(objlc);
if (!objListener) {
NS_NOTREACHED("PluginStreamListener without appropriate content node");
MOZ_ASSERT_UNREACHABLE("PluginStreamListener without appropriate content "
"node");
return NS_BINDING_ABORTED;
}
@ -100,7 +101,7 @@ PluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
// channel, so it can proceed with a load normally once it gets OnStartRequest
nsresult rv = objlc->InitializeFromChannel(request);
if (NS_FAILED(rv)) {
NS_NOTREACHED("InitializeFromChannel failed");
MOZ_ASSERT_UNREACHABLE("InitializeFromChannel failed");
return rv;
}

View file

@ -84,7 +84,7 @@ nsGenericHTMLElement*
NS_NewHTMLNOTUSEDElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
FromParser aFromParser)
{
NS_NOTREACHED("The element ctor should never be called");
MOZ_ASSERT_UNREACHABLE("The element ctor should never be called");
return nullptr;
}

View file

@ -1794,7 +1794,7 @@ DirectionToName(nsITextControlFrame::SelectionDirection dir, nsAString& aDirecti
} else if (dir == nsITextControlFrame::eBackward) {
aDirection.AssignLiteral("backward");
} else {
NS_NOTREACHED("Invalid SelectionDirection value");
MOZ_ASSERT_UNREACHABLE("Invalid SelectionDirection value");
}
}

View file

@ -1131,13 +1131,13 @@ IndexedDatabaseManager::Observe(nsISupports* aSubject, const char* aTopic,
sLowDiskSpaceMode = false;
}
else {
NS_NOTREACHED("Unknown data value!");
MOZ_ASSERT_UNREACHABLE("Unknown data value!");
}
return NS_OK;
}
NS_NOTREACHED("Unknown topic!");
MOZ_ASSERT_UNREACHABLE("Unknown topic!");
return NS_ERROR_UNEXPECTED;
}

View file

@ -392,7 +392,7 @@ Key::DecodeJSValInternal(const unsigned char*& aPos, const unsigned char* aEnd,
aVal.setObject(*binary);
}
else {
NS_NOTREACHED("Unknown key type!");
MOZ_ASSERT_UNREACHABLE("Unknown key type!");
}
return NS_OK;

View file

@ -307,7 +307,7 @@ KeyPath::AppendStringWithValidation(const nsAString& aString)
return true;
}
NS_NOTREACHED("What?!");
MOZ_ASSERT_UNREACHABLE("What?!");
return false;
}
@ -429,7 +429,7 @@ KeyPath::SerializeToString(nsAString& aString) const
return;
}
NS_NOTREACHED("What?");
MOZ_ASSERT_UNREACHABLE("What?");
}
// static

View file

@ -2958,7 +2958,7 @@ ContentChild::RecvDomainSetChanged(const uint32_t& aSetType,
mPolicy->GetSuperWhitelist(getter_AddRefs(set));
break;
default:
NS_NOTREACHED("Unexpected setType");
MOZ_ASSERT_UNREACHABLE("Unexpected setType");
return IPC_FAIL_NO_REASON(this);
}
@ -2979,7 +2979,7 @@ ContentChild::RecvDomainSetChanged(const uint32_t& aSetType,
set->Clear();
break;
default:
NS_NOTREACHED("Unexpected changeType");
MOZ_ASSERT_UNREACHABLE("Unexpected changeType");
return IPC_FAIL_NO_REASON(this);
}

View file

@ -2517,7 +2517,7 @@ TabParent::RecvSetNativeChildOfShareableWindow(const uintptr_t& aChildWindow)
}
return IPC_OK();
#else
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"TabParent::RecvSetNativeChildOfShareableWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif

View file

@ -1288,7 +1288,7 @@ NS_INTERFACE_MAP_END_INHERITING(mozilla::net::nsSimpleURI)
NS_IMETHODIMP
nsJSURI::Read(nsIObjectInputStream *aStream)
{
NS_NOTREACHED("Use nsIURIMutator.read() instead");
MOZ_ASSERT_UNREACHABLE("Use nsIURIMutator.read() instead");
return NS_ERROR_NOT_IMPLEMENTED;
}

View file

@ -2514,7 +2514,7 @@ MediaCacheStream::GetNextCachedDataInternal(AutoLock&, int64_t aOffset)
++blockIndex;
}
NS_NOTREACHED("Should return in loop");
MOZ_ASSERT_UNREACHABLE("Should return in loop");
return -1;
}

View file

@ -58,7 +58,7 @@ DetailedPromise::MaybeReject(nsresult aArg, const nsACString& aReason)
void
DetailedPromise::MaybeReject(ErrorResult&, const nsACString& aReason)
{
NS_NOTREACHED("nsresult expected in MaybeReject()");
MOZ_ASSERT_UNREACHABLE("nsresult expected in MaybeReject()");
}
/* static */ already_AddRefed<DetailedPromise>

View file

@ -40,7 +40,7 @@ GMPVideoHostImpl::CreateFrame(GMPVideoFrameFormat aFormat, GMPVideoFrame** aFram
*aFrame = new GMPVideoEncodedFrameImpl(this);
return GMPNoErr;
default:
NS_NOTREACHED("Unknown frame format!");
MOZ_ASSERT_UNREACHABLE("Unknown frame format!");
}
return GMPGenericErr;

View file

@ -329,7 +329,7 @@ public:
GraphTime aFrom,
AudioBlock* aOutput)
{
NS_NOTREACHED("ProduceBlockBeforeInput called on wrong engine\n");
MOZ_ASSERT_UNREACHABLE("ProduceBlockBeforeInput called on wrong engine");
}
/**

View file

@ -69,7 +69,7 @@ SetParamsOnBiquad(WebCore::Biquad& aBiquad,
aBiquad.setAllpassParams(normalizedFrequency, aQ);
break;
default:
NS_NOTREACHED("We should never see the alternate names here");
MOZ_ASSERT_UNREACHABLE("We should never see the alternate names here");
break;
}
}

View file

@ -125,7 +125,7 @@ public:
mPanningModelFunction = &PannerNodeEngine::HRTFPanningFunction;
break;
default:
NS_NOTREACHED("We should never see the alternate names here");
MOZ_ASSERT_UNREACHABLE("We should never see alternate names here");
break;
}
break;
@ -141,7 +141,7 @@ public:
mDistanceModelFunction = &PannerNodeEngine::ExponentialGainFunction;
break;
default:
NS_NOTREACHED("We should never see the alternate names here");
MOZ_ASSERT_UNREACHABLE("We should never see alternate names here");
break;
}
break;

View file

@ -41,7 +41,7 @@ static uint32_t ValueOf(OverSampleType aType)
case OverSampleType::_2x: return 2;
case OverSampleType::_4x: return 4;
default:
NS_NOTREACHED("We should never reach here");
MOZ_ASSERT_UNREACHABLE("We should never reach here");
return 1;
}
}
@ -283,7 +283,7 @@ public:
mResampler.DownSample(i, outputBuffer, 4);
break;
default:
NS_NOTREACHED("We should never reach here");
MOZ_ASSERT_UNREACHABLE("We should never reach here");
}
}
}

View file

@ -346,7 +346,7 @@ void PeriodicWave::generateBasicWaveform(OscillatorType shape)
}
break;
default:
NS_NOTREACHED("invalid oscillator type");
MOZ_ASSERT_UNREACHABLE("invalid oscillator type");
a = 0;
b = 0;
break;

View file

@ -783,7 +783,7 @@ nsNPAPIPluginInstance::DidComposite()
nsresult
nsNPAPIPluginInstance::NotifyPainted(void)
{
NS_NOTREACHED("Dead code, shouldn't be called.");
MOZ_ASSERT_UNREACHABLE("Dead code, shouldn't be called.");
return NS_ERROR_NOT_IMPLEMENTED;
}

View file

@ -416,8 +416,8 @@ nsNPAPIPluginStreamListener::OnDataAvailable(nsPluginStreamListenerPeer* streamP
NS_ENSURE_SUCCESS(rv, rv);
if (amountRead == 0) {
NS_NOTREACHED("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;
}

View file

@ -790,7 +790,7 @@ nsPluginHost::InstantiatePluginInstance(const nsACString& aMimeType, nsIURI* aUR
#endif
if (aMimeType.IsEmpty()) {
NS_NOTREACHED("Attempting to spawn a plugin with no mime type");
MOZ_ASSERT_UNREACHABLE("Attempting to spawn a plugin with no mime type");
return NS_ERROR_FAILURE;
}

View file

@ -2824,7 +2824,7 @@ nsresult nsPluginInstanceOwner::Init(nsIContent* aContent)
// document is destroyed before we try to create the new one.
objFrame->PresContext()->EnsureVisible();
} else {
NS_NOTREACHED("Should not be initializing plugin without a frame");
MOZ_ASSERT_UNREACHABLE("Should not be initializing plugin without a frame");
return NS_ERROR_FAILURE;
}

View file

@ -42,7 +42,7 @@ static char* GetKeyValue(void* verbuf, const WCHAR* key,
if (_snwprintf_s(keybuf, ArrayLength(keybuf), _TRUNCATE,
keyFormat, language, codepage, key) < 0)
{
NS_NOTREACHED("plugin info key too long for buffer!");
MOZ_ASSERT_UNREACHABLE("plugin info key too long for buffer!");
return nullptr;
}

View file

@ -76,7 +76,8 @@ struct ParamTraits<mozilla::plugins::NPRemoteEvent>
WriteParam(aMsg, aParam.event.data.text.text);
break;
default:
NS_NOTREACHED("Attempted to serialize unknown event type.");
MOZ_ASSERT_UNREACHABLE("Attempted to serialize unknown event "
"type.");
return;
}
aMsg->WriteDouble(aParam.contentsScaleFactor);
@ -173,7 +174,8 @@ struct ParamTraits<mozilla::plugins::NPRemoteEvent>
}
break;
default:
NS_NOTREACHED("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)) {

View file

@ -304,7 +304,8 @@ PluginInstanceChild::InternalGetNPObjectForValue(NPNVariable aValue,
break;
default:
NS_NOTREACHED("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
@ -520,14 +521,15 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar,
*static_cast<double*>(aValue) = mCSSZoomFactor;
return NPERR_NO_ERROR;
}
#ifdef DEBUG
case NPNVjavascriptEnabledBool:
case NPNVasdEnabledBool:
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless:
NS_NOTREACHED("NPNVariable should be handled in PluginModuleChild.");
MOZ_FALLTHROUGH;
MOZ_FALLTHROUGH_ASSERT("NPNVariable should be handled in "
"PluginModuleChild.");
#endif
default:
@ -1124,7 +1126,7 @@ PluginInstanceChild::AnswerCreateChildPluginWindow(NativeWindowHandle* aChildPlu
*aChildPluginWindow = mPluginWindowHWND;
return IPC_OK();
#else
NS_NOTREACHED("PluginInstanceChild::CreateChildPluginWindow not implemented!");
MOZ_ASSERT_UNREACHABLE("CreateChildPluginWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
@ -1137,7 +1139,7 @@ PluginInstanceChild::RecvCreateChildPopupSurrogate(const NativeWindowHandle& aNe
CreateWinlessPopupSurrogate();
return IPC_OK();
#else
NS_NOTREACHED("PluginInstanceChild::CreateChildPluginWindow not implemented!");
MOZ_ASSERT_UNREACHABLE("CreateChildPluginWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
@ -1223,7 +1225,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
break;
default:
NS_NOTREACHED("Bad plugin window type.");
MOZ_ASSERT_UNREACHABLE("Bad plugin window type.");
return IPC_FAIL_NO_REASON(this);
break;
}
@ -1506,7 +1508,7 @@ PluginInstanceChild::PluginWindowProcInternal(HWND hWnd,
PluginInstanceChild* self = reinterpret_cast<PluginInstanceChild*>(
GetProp(hWnd, kPluginInstanceChildProperty));
if (!self) {
NS_NOTREACHED("Badness!");
MOZ_ASSERT_UNREACHABLE("Badness!");
return 0;
}
@ -2296,7 +2298,7 @@ PluginInstanceChild::WinlessHiddenFlashWndProc(HWND hWnd,
PluginInstanceChild* self = reinterpret_cast<PluginInstanceChild*>(
GetProp(hWnd, kFlashThrottleProperty));
if (!self) {
NS_NOTREACHED("Badness!");
MOZ_ASSERT_UNREACHABLE("Badness!");
return 0;
}
@ -2330,7 +2332,7 @@ PluginInstanceChild::EnumThreadWindowsCallback(HWND hWnd,
{
PluginInstanceChild* self = reinterpret_cast<PluginInstanceChild*>(aParam);
if (!self) {
NS_NOTREACHED("Enum befuddled!");
MOZ_ASSERT_UNREACHABLE("Enum befuddled!");
return FALSE;
}
@ -2454,7 +2456,7 @@ PluginInstanceChild::AnswerSetPluginFocus()
::SetFocus(mPluginWindowHWND);
return IPC_OK();
#else
NS_NOTREACHED("PluginInstanceChild::AnswerSetPluginFocus not implemented!");
MOZ_ASSERT_UNREACHABLE("AnswerSetPluginFocus not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
@ -2474,7 +2476,7 @@ PluginInstanceChild::AnswerUpdateWindow()
}
return IPC_OK();
#else
NS_NOTREACHED("PluginInstanceChild::AnswerUpdateWindow not implemented!");
MOZ_ASSERT_UNREACHABLE("AnswerUpdateWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}

View file

@ -1999,7 +1999,7 @@ PluginInstanceParent::RecvSetNetscapeWindowAsParent(const NativeWindowHandle& ch
return IPC_OK();
#else
NS_NOTREACHED("PluginInstanceParent::RecvSetNetscapeWindowAsParent not implemented!");
MOZ_ASSERT_UNREACHABLE("RecvSetNetscapeWindowAsParent not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}
@ -2033,7 +2033,7 @@ PluginInstanceParent::PluginWindowHookProc(HWND hWnd,
PluginInstanceParent* self = reinterpret_cast<PluginInstanceParent*>(
::GetPropW(hWnd, kPluginInstanceParentProperty));
if (!self) {
NS_NOTREACHED("PluginInstanceParent::PluginWindowHookProc null this ptr!");
MOZ_ASSERT_UNREACHABLE("PluginInstanceParent::PluginWindowHookProc null this ptr!");
return DefWindowProc(hWnd, message, wParam, lParam);
}
@ -2051,7 +2051,7 @@ PluginInstanceParent::PluginWindowHookProc(HWND hWnd,
}
if (self->mPluginWndProc == PluginWindowHookProc) {
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginWindowHookProc invoking mPluginWndProc w/"
"mPluginWndProc == PluginWindowHookProc????");
return DefWindowProc(hWnd, message, wParam, lParam);
@ -2230,7 +2230,7 @@ PluginInstanceParent::AnswerPluginFocusChange(const bool& gotFocus)
}
return IPC_OK();
#else
NS_NOTREACHED("PluginInstanceParent::AnswerPluginFocusChange not implemented!");
MOZ_ASSERT_UNREACHABLE("AnswerPluginFocusChange not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
}

View file

@ -1022,7 +1022,7 @@ static void ExchangeMethods(Class target_class,
if (m1 && m2)
method_exchangeImplementations(m1, m2);
else
NS_NOTREACHED("Cocoa swizzling failed");
MOZ_ASSERT_UNREACHABLE("Cocoa swizzling failed");
}
namespace mac_plugin_interposing {

View file

@ -1136,7 +1136,7 @@ _getvalue(NPP aNPP,
}
}
NS_NOTREACHED("Shouldn't get here!");
MOZ_ASSERT_UNREACHABLE("Shouldn't get here!");
return NPERR_GENERIC_ERROR;
}
@ -1842,7 +1842,7 @@ PluginModuleChild::AnswerModuleSupportsAsyncRender(bool* aResult)
*aResult = gChromeInstance->mAsyncRenderSupport;
return IPC_OK();
#else
NS_NOTREACHED("Shouldn't get here!");
MOZ_ASSERT_UNREACHABLE("Shouldn't get here!");
return IPC_FAIL_NO_REASON(this);
#endif
}

View file

@ -2619,7 +2619,7 @@ PluginModuleParent::RecvProcessNativeEventsInInterruptCall()
ProcessNativeEventsInInterruptCall();
return IPC_OK();
#else
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginModuleParent::RecvProcessNativeEventsInInterruptCall not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
@ -2632,7 +2632,7 @@ PluginModuleParent::ProcessRemoteNativeEventsInInterruptCall()
Unused << SendProcessNativeEventsInInterruptCall();
return;
#endif
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginModuleParent::ProcessRemoteNativeEventsInInterruptCall not implemented!");
}
@ -2647,7 +2647,7 @@ PluginModuleParent::RecvPluginShowWindow(const uint32_t& aWindowId, const bool&
mac_plugin_interposing::parent::OnPluginShowWindow(aWindowId, windowBound, aModal);
return IPC_OK();
#else
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginInstanceParent::RecvPluginShowWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
@ -2661,7 +2661,7 @@ PluginModuleParent::RecvPluginHideWindow(const uint32_t& aWindowId)
mac_plugin_interposing::parent::OnPluginHideWindow(aWindowId, OtherPid());
return IPC_OK();
#else
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginInstanceParent::RecvPluginHideWindow not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
@ -2675,7 +2675,7 @@ PluginModuleParent::RecvSetCursor(const NSCursorInfo& aCursorInfo)
mac_plugin_interposing::parent::OnSetCursor(aCursorInfo);
return IPC_OK();
#else
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginInstanceParent::RecvSetCursor not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
@ -2689,7 +2689,7 @@ PluginModuleParent::RecvShowCursor(const bool& aShow)
mac_plugin_interposing::parent::OnShowCursor(aShow);
return IPC_OK();
#else
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginInstanceParent::RecvShowCursor not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
@ -2703,7 +2703,7 @@ PluginModuleParent::RecvPushCursor(const NSCursorInfo& aCursorInfo)
mac_plugin_interposing::parent::OnPushCursor(aCursorInfo);
return IPC_OK();
#else
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginInstanceParent::RecvPushCursor not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif
@ -2717,7 +2717,7 @@ PluginModuleParent::RecvPopCursor()
mac_plugin_interposing::parent::OnPopCursor();
return IPC_OK();
#else
NS_NOTREACHED(
MOZ_ASSERT_UNREACHABLE(
"PluginInstanceParent::RecvPopCursor not implemented!");
return IPC_FAIL_NO_REASON(this);
#endif

View file

@ -368,7 +368,7 @@ PluginScriptableObjectParent::ScriptableGetProperty(NPObject* aObject,
NPVariant* aResult)
{
// See GetPropertyHelper below.
NS_NOTREACHED("Shouldn't ever call this directly!");
MOZ_ASSERT_UNREACHABLE("Shouldn't ever call this directly!");
return false;
}

View file

@ -106,7 +106,7 @@ mozilla::plugins::ConvertToVariant(const Variant& aRemoteVariant,
}
default:
NS_NOTREACHED("Shouldn't get here!");
MOZ_ASSERT_UNREACHABLE("Shouldn't get here!");
return false;
}
@ -158,7 +158,7 @@ mozilla::plugins::ConvertToRemoteVariant(const NPVariant& aVariant,
aRemoteVariant = actor;
}
else {
NS_NOTREACHED("Shouldn't get here!");
MOZ_ASSERT_UNREACHABLE("Shouldn't get here!");
return false;
}

View file

@ -61,7 +61,7 @@ NPObjectFromVariant(const Variant& aRemoteVariant)
}
default:
NS_NOTREACHED("Shouldn't get here!");
MOZ_ASSERT_UNREACHABLE("Shouldn't get here!");
return nullptr;
}
}

View file

@ -48,7 +48,8 @@ PresentationChild::ActorDestroy(ActorDestroyReason aWhy)
PPresentationRequestChild*
PresentationChild::AllocPPresentationRequestChild(const PresentationIPCRequest& aRequest)
{
NS_NOTREACHED("We should never be manually allocating PPresentationRequestChild actors");
MOZ_ASSERT_UNREACHABLE("We should never be manually allocating "
"PPresentationRequestChild actors");
return nullptr;
}

View file

@ -198,7 +198,8 @@ PPresentationBuilderParent*
PresentationParent::AllocPPresentationBuilderParent(const nsString& aSessionId,
const uint8_t& aRole)
{
NS_NOTREACHED("We should never be manually allocating AllocPPresentationBuilderParent actors");
MOZ_ASSERT_UNREACHABLE("We should never be manually allocating "
"AllocPPresentationBuilderParent actors");
return nullptr;
}

View file

@ -65,7 +65,7 @@ public:
case TYPE_MAX:
default:
NS_NOTREACHED("Bad id value!");
MOZ_ASSERT_UNREACHABLE("Bad id value!");
return NS_ERROR_UNEXPECTED;
}

View file

@ -1067,7 +1067,7 @@ ExtractBytesFromData(const OwningArrayBufferViewOrArrayBufferOrUSVString& aDataI
if (aDataInit.IsUSVString()) {
return ExtractBytesFromUSVString(aDataInit.GetAsUSVString(), aBytes);
}
NS_NOTREACHED("Unexpected push message data");
MOZ_ASSERT_UNREACHABLE("Unexpected push message data");
return NS_ERROR_FAILURE;
}
}

View file

@ -610,8 +610,8 @@ nsSMILAnimationFunction::ComputePacedPosition(const nsSMILValueArray& aValues,
}
}
NS_NOTREACHED("shouldn't complete loop & get here -- if we do, "
"then aSimpleProgress was probably out of bounds");
MOZ_ASSERT_UNREACHABLE("shouldn't complete loop & get here -- if we do, "
"then aSimpleProgress was probably out of bounds");
return NS_ERROR_FAILURE;
}

View file

@ -39,7 +39,7 @@ nsresult
nsSMILNullType::Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd,
uint32_t aCount) const
{
NS_NOTREACHED("Adding NULL type");
MOZ_ASSERT_UNREACHABLE("Adding NULL type");
return NS_ERROR_FAILURE;
}
@ -48,7 +48,7 @@ nsSMILNullType::ComputeDistance(const nsSMILValue& aFrom,
const nsSMILValue& aTo,
double& aDistance) const
{
NS_NOTREACHED("Computing distance for NULL type");
MOZ_ASSERT_UNREACHABLE("Computing distance for NULL type");
return NS_ERROR_FAILURE;
}
@ -58,6 +58,6 @@ nsSMILNullType::Interpolate(const nsSMILValue& aStartVal,
double aUnitDistance,
nsSMILValue& aResult) const
{
NS_NOTREACHED("Interpolating NULL type");
MOZ_ASSERT_UNREACHABLE("Interpolating NULL type");
return NS_ERROR_FAILURE;
}

View file

@ -1852,7 +1852,7 @@ nsSMILTimedElement::GetNextInterval(const nsSMILInterval* aPrevInterval,
beginAfter = tempEnd->Time();
}
NS_NOTREACHED("Hmm... we really shouldn't be here");
MOZ_ASSERT_UNREACHABLE("Hmm... we really shouldn't be here");
return false;
}

View file

@ -376,7 +376,7 @@ DOMSVGPathSeg::CreateFor(DOMSVGPathSegList *aList,
case PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
return new DOMSVGPathSegCurvetoQuadraticSmoothRel(aList, aListIndex, aIsAnimValItem);
default:
NS_NOTREACHED("Invalid path segment type");
MOZ_ASSERT_UNREACHABLE("Invalid path segment type");
return nullptr;
}
}

View file

@ -126,7 +126,8 @@ DOMSVGPathSegList::InternalListWillChangeTo(const SVGPathData& aNewValue)
// 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
// NS_NOTREACHED 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

View file

@ -598,7 +598,7 @@ SVGContentUtils::GetViewBoxTransform(float aViewportWidth, float aViewportHeight
f = aViewportHeight - a * aViewboxHeight;
break;
default:
NS_NOTREACHED("Unknown value for align");
MOZ_ASSERT_UNREACHABLE("Unknown value for align");
}
}
else if (
@ -623,10 +623,10 @@ SVGContentUtils::GetViewBoxTransform(float aViewportWidth, float aViewportHeight
e = aViewportWidth - a * aViewboxWidth;
break;
default:
NS_NOTREACHED("Unknown value for align");
MOZ_ASSERT_UNREACHABLE("Unknown value for align");
}
}
else NS_NOTREACHED("Unknown value for meetOrSlice");
else MOZ_ASSERT_UNREACHABLE("Unknown value for meetOrSlice");
}
if (aViewboxX) e += -a * aViewboxX;

View file

@ -166,7 +166,7 @@ SVGLength::GetUserUnitsPerUnit(const nsSVGElement *aElement, uint8_t aAxis) cons
case SVGLengthBinding::SVG_LENGTHTYPE_EXS:
return SVGContentUtils::GetFontXHeight(const_cast<nsSVGElement*>(aElement));
default:
NS_NOTREACHED("Unknown unit type");
MOZ_ASSERT_UNREACHABLE("Unknown unit type");
return std::numeric_limits<float>::quiet_NaN();
}
}
@ -210,7 +210,8 @@ GetUnitString(nsAString& unit, uint16_t unitType)
}
return;
}
NS_NOTREACHED("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

View file

@ -45,7 +45,8 @@ SVGMotionSMILAnimationFunction::MarkStaleIfAttributeAffectsPath(nsAtom* aAttribu
} else if (aAttribute == nsGkAtoms::by) {
isAffected = (mPathSourceType <= ePathSourceType_ByAttr);
} else {
NS_NOTREACHED("Should only call this method for path-describing attrs");
MOZ_ASSERT_UNREACHABLE("Should only call this method for path-describing "
"attrs");
isAffected = false;
}

View file

@ -22,8 +22,8 @@ SVGMotionSMILAttr::ValueFromString(const nsAString& aStr,
nsSMILValue& aValue,
bool& aPreventCachingOfSandwich) const
{
NS_NOTREACHED("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;
}

View file

@ -486,7 +486,7 @@ SVGPathData::BuildPath(PathBuilder* builder,
break;
default:
NS_NOTREACHED("Bad path segment type");
MOZ_ASSERT_UNREACHABLE("Bad path segment type");
return nullptr; // according to spec we'd use everything up to the bad seg anyway
}

View file

@ -60,7 +60,7 @@ GetUnitString(nsAString& unit, uint16_t unitType)
return;
}
NS_NOTREACHED("Unknown unit type");
MOZ_ASSERT_UNREACHABLE("Unknown unit type");
}
static uint16_t
@ -123,7 +123,7 @@ nsSVGAngle::GetDegreesPerUnit(uint8_t aUnit)
case SVG_ANGLETYPE_GRAD:
return 90.0f / 100.0f;
default:
NS_NOTREACHED("Unknown unit type");
MOZ_ASSERT_UNREACHABLE("Unknown unit type");
return 0;
}
}
@ -356,7 +356,7 @@ nsSVGAngle::ToSMILAttr(nsSVGElement *aSVGElement)
}
// SMILOrient would not be useful for general angle attributes (also,
// "orient" is the only animatable <angle>-valued attribute in SVG 1.1).
NS_NOTREACHED("Trying to animate unknown angle attribute.");
MOZ_ASSERT_UNREACHABLE("Trying to animate unknown angle attribute.");
return nullptr;
}

View file

@ -1689,7 +1689,7 @@ nsSVGElement::GetAnimatedLengthList(uint8_t aAttrEnum)
if (aAttrEnum < info.mLengthListCount) {
return &(info.mLengthLists[aAttrEnum]);
}
NS_NOTREACHED("Bad attrEnum");
MOZ_ASSERT_UNREACHABLE("Bad attrEnum");
return nullptr;
}

View file

@ -62,7 +62,7 @@ GetUnitString(nsAString& unit, uint16_t unitType)
return;
}
NS_NOTREACHED("Unknown unit type");
MOZ_ASSERT_UNREACHABLE("Unknown unit type");
}
static uint16_t
@ -202,7 +202,7 @@ UserSpaceMetricsWithSize::GetAxisLength(uint8_t aCtxType) const
length = SVGContentUtils::ComputeNormalizedHypotenuse(size.width, size.height);
break;
default:
NS_NOTREACHED("Unknown axis type");
MOZ_ASSERT_UNREACHABLE("Unknown axis type");
length = 1;
break;
}
@ -263,7 +263,7 @@ nsSVGLength2::GetPixelsPerUnit(const UserSpaceMetrics& aMetrics,
case SVGLengthBinding::SVG_LENGTHTYPE_EXS:
return aMetrics.GetExLength();
default:
NS_NOTREACHED("Unknown unit type");
MOZ_ASSERT_UNREACHABLE("Unknown unit type");
return 0;
}
}

View file

@ -190,7 +190,7 @@ SVGTransformSMILData::SVGTransformSMILData(const nsSVGTransform& aTransform)
break;
default:
NS_NOTREACHED("Unexpected transform type");
MOZ_ASSERT_UNREACHABLE("Unexpected transform type");
break;
}
}
@ -228,7 +228,7 @@ SVGTransformSMILData::ToSVGTransform() const
break;
default:
NS_NOTREACHED("Unexpected transform type");
MOZ_ASSERT_UNREACHABLE("Unexpected transform type");
break;
}
return result;

View file

@ -2603,7 +2603,7 @@ RuntimeService::Observe(nsISupports* aSubject, const char* aTopic,
return NS_OK;
}
NS_NOTREACHED("Unknown observer topic!");
MOZ_ASSERT_UNREACHABLE("Unknown observer topic!");
return NS_OK;
}

View file

@ -172,7 +172,7 @@ WorkerDebuggerManager::Observe(nsISupports* aSubject, const char* aTopic,
return NS_OK;
}
NS_NOTREACHED("Unknown observer topic!");
MOZ_ASSERT_UNREACHABLE("Unknown observer topic!");
return NS_OK;
}

View file

@ -3415,7 +3415,8 @@ void
XMLHttpRequestMainThread::HandleTimeoutCallback()
{
if (mState == XMLHttpRequestBinding::DONE) {
NS_NOTREACHED("XMLHttpRequestMainThread::HandleTimeoutCallback with completed request");
MOZ_ASSERT_UNREACHABLE("XMLHttpRequestMainThread::HandleTimeoutCallback "
"with completed request");
// do nothing!
return;
}

View file

@ -186,7 +186,7 @@ void
nsXMLFragmentContentSink::SetDocumentCharset(
NotNull<const Encoding*> aEncoding)
{
NS_NOTREACHED("fragments shouldn't set charset");
MOZ_ASSERT_UNREACHABLE("fragments shouldn't set charset");
}
nsISupports *
@ -260,7 +260,7 @@ nsXMLFragmentContentSink::HandleDoctypeDecl(const nsAString & aSubset,
const nsAString & aPublicId,
nsISupports* aCatalogData)
{
NS_NOTREACHED("fragments shouldn't have doctype declarations");
MOZ_ASSERT_UNREACHABLE("fragments shouldn't have doctype declarations");
return NS_OK;
}
@ -286,7 +286,7 @@ nsXMLFragmentContentSink::HandleXMLDeclaration(const char16_t *aVersion,
const char16_t *aEncoding,
int32_t aStandalone)
{
NS_NOTREACHED("fragments shouldn't have XML declarations");
MOZ_ASSERT_UNREACHABLE("fragments shouldn't have XML declarations");
return NS_OK;
}
@ -337,7 +337,7 @@ nsXMLFragmentContentSink::ProcessStyleLinkFromHeader(
const nsAString& aReferrerPolicy)
{
NS_NOTREACHED("Shouldn't have headers for a fragment sink");
MOZ_ASSERT_UNREACHABLE("Shouldn't have headers for a fragment sink");
return NS_OK;
}
@ -423,7 +423,7 @@ nsXMLFragmentContentSink::DidProcessATokenImpl()
NS_IMETHODIMP
nsXMLFragmentContentSink::IgnoreFirstContainer()
{
NS_NOTREACHED("XML isn't as broken as HTML");
MOZ_ASSERT_UNREACHABLE("XML isn't as broken as HTML");
return NS_ERROR_FAILURE;
}

View file

@ -713,7 +713,7 @@ txCoreFunctionCall::isSensitiveTo(ContextSensitivity aContext)
}
}
NS_NOTREACHED("how'd we get here?");
MOZ_ASSERT_UNREACHABLE("how'd we get here?");
return true;
}

View file

@ -183,7 +183,7 @@ _class::getSubExprAt(uint32_t aPos) \
void \
_class::setSubExprAt(uint32_t aPos, Expr* aExpr) \
{ \
NS_NOTREACHED("setting bad subexpression index"); \
MOZ_ASSERT_UNREACHABLE("setting bad subexpression index");\
}
#define TX_IMPL_EXPR_STUBS_1(_class, _ReturnType, _Expr1) \

View file

@ -44,7 +44,7 @@ Token*
txExprLexer::nextToken()
{
if (!mCurrentItem) {
NS_NOTREACHED("nextToken called on uninitialized lexer");
MOZ_ASSERT_UNREACHABLE("nextToken called on uninitialized lexer");
return nullptr;
}

View file

@ -248,7 +248,7 @@ txExprParser::createBinaryExpr(nsAutoPtr<Expr>& left, nsAutoPtr<Expr>& right,
break;
default:
NS_NOTREACHED("operator tokens should be already checked");
MOZ_ASSERT_UNREACHABLE("operator tokens should be already checked");
return NS_ERROR_UNEXPECTED;
}
NS_ENSURE_TRUE(expr, NS_ERROR_OUT_OF_MEMORY);
@ -712,7 +712,7 @@ txExprParser::createPathExpr(txExprLexer& lexer, txIParseContext* aContext,
expr.forget();
}
NS_NOTREACHED("internal xpath parser error");
MOZ_ASSERT_UNREACHABLE("internal xpath parser error");
return NS_ERROR_UNEXPECTED;
}
@ -846,7 +846,7 @@ txExprParser::parseParameters(FunctionCall* aFnCall, txExprLexer& lexer,
}
}
NS_NOTREACHED("internal xpath parser error");
MOZ_ASSERT_UNREACHABLE("internal xpath parser error");
return NS_ERROR_UNEXPECTED;
}

View file

@ -39,7 +39,7 @@ txLiteralExpr::getSubExprAt(uint32_t aPos)
void
txLiteralExpr::setSubExprAt(uint32_t aPos, Expr* aExpr)
{
NS_NOTREACHED("setting bad subexpression index");
MOZ_ASSERT_UNREACHABLE("setting bad subexpression index");
}
bool

View file

@ -52,7 +52,7 @@ txNodeTypeTest::matches(const txXPathNode& aNode, txIMatchContext* aContext,
}
}
NS_NOTREACHED("Didn't deal with all values of the NodeType enum!");
MOZ_ASSERT_UNREACHABLE("Didn't deal with all values of the NodeType enum!");
aMatched = false;
return NS_OK;

View file

@ -136,7 +136,7 @@ RelationalExpr::compareResults(txIEvalContext* aContext, txAExprResult* aLeft,
}
default:
{
NS_NOTREACHED("We should have caught all cases");
MOZ_ASSERT_UNREACHABLE("We should have caught all cases");
}
}

View file

@ -432,7 +432,7 @@ flushTransaction(txOutputTransaction* aTransaction,
}
default:
{
NS_NOTREACHED("Unexpected transaction type");
MOZ_ASSERT_UNREACHABLE("Unexpected transaction type");
}
}

View file

@ -679,7 +679,7 @@ txEXSLTFunctionCall::evaluate(txIEvalContext *aContext,
}
}
NS_NOTREACHED("Missing return?");
MOZ_ASSERT_UNREACHABLE("Missing return?");
return NS_ERROR_UNEXPECTED;
}
@ -794,7 +794,7 @@ txEXSLTRegExFunctionCall::evaluate(txIEvalContext* aContext,
}
}
NS_NOTREACHED("Missing return?");
MOZ_ASSERT_UNREACHABLE("Missing return?");
return NS_ERROR_UNEXPECTED;
}

View file

@ -112,7 +112,7 @@ _class::getSubExprAt(uint32_t aPos) \
void \
_class::setSubExprAt(uint32_t aPos, Expr* aExpr) \
{ \
NS_NOTREACHED("setting bad subexpression index"); \
MOZ_ASSERT_UNREACHABLE("setting bad subexpression index");\
}
#define TX_IMPL_PATTERN_STUBS_NO_SUB_PATTERN(_class) \
@ -124,7 +124,7 @@ _class::getSubPatternAt(uint32_t aPos) \
void \
_class::setSubPatternAt(uint32_t aPos, txPattern* aPattern) \
{ \
NS_NOTREACHED("setting bad subexpression index"); \
MOZ_ASSERT_UNREACHABLE("setting bad subexpression index");\
}
class txUnionPattern : public txPattern

View file

@ -295,14 +295,14 @@ NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED(XULDocument,
void
XULDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
{
NS_NOTREACHED("Reset");
MOZ_ASSERT_UNREACHABLE("Reset");
}
void
XULDocument::ResetToURI(nsIURI* aURI, nsILoadGroup* aLoadGroup,
nsIPrincipal* aPrincipal)
{
NS_NOTREACHED("ResetToURI");
MOZ_ASSERT_UNREACHABLE("ResetToURI");
}
void
@ -2564,7 +2564,7 @@ XULDocument::ResumeWalk()
break;
default:
NS_NOTREACHED("Unexpected nsXULPrototypeNode::Type value");
MOZ_ASSERT_UNREACHABLE("Unexpected nsXULPrototypeNode::Type");
}
}
@ -3893,7 +3893,7 @@ XULDocument::CachedChromeStreamListener::OnDataAvailable(nsIRequest *request,
uint64_t aSourceOffset,
uint32_t aCount)
{
NS_NOTREACHED("CachedChromeStream doesn't receive data");
MOZ_ASSERT_UNREACHABLE("CachedChromeStream doesn't receive data");
return NS_ERROR_UNEXPECTED;
}

Some files were not shown because too many files have changed in this diff Show more