Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj

This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris Peterson 2019-12-20 07:16:43 +00:00
Родитель 30bcdf563d
Коммит 406763af7f
136 изменённых файлов: 283 добавлений и 302 удалений

Просмотреть файл

@ -10136,7 +10136,7 @@ nsresult nsDocShell::DoChannelLoad(nsIChannel* aChannel,
case LOAD_RELOAD_CHARSET_CHANGE_BYPASS_CACHE:
loadFlags |=
nsIRequest::LOAD_BYPASS_CACHE | nsIRequest::LOAD_FRESH_CONNECTION;
MOZ_FALLTHROUGH;
[[fallthrough]];
case LOAD_RELOAD_CHARSET_CHANGE: {
// Use SetAllowStaleCacheContent (not LOAD_FROM_CACHE flag) since we

Просмотреть файл

@ -9247,7 +9247,7 @@ nsINode* Document::AdoptNode(nsINode& aAdoptedNode, ErrorResult& rv) {
rv.Throw(NS_ERROR_DOM_HIERARCHY_REQUEST_ERR);
return nullptr;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case ELEMENT_NODE:
case PROCESSING_INSTRUCTION_NODE:
@ -9583,7 +9583,7 @@ nsViewportInfo Document::GetViewportInfo(const ScreenIntSize& aDisplaySize) {
mWidthStrEmpty = metaData.mWidth.IsEmpty();
mViewportType = hasValidContents ? Specified : NoValidContent;
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case Specified:
case NoValidContent:

Просмотреть файл

@ -2805,7 +2805,7 @@ void Element::GetEventTargetParentForLinks(EventChainPreVisitor& aVisitor) {
// Set the status bar similarly for mouseover and focus
case eMouseOver:
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eFocus: {
InternalFocusEvent* focusEvent = aVisitor.mEvent->AsFocusEvent();
if (!focusEvent || !focusEvent->mIsRefocus) {
@ -2820,7 +2820,7 @@ void Element::GetEventTargetParentForLinks(EventChainPreVisitor& aVisitor) {
}
case eMouseOut:
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eBlur: {
nsresult rv = LeaveLink(aVisitor.mPresContext);
if (NS_SUCCEEDED(rv)) {

Просмотреть файл

@ -1882,7 +1882,7 @@ static bool CCRunnerFired(TimeStamp aDeadline) {
MOZ_ASSERT(!didDoWork);
sCCRunnerState = CCRunnerState::LateTimer;
MOZ_FALLTHROUGH;
[[fallthrough]];
case CCRunnerState::LateTimer:
if (!ShouldTriggerCC(suspected)) {

Просмотреть файл

@ -1399,7 +1399,7 @@ bool nsXMLContentSerializer::AppendFormatedWrapped_WhitespaceSequence(
case ' ':
case '\t':
sawBlankOrTab = true;
MOZ_FALLTHROUGH;
[[fallthrough]];
case '\n':
++aPos;
// do not increase mColPos,

Просмотреть файл

@ -8338,7 +8338,7 @@ class CGCase(CGList):
self.append(CGGeneric("case " + expression + ": {\n"))
bodyList = CGList([body])
if fallThrough:
bodyList.append(CGGeneric("MOZ_FALLTHROUGH;\n"))
bodyList.append(CGGeneric("[[fallthrough]];\n"))
else:
bodyList.append(CGGeneric("break;\n"))
self.append(CGIndenter(bodyList))

Просмотреть файл

@ -118,7 +118,7 @@ JS::Value WebGL2Context::GetParameter(JSContext* cx, GLenum pname,
return JS::NumberValue(UINT32_MAX);
/*** fall through to fGetInteger64v ***/
MOZ_FALLTHROUGH;
[[fallthrough]];
case LOCAL_GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:
case LOCAL_GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:

Просмотреть файл

@ -896,7 +896,7 @@ JS::Value WebGLContext::GetRenderbufferParameter(GLenum target, GLenum pname) {
switch (pname) {
case LOCAL_GL_RENDERBUFFER_SAMPLES:
if (!IsWebGL2()) break;
MOZ_FALLTHROUGH;
[[fallthrough]];
case LOCAL_GL_RENDERBUFFER_WIDTH:
case LOCAL_GL_RENDERBUFFER_HEIGHT:

Просмотреть файл

@ -141,7 +141,7 @@ void WebGLQuery::GetQueryParameter(GLenum pname,
gl->fGetQueryObjectui64v(mGLName, pname, &val);
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
gl->fGetQueryObjectuiv(mGLName, LOCAL_GL_QUERY_RESULT, (GLuint*)&val);

Просмотреть файл

@ -599,7 +599,7 @@ nsresult EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
StopTrackingDragGesture(true);
sNormalLMouseEventInProcess = false;
// then fall through...
MOZ_FALLTHROUGH;
[[fallthrough]];
case MouseButton::eRight:
case MouseButton::eMiddle:
RefPtr<EventStateManager> esm =
@ -654,7 +654,7 @@ nsresult EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
aEvent->mMessage = eVoidEvent;
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case eMouseMove:
case ePointerDown:
if (aEvent->mMessage == ePointerDown) {
@ -663,7 +663,7 @@ nsresult EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
NotifyTargetUserActivation(aEvent, aTargetContent);
}
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case ePointerMove: {
// on the Mac, GenerateDragGesture() may not return until the drag
// has completed and so |aTargetFrame| may have been deleted (moving
@ -739,12 +739,12 @@ nsresult EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
}
}
// then fall through...
MOZ_FALLTHROUGH;
[[fallthrough]];
case eKeyDown:
if (aEvent->mMessage == eKeyDown) {
NotifyTargetUserActivation(aEvent, aTargetContent);
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case eKeyUp: {
nsIContent* content = GetFocusedContent();
if (content) mCurrentTargetContent = content;

Просмотреть файл

@ -3887,7 +3887,7 @@ nsresult HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
break; // If we are submitting, do not send click event
}
// else fall through and treat Space like click...
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case NS_FORM_INPUT_BUTTON:
case NS_FORM_INPUT_RESET:
@ -3909,7 +3909,7 @@ nsresult HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {
case NS_VK_UP:
case NS_VK_LEFT:
isMovingBack = true;
MOZ_FALLTHROUGH;
[[fallthrough]];
case NS_VK_DOWN:
case NS_VK_RIGHT:
// Arrow key pressed, focus+select prev/next radio button

Просмотреть файл

@ -280,11 +280,11 @@ uint32_t AudioConfig::SampleSize(AudioConfig::SampleFormat aFormat) {
case FORMAT_S16:
return 2;
case FORMAT_S24:
MOZ_FALLTHROUGH;
[[fallthrough]];
case FORMAT_S24LSB:
MOZ_FALLTHROUGH;
[[fallthrough]];
case FORMAT_S32:
MOZ_FALLTHROUGH;
[[fallthrough]];
case FORMAT_FLT:
return 4;
case FORMAT_NONE:
@ -301,15 +301,15 @@ uint32_t AudioConfig::FormatToBits(AudioConfig::SampleFormat aFormat) {
case FORMAT_S16:
return 16;
case FORMAT_S24LSB:
MOZ_FALLTHROUGH;
[[fallthrough]];
case FORMAT_S24:
return 24;
case FORMAT_S32:
MOZ_FALLTHROUGH;
[[fallthrough]];
case FORMAT_FLT:
return 32;
case FORMAT_NONE:
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
return 0;
}

Просмотреть файл

@ -2405,7 +2405,7 @@ RefPtr<MediaManager::StreamPromise> MediaManager::GetUserMedia(
nsPIDOMWindowOuter* outer = aWindow->GetOuterWindow();
vc.mBrowserWindow.Construct(outer->WindowID());
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case MediaSourceEnum::Screen:
case MediaSourceEnum::Window:
// Deny screensharing request if support is disabled, or

Просмотреть файл

@ -37,7 +37,7 @@ nsresult Muxer::SetMetadata(
mAudioCodecDelay = static_cast<uint64_t>(
LittleEndian::readUint16(opusMeta->mIdHeader.Elements() + 10) *
PR_USEC_PER_SEC / 48000);
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case TrackMetadataBase::METADATA_VORBIS:
case TrackMetadataBase::METADATA_AAC:

Просмотреть файл

@ -748,14 +748,14 @@ mozilla::ipc::IPCResult ChromiumCDMChild::RecvDecryptAndDecodeFrame(
Unused << SendDecodeFailed(cdm::kDecodeError);
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case cdm::kSuccess:
if (frame.FrameBuffer()) {
ReturnOutput(frame);
break;
}
// CDM didn't set a frame buffer on the sample, report it as an error.
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
Unused << SendDecodeFailed(rv);
break;

Просмотреть файл

@ -392,7 +392,7 @@ already_AddRefed<MediaRawData> MP4TrackDemuxer::GetNextSample() {
H264::FrameType type = H264::GetFrameType(sample);
switch (type) {
case H264::FrameType::I_FRAME:
MOZ_FALLTHROUGH;
[[fallthrough]];
case H264::FrameType::OTHER: {
bool keyframe = type == H264::FrameType::I_FRAME;
if (sample->mKeyframe != keyframe) {

Просмотреть файл

@ -373,12 +373,12 @@ RefPtr<MediaDataEncoder::EncodePromise> AndroidDataEncoder::ProcessDrain() {
mInputBufferInfo->Set(0, 0, -1, MediaCodec::BUFFER_FLAG_END_OF_STREAM);
mJavaEncoder->Input(nullptr, mInputBufferInfo, nullptr);
mDrainState = DrainState::DRAINING;
MOZ_FALLTHROUGH;
[[fallthrough]];
case DrainState::DRAINING:
if (mEncodedData.IsEmpty()) {
return mDrainPromise.Ensure(__func__); // Pending promise.
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case DrainState::DRAINED:
if (mEncodedData.Length() > 0) {
EncodedData pending;

Просмотреть файл

@ -518,13 +518,13 @@ CVPixelBufferRef AppleVTEncoder::CreateCVPixelBuffer(const Image* aSource) {
widths[2] = yuv->mCbCrSize.width;
heights[2] = yuv->mCbCrSize.height;
strides[2] = yuv->mCbCrStride;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 2:
addresses[1] = yuv->mCbChannel;
widths[1] = yuv->mCbCrSize.width;
heights[1] = yuv->mCbCrSize.height;
strides[1] = yuv->mCbCrStride;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 1:
addresses[0] = yuv->mYChannel;
widths[0] = yuv->mYSize.width;

Просмотреть файл

@ -693,7 +693,7 @@ void WebAudioDecodeJob::OnFailure(ErrorCode aErrorCode) {
// Fall through to get some sort of a sane error message if this actually
// happens at runtime.
case UnknownError:
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
errorMessage = "MediaDecodeAudioDataUnknownError";
break;

Просмотреть файл

@ -146,7 +146,7 @@ bool WebMBufferedParser::Append(const unsigned char* aBuffer, uint32_t aLength,
mLastInitStartOffset =
mCurrentOffset + (p - aBuffer) -
(mElement.mID.mLength + mElement.mSize.mLength);
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
mSkipBytes = mElement.mSize.mValue;
mState = SKIP_DATA;

Просмотреть файл

@ -1492,7 +1492,7 @@ NPError _getvalue(NPP npp, NPNVariable variable, void* result) {
// old XPCOM objects, no longer supported, but null out the out
// param to avoid crashing plugins that still try to use this.
*(nsISupports**)result = nullptr;
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL,

Просмотреть файл

@ -108,7 +108,7 @@ bool TypeTo_impl(Client::Type aType, T& aData) {
ClientTypeTraits<Client::Type::LS>::To(aData);
return true;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case Client::TYPE_MAX:
default:

Просмотреть файл

@ -175,7 +175,7 @@ bool ParseClockValue(RangedPtr<const char16_t>& aIter,
!ParseColon(iter, aEnd)) {
return false;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case PARTIAL_CLOCK_VALUE:
if (!ParseSecondsOrMinutes(iter, aEnd, minutes) ||
!ParseColon(iter, aEnd) ||

Просмотреть файл

@ -360,7 +360,7 @@ nsresult StorageDBThread::InsertDBOp(StorageDBThread::DBOperation* aOperation) {
aOperation->Finalize(NS_OK);
return NS_OK;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case DBOperation::opGetUsage:
if (aOperation->Type() == DBOperation::opPreloadUrgent) {

Просмотреть файл

@ -419,7 +419,7 @@ nsresult Update(mozIStorageConnection* aWorkerConnection) {
rv = aWorkerConnection->SetSchemaVersion(1);
NS_ENSURE_SUCCESS(rv, rv);
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case 1: {
nsCOMPtr<mozIStorageFunction> oaStripAddonId(new StripOriginAddonId());
@ -438,7 +438,7 @@ nsresult Update(mozIStorageConnection* aWorkerConnection) {
rv = aWorkerConnection->SetSchemaVersion(2);
NS_ENSURE_SUCCESS(rv, rv);
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case CURRENT_SCHEMA_VERSION:
// Ensure the tables and indexes are up. This is mostly a no-op

Просмотреть файл

@ -328,7 +328,7 @@ static void ConvertPathSegmentData(SVGPathDataAndInfo::const_iterator& aStart,
aResult[5] = aStart[5];
aResult[6] = aStart[6];
AdjustSegmentForRelativeness(adjustmentType, aResult + 5, aState);
MOZ_FALLTHROUGH;
[[fallthrough]];
case PATHSEG_CURVETO_QUADRATIC_ABS:
case PATHSEG_CURVETO_QUADRATIC_REL:
case PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
@ -336,7 +336,7 @@ static void ConvertPathSegmentData(SVGPathDataAndInfo::const_iterator& aStart,
aResult[3] = aStart[3];
aResult[4] = aStart[4];
AdjustSegmentForRelativeness(adjustmentType, aResult + 3, aState);
MOZ_FALLTHROUGH;
[[fallthrough]];
case PATHSEG_MOVETO_ABS:
case PATHSEG_MOVETO_REL:
case PATHSEG_LINETO_ABS:

Просмотреть файл

@ -133,7 +133,7 @@ bool SVGTransformListParser::ParseTranslate() {
switch (count) {
case 1:
t[1] = 0.f;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 2: {
SVGTransform* transform = mTransforms.AppendElement(fallible);
if (!transform) {
@ -158,7 +158,7 @@ bool SVGTransformListParser::ParseScale() {
switch (count) {
case 1:
s[1] = s[0];
MOZ_FALLTHROUGH;
[[fallthrough]];
case 2: {
SVGTransform* transform = mTransforms.AppendElement(fallible);
if (!transform) {
@ -183,7 +183,7 @@ bool SVGTransformListParser::ParseRotate() {
switch (count) {
case 1:
r[1] = r[2] = 0.f;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 3: {
SVGTransform* transform = mTransforms.AppendElement(fallible);
if (!transform) {

Просмотреть файл

@ -234,7 +234,7 @@ class GpsdLocationProvider::PollRunnable final : public Runnable {
if (!IsNaN(gpsData.fix.altitude)) {
alt = gpsData.fix.altitude;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case MODE_2D:
if (!IsNaN(gpsData.fix.latitude)) {
lat = gpsData.fix.latitude;
@ -284,13 +284,13 @@ class GpsdLocationProvider::PollRunnable final : public Runnable {
static int ErrnoToError(int aErrno) {
switch (aErrno) {
case EACCES:
MOZ_FALLTHROUGH;
[[fallthrough]];
case EPERM:
MOZ_FALLTHROUGH;
[[fallthrough]];
case EROFS:
return GeolocationPositionError_Binding::PERMISSION_DENIED;
case ETIME:
MOZ_FALLTHROUGH;
[[fallthrough]];
case ETIMEDOUT:
return GeolocationPositionError_Binding::TIMEOUT;
default:

Просмотреть файл

@ -40,7 +40,7 @@ nsresult LocationStep::evaluate(txIEvalContext* aContext,
if (!walker.moveToParent()) {
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case ANCESTOR_OR_SELF_AXIS: {
nodes->setReverse();
@ -66,7 +66,7 @@ nsresult LocationStep::evaluate(txIEvalContext* aContext,
case DESCENDANT_OR_SELF_AXIS: {
rv = appendIfMatching(walker, aContext, nodes);
NS_ENSURE_SUCCESS(rv, rv);
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case DESCENDANT_AXIS: {
rv = appendMatchingDescendants(walker, aContext, nodes);

Просмотреть файл

@ -64,7 +64,7 @@ void txOutputFormat::setFromDefaults() {
switch (mMethod) {
case eMethodNotSet: {
mMethod = eXMLOutput;
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case eXMLOutput: {
if (mVersion.IsEmpty()) mVersion.AppendLiteral("1.0");

Просмотреть файл

@ -402,7 +402,7 @@ EditorEventListener::HandleEvent(Event* aEvent) {
if (widgetMouseEvent->mButton != MouseButton::eLeft) {
return NS_OK;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
}
// auxclick
case eMouseAuxClick: {

Просмотреть файл

@ -1111,7 +1111,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
// TODO: we want to make default version as version 2 in order to fix bug
// 784875.
@ -1131,7 +1131,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
// Version 3->4 is the creation of the modificationTime field.
case 3: {
@ -1148,7 +1148,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
// In version 5, host appId, and isInBrowserElement were merged into a
// single origin entry
@ -1241,7 +1241,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
// At this point, the version 5 table has been migrated to a version 6
// table We are guaranteed to have at least one of moz_hosts and
@ -1414,7 +1414,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
// The version 7-8 migration is the re-migration of localhost and
// ip-address entries due to errors in the previous version 7 migration
@ -1507,7 +1507,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
// The version 8-9 migration removes the unnecessary backup moz-hosts
// database contents. as the data no longer needs to be migrated
@ -1536,7 +1536,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
case 9: {
rv = mDBConn->SetSchemaVersion(10);
@ -1544,7 +1544,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
case 10: {
// Filter out the rows with storage access API permissions with a
@ -1563,7 +1563,7 @@ nsresult nsPermissionManager::InitDB(bool aRemoveFile) {
}
// fall through to the next upgrade
MOZ_FALLTHROUGH;
[[fallthrough]];
// current version.
case HOSTS_SCHEMA_VERSION:

Просмотреть файл

@ -1341,7 +1341,7 @@ nsEventStatus AsyncPanZoomController::OnTouchStart(
MOZ_ASSERT(GetCurrentTouchBlock());
GetCurrentTouchBlock()->GetOverscrollHandoffChain()->CancelAnimations(
ExcludeOverscroll);
MOZ_FALLTHROUGH;
[[fallthrough]];
case SCROLLBAR_DRAG:
case NOTHING: {
ParentLayerPoint point = GetFirstTouchPoint(aEvent);
@ -1461,7 +1461,7 @@ nsEventStatus AsyncPanZoomController::OnTouchEnd(
case FLING:
// Should never happen.
NS_WARNING("Received impossible touch end in OnTouchEnd.");
MOZ_FALLTHROUGH;
[[fallthrough]];
case ANIMATING_ZOOM:
case SMOOTH_SCROLL:
case NOTHING:

Просмотреть файл

@ -538,7 +538,7 @@ void GestureEventListener::HandleInputTimeoutLongTap() {
// just in case MaxTapTime > ContextMenuDelay cancel MaxTap timer
// and fall through
CancelMaxTapTimeoutTask();
MOZ_FALLTHROUGH;
[[fallthrough]];
case GESTURE_FIRST_SINGLE_TOUCH_MAX_TAP_DOWN: {
SetState(GESTURE_LONG_TOUCH_DOWN);
mAsyncPanZoomController->HandleGestureEvent(

Просмотреть файл

@ -365,10 +365,10 @@ void APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
mTouchEndCancelled = true;
mEndTouchIsClick = false;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case eTouchCancel:
mActiveElementManager->HandleTouchEndEvent(mEndTouchIsClick);
MOZ_FALLTHROUGH;
[[fallthrough]];
case eTouchMove: {
if (mPendingTouchPreventedResponse) {
MOZ_ASSERT(aGuid == mPendingTouchPreventedGuid);

Просмотреть файл

@ -483,7 +483,7 @@ void gfxFontShaper::MergeFontFeatures(
case NS_FONT_VARIANT_CAPS_ALLSMALL:
mergedFeatures.Put(HB_TAG('c', '2', 's', 'c'), 1);
// fall through to the small-caps case
MOZ_FALLTHROUGH;
[[fallthrough]];
case NS_FONT_VARIANT_CAPS_SMALLCAPS:
mergedFeatures.Put(HB_TAG('s', 'm', 'c', 'p'), 1);
@ -494,7 +494,7 @@ void gfxFontShaper::MergeFontFeatures(
: HB_TAG('c', '2', 'p', 'c'),
1);
// fall through to the petite-caps case
MOZ_FALLTHROUGH;
[[fallthrough]];
case NS_FONT_VARIANT_CAPS_PETITECAPS:
mergedFeatures.Put(aAddSmallCaps ? HB_TAG('s', 'm', 'c', 'p')
@ -3272,7 +3272,7 @@ bool gfxFont::InitFakeSmallCapsRun(DrawTarget* aDrawTarget,
case kUppercaseReduce:
// use reduced-size font, then fall through to uppercase the text
f = smallCapsFont;
MOZ_FALLTHROUGH;
[[fallthrough]];
case kUppercase:
// apply uppercase transform to the string

Просмотреть файл

@ -1885,7 +1885,7 @@ void gfxFontGroup::FamilyFace::CheckState(bool& aSkipDrawing) {
case gfxUserFontEntry::STATUS_FAILED:
SetInvalid();
// fall-thru to the default case
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
SetLoading(false);
}

Просмотреть файл

@ -199,27 +199,27 @@ bool VRPuppetCommandBuffer::RunCommand(uint64_t aCommand, double aDeltaTime) {
case VRPuppet_Command::VRPuppet_Data7:
WriteData((aCommand & 0x00ff000000000000) >> 48);
MOZ_FALLTHROUGH;
[[fallthrough]];
// Purposefully, no break
case VRPuppet_Command::VRPuppet_Data6:
WriteData((aCommand & 0x0000ff0000000000) >> 40);
MOZ_FALLTHROUGH;
[[fallthrough]];
// Purposefully, no break
case VRPuppet_Command::VRPuppet_Data5:
WriteData((aCommand & 0x000000ff00000000) >> 32);
MOZ_FALLTHROUGH;
[[fallthrough]];
// Purposefully, no break
case VRPuppet_Command::VRPuppet_Data4:
WriteData((aCommand & 0x00000000ff000000) >> 24);
MOZ_FALLTHROUGH;
[[fallthrough]];
// Purposefully, no break
case VRPuppet_Command::VRPuppet_Data3:
WriteData((aCommand & 0x0000000000ff0000) >> 16);
MOZ_FALLTHROUGH;
[[fallthrough]];
// Purposefully, no break
case VRPuppet_Command::VRPuppet_Data2:
WriteData((aCommand & 0x000000000000ff00) >> 8);
MOZ_FALLTHROUGH;
[[fallthrough]];
// Purposefully, no break
case VRPuppet_Command::VRPuppet_Data1:
WriteData(aCommand & 0x00000000000000ff);

Просмотреть файл

@ -424,7 +424,7 @@ void UPowerClient::UpdateSavedInfo(GHashTable* aHashTable) {
break;
case eState_FullyCharged:
isFull = true;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eState_Charging:
case eState_PendingCharge:
mCharging = true;

Просмотреть файл

@ -296,7 +296,7 @@ bool AnimationSurfaceProvider::CheckForNewFrameAtYield() {
switch (status) {
case AnimationFrameBuffer::InsertStatus::DISCARD_CONTINUE:
continueDecoding = true;
MOZ_FALLTHROUGH;
[[fallthrough]];
case AnimationFrameBuffer::InsertStatus::DISCARD_YIELD:
RequestFrameDiscarding();
break;

Просмотреть файл

@ -387,7 +387,7 @@ LexerTransition<nsJPEGDecoder::State> nsJPEGDecoder::ReadJPEGData(
mInfo.image_width, mInfo.image_height));
mState = JPEG_START_DECOMPRESS;
MOZ_FALLTHROUGH; // to start decompressing.
[[fallthrough]]; // to start decompressing.
}
case JPEG_START_DECOMPRESS: {
@ -416,7 +416,7 @@ LexerTransition<nsJPEGDecoder::State> nsJPEGDecoder::ReadJPEGData(
// If this is a progressive JPEG ...
mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE
: JPEG_DECOMPRESS_SEQUENTIAL;
MOZ_FALLTHROUGH; // to decompress sequential JPEG.
[[fallthrough]]; // to decompress sequential JPEG.
}
case JPEG_DECOMPRESS_SEQUENTIAL: {
@ -444,7 +444,7 @@ LexerTransition<nsJPEGDecoder::State> nsJPEGDecoder::ReadJPEGData(
return Transition::TerminateFailure();
}
}
MOZ_FALLTHROUGH; // to decompress progressive JPEG.
[[fallthrough]]; // to decompress progressive JPEG.
}
case JPEG_DECOMPRESS_PROGRESSIVE: {
@ -521,7 +521,7 @@ LexerTransition<nsJPEGDecoder::State> nsJPEGDecoder::ReadJPEGData(
}
}
}
MOZ_FALLTHROUGH; // to finish decompressing.
[[fallthrough]]; // to finish decompressing.
}
case JPEG_DONE: {

Просмотреть файл

@ -248,7 +248,7 @@ uint32_t GreekCasing::UpperCase(uint32_t aCh, GreekCasing::State& aState,
return GREEK_UPPER_ETA_TONOS; // treat as disjunctive eta for now
}
// if not in initial state, fall through to strip the accent
MOZ_FALLTHROUGH;
[[fallthrough]];
case GREEK_LOWER_ETA_OXIA:
case GREEK_UPPER_ETA_OXIA:

Просмотреть файл

@ -2307,7 +2307,7 @@ bool ASTSerializer::statement(ParseNode* pn, MutableHandleValue dst) {
if (!pn->isKind(ParseNodeKind::StatementList)) {
return statement(pn, dst);
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case ParseNodeKind::StatementList:
return blockStatement(&pn->as<ListNode>(), dst);

Просмотреть файл

@ -1802,25 +1802,25 @@ static const TextChar* FirstCharMatcherUnrolled(const TextChar* text,
switch ((textend - t) & 7) {
case 0:
if (*t++ == pat) return t - 1;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 7:
if (*t++ == pat) return t - 1;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 6:
if (*t++ == pat) return t - 1;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 5:
if (*t++ == pat) return t - 1;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 4:
if (*t++ == pat) return t - 1;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 3:
if (*t++ == pat) return t - 1;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 2:
if (*t++ == pat) return t - 1;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 1:
if (*t++ == pat) return t - 1;
}

Просмотреть файл

@ -1233,7 +1233,7 @@ restart:
// Any subexpression of a comma expression could be effectful.
case ParseNodeKind::CommaExpr:
MOZ_ASSERT(!pn->as<ListNode>().empty());
MOZ_FALLTHROUGH;
[[fallthrough]];
// Subcomponents of a literal may be effectful.
case ParseNodeKind::ArrayExpr:
case ParseNodeKind::ObjectExpr:
@ -9573,7 +9573,7 @@ bool BytecodeEmitter::emitTree(
if (!markStepBreakpoint()) {
return false;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case ParseNodeKind::VoidExpr:
case ParseNodeKind::NotExpr:
case ParseNodeKind::BitNotExpr:

Просмотреть файл

@ -199,7 +199,7 @@ class NameResolver : public ParseNodeVisitor<NameResolver> {
// Record the ParseNodeKind::PropertyDefinition/Shorthand but skip the
// ParseNodeKind::Object so we're not flagged as a contributor.
pos--;
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
// Save any other nodes we encounter on the way up.

Просмотреть файл

@ -794,13 +794,13 @@ bool GeneralParser<ParseHandler, Unit>::noteDeclaredName(
return false;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case DeclarationKind::Import:
// Module code is always strict, so 'let' is always a keyword and never a
// name.
MOZ_ASSERT(name != cx_->names().let);
MOZ_FALLTHROUGH;
[[fallthrough]];
case DeclarationKind::SimpleCatchParameter:
case DeclarationKind::CatchParameter: {
@ -6515,7 +6515,7 @@ GeneralParser<ParseHandler, Unit>::yieldExpression(InHandling inHandling) {
case TokenKind::Mul:
kind = ParseNodeKind::YieldStarExpr;
tokenStream.consumeKnownToken(TokenKind::Mul, TokenStream::SlashIsRegExp);
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
exprNode = assignExpr(inHandling, YieldIsKeyword, TripledotProhibited);
if (!exprNode) {
@ -8983,7 +8983,7 @@ typename ParseHandler::Node GeneralParser<ParseHandler, Unit>::unaryExpr(
}
}
MOZ_FALLTHROUGH;
[[fallthrough]];
default: {
Node expr =

Просмотреть файл

@ -3423,7 +3423,7 @@ bool TokenStreamSpecific<Unit, AnyCharsAccess>::getStringOrTemplateToken(
case '\r':
matchLineTerminator('\n');
MOZ_FALLTHROUGH;
[[fallthrough]];
case '\n': {
// LineContinuation represents no code points. We're manually
// consuming a LineTerminatorSequence, so we must manually

Просмотреть файл

@ -6461,7 +6461,7 @@ void GCRuntime::incrementalSlice(SliceBudget& budget,
incrementalState = State::MarkRoots;
MOZ_FALLTHROUGH;
[[fallthrough]];
case State::MarkRoots:
if (!beginMarkPhase(reason, session)) {
@ -6484,7 +6484,7 @@ void GCRuntime::incrementalSlice(SliceBudget& budget,
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case State::Mark:
AutoGCRooter::traceAllWrappers(rt->mainContextFromOwnThread(), &marker);
@ -6528,7 +6528,7 @@ void GCRuntime::incrementalSlice(SliceBudget& budget,
lastMarkSlice = false;
beginSweepPhase(reason, session);
MOZ_FALLTHROUGH;
[[fallthrough]];
case State::Sweep:
MOZ_ASSERT(nursery().isEmpty());
@ -6544,7 +6544,7 @@ void GCRuntime::incrementalSlice(SliceBudget& budget,
incrementalState = State::Finalize;
MOZ_FALLTHROUGH;
[[fallthrough]];
case State::Finalize: {
gcstats::AutoPhase ap(stats(),
@ -6578,7 +6578,7 @@ void GCRuntime::incrementalSlice(SliceBudget& budget,
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case State::Compact:
if (isCompacting) {
@ -6598,7 +6598,7 @@ void GCRuntime::incrementalSlice(SliceBudget& budget,
startDecommit();
incrementalState = State::Decommit;
MOZ_FALLTHROUGH;
[[fallthrough]];
case State::Decommit: {
gcstats::AutoPhase ap(stats(),
@ -6613,7 +6613,7 @@ void GCRuntime::incrementalSlice(SliceBudget& budget,
incrementalState = State::Finish;
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case State::Finish:

Просмотреть файл

@ -3835,7 +3835,7 @@ EmitAtomMulti(RegExpCompiler* compiler,
}
case 4:
macro_assembler->CheckCharacter(chars[3], &ok);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 3:
macro_assembler->CheckCharacter(chars[0], &ok);
macro_assembler->CheckCharacter(chars[1], &ok);

Просмотреть файл

@ -644,7 +644,7 @@ RegExpParser<CharT>::ParseClassCharacterEscape(widechar* code)
*code = 0;
return true;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case '1': case '2': case '3': case '4': case '5': case '6': case '7':
if (unicode_) {
ReportError(JSMSG_INVALID_IDENTITY_ESCAPE);
@ -1682,7 +1682,7 @@ RegExpParser<CharT>::ParseDisjunction()
Advance();
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case 'd': case 's': case 'w': {
widechar c = Next();
Advance(2);
@ -1724,7 +1724,7 @@ RegExpParser<CharT>::ParseDisjunction()
Advance(2);
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case '0': {
if (unicode_) {
@ -1854,7 +1854,7 @@ RegExpParser<CharT>::ParseDisjunction()
int dummy;
if (ParseIntervalQuantifier(&dummy, &dummy))
return ReportError(JSMSG_NOTHING_TO_REPEAT);
MOZ_FALLTHROUGH;
[[fallthrough]];
}
default:
if (unicode_) {

Просмотреть файл

@ -2050,7 +2050,7 @@ bool jit::FinishBailoutToBaseline(BaselineBailoutInfo* bailoutInfoArg) {
// Invalid assumption based on baseline code.
case Bailout_OverflowInvalidate:
outerScript->setHadOverflowBailout();
MOZ_FALLTHROUGH;
[[fallthrough]];
case Bailout_DoubleOutput:
case Bailout_ObjectIdentityOrTypeGuard:
HandleBaselineInfoBailout(cx, outerScript, innerScript);

Просмотреть файл

@ -1641,7 +1641,7 @@ AttachDecision GetPropIRGenerator::tryAttachProxy(HandleObject obj,
break;
case ProxyStubType::DOMExpando:
TRY_ATTACH(tryAttachDOMProxyExpando(obj, objId, id));
MOZ_FALLTHROUGH; // Fall through to the generic shadowed case.
[[fallthrough]]; // Fall through to the generic shadowed case.
case ProxyStubType::DOMShadowed:
return tryAttachDOMProxyShadowed(obj, objId, id);
case ProxyStubType::DOMUnshadowed:
@ -4210,7 +4210,7 @@ AttachDecision SetPropIRGenerator::tryAttachProxy(HandleObject obj,
break;
case ProxyStubType::DOMExpando:
TRY_ATTACH(tryAttachDOMProxyExpando(obj, objId, id, rhsId));
MOZ_FALLTHROUGH; // Fall through to the generic shadowed case.
[[fallthrough]]; // Fall through to the generic shadowed case.
case ProxyStubType::DOMShadowed:
return tryAttachDOMProxyShadowed(obj, objId, id, rhsId);
case ProxyStubType::DOMUnshadowed:

Просмотреть файл

@ -1627,7 +1627,7 @@ class MOZ_RAII PoppedValueUseChecker {
if (current_->peek(-1) == popped_[0]) {
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
MOZ_ASSERT(popped_[i]->isImplicitlyUsed() ||
@ -2248,7 +2248,7 @@ AbortReasonOr<Ok> IonBuilder::inspectOpcode(JSOp op, bool* restarted) {
}
}
// Fall through to JSOP_BINDNAME
MOZ_FALLTHROUGH;
[[fallthrough]];
case JSOP_BINDNAME:
return jsop_bindname(info().getName(pc));
@ -2447,7 +2447,7 @@ AbortReasonOr<Ok> IonBuilder::inspectOpcode(JSOp op, bool* restarted) {
return Ok();
}
// Fallthrough to IMPLICITTHIS in non-syntactic scope case
MOZ_FALLTHROUGH;
[[fallthrough]];
case JSOP_IMPLICITTHIS: {
PropertyName* name = info().getAtom(pc)->asPropertyName();
return jsop_implicitthis(name);

Просмотреть файл

@ -1969,7 +1969,7 @@ void LIRGenerator::visitToDouble(MToDouble* convert) {
case MIRType::Boolean:
MOZ_ASSERT(conversion != MToFPInstruction::NumbersOnly);
MOZ_FALLTHROUGH;
[[fallthrough]];
case MIRType::Int32: {
LInt32ToDouble* lir =
@ -2022,7 +2022,7 @@ void LIRGenerator::visitToFloat32(MToFloat32* convert) {
case MIRType::Boolean:
MOZ_ASSERT(conversion != MToFPInstruction::NumbersOnly);
MOZ_FALLTHROUGH;
[[fallthrough]];
case MIRType::Int32: {
LInt32ToFloat32* lir =

Просмотреть файл

@ -3248,7 +3248,7 @@ IonBuilder::InliningResult IonBuilder::inlineIsTypedArrayHelper(
return InliningStatus_NotInlined;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case TemporaryTypeSet::ForAllResult::EMPTY:
result = false;

Просмотреть файл

@ -2555,7 +2555,7 @@ static inline bool CanProduceNegativeZero(MDefinition* def) {
def->toConstant()->toDouble() == -0.0) {
return true;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case MDefinition::Opcode::BitAnd:
case MDefinition::Opcode::BitOr:
case MDefinition::Opcode::BitXor:
@ -2641,7 +2641,7 @@ static inline bool NeedNegativeZeroCheck(MDefinition* def) {
return true;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case MDefinition::Opcode::StoreElement:
case MDefinition::Opcode::LoadElement:
@ -3587,7 +3587,7 @@ MDefinition* MTypeOf::foldsTo(TempAllocator& alloc) {
type = JSTYPE_OBJECT;
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
return this;
}

Просмотреть файл

@ -292,7 +292,7 @@ bool RangeAnalysis::addBetaNodes() {
continue;
}
// Otherwise fall through to handle JSOP_STRICTEQ the same as JSOP_EQ.
MOZ_FALLTHROUGH;
[[fallthrough]];
case JSOP_EQ:
comp.setDouble(bound, bound);
break;
@ -302,7 +302,7 @@ bool RangeAnalysis::addBetaNodes() {
continue;
}
// Otherwise fall through to handle JSOP_STRICTNE the same as JSOP_NE.
MOZ_FALLTHROUGH;
[[fallthrough]];
case JSOP_NE:
// Negative zero is not not-equal to zero.
if (bound == 0) {

Просмотреть файл

@ -1779,7 +1779,7 @@ void Decoder::DecodeSpecialCondition(Instruction* instr) {
}
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case 0xB:
if ((instr->Bits(22, 20) == 5) && (instr->Bits(15, 12) == 0xf)) {
int Rn = instr->Bits(19, 16);

Просмотреть файл

@ -44,7 +44,7 @@ void MoveEmitterMIPS::breakCycle(const MoveOperand& from, const MoveOperand& to,
break;
case MoveOp::INT32:
MOZ_ASSERT(sizeof(uintptr_t) == sizeof(int32_t));
MOZ_FALLTHROUGH;
[[fallthrough]];
case MoveOp::GENERAL:
if (to.isMemory()) {
Register temp = tempReg();
@ -95,7 +95,7 @@ void MoveEmitterMIPS::completeCycle(const MoveOperand& from,
break;
case MoveOp::INT32:
MOZ_ASSERT(sizeof(uintptr_t) == sizeof(int32_t));
MOZ_FALLTHROUGH;
[[fallthrough]];
case MoveOp::GENERAL:
MOZ_ASSERT(slotId == 0);
if (to.isMemory()) {

Просмотреть файл

@ -2617,7 +2617,7 @@ void Simulator::decodeTypeRegister(SimInstruction* instr) {
// Rounding modes are not yet supported.
MOZ_ASSERT((FCSR_ & 3) == 0);
// In rounding mode 0 it should behave like ROUND.
MOZ_FALLTHROUGH;
[[fallthrough]];
case ff_round_w_fmt: { // Round double to word (round half to
// even).
float rounded = std::floor(fs_value + 0.5);
@ -2767,7 +2767,7 @@ void Simulator::decodeTypeRegister(SimInstruction* instr) {
// Rounding modes are not yet supported.
MOZ_ASSERT((FCSR_ & 3) == 0);
// In rounding mode 0 it should behave like ROUND.
MOZ_FALLTHROUGH;
[[fallthrough]];
case ff_round_w_fmt: { // Round double to word (round half to
// even).
double rounded = std::floor(ds_value + 0.5);

Просмотреть файл

@ -727,7 +727,7 @@ bool JitRuntime::generateVMWrapper(JSContext* cx, MacroAssembler& masm,
case Type_Bool:
case Type_Int32:
MOZ_ASSERT(sizeof(uintptr_t) == sizeof(uint32_t));
MOZ_FALLTHROUGH;
[[fallthrough]];
case Type_Pointer:
outParamSize = sizeof(uintptr_t);
masm.reserveStack(outParamSize);
@ -845,7 +845,7 @@ bool JitRuntime::generateVMWrapper(JSContext* cx, MacroAssembler& masm,
case Type_Int32:
MOZ_ASSERT(sizeof(uintptr_t) == sizeof(uint32_t));
MOZ_FALLTHROUGH;
[[fallthrough]];
case Type_Pointer:
masm.load32(Address(StackPointer, 0), ReturnReg);
masm.freeStack(sizeof(uintptr_t));

Просмотреть файл

@ -2825,7 +2825,7 @@ void Simulator::decodeTypeRegister(SimInstruction* instr) {
break;
case rs_cfc1:
setRegister(rt_reg, alu_out);
MOZ_FALLTHROUGH;
[[fallthrough]];
case rs_mfc1:
setRegister(rt_reg, alu_out);
break;
@ -2918,7 +2918,7 @@ void Simulator::decodeTypeRegister(SimInstruction* instr) {
// Rounding modes are not yet supported.
MOZ_ASSERT((FCSR_ & 3) == 0);
// In rounding mode 0 it should behave like ROUND.
MOZ_FALLTHROUGH;
[[fallthrough]];
case ff_round_w_fmt: { // Round double to word (round half to
// even).
float rounded = std::floor(fs_value + 0.5);
@ -2967,7 +2967,7 @@ void Simulator::decodeTypeRegister(SimInstruction* instr) {
// Rounding modes are not yet supported.
MOZ_ASSERT((FCSR_ & 3) == 0);
// In rounding mode 0 it should behave like ROUND.
MOZ_FALLTHROUGH;
[[fallthrough]];
case ff_round_l_fmt: { // Mips64r2 instruction.
float rounded = fs_value > 0 ? std::floor(fs_value + 0.5)
: std::ceil(fs_value - 0.5);
@ -3091,7 +3091,7 @@ void Simulator::decodeTypeRegister(SimInstruction* instr) {
// Rounding modes are not yet supported.
MOZ_ASSERT((FCSR_ & 3) == 0);
// In rounding mode 0 it should behave like ROUND.
MOZ_FALLTHROUGH;
[[fallthrough]];
case ff_round_w_fmt: { // Round double to word (round half to
// even).
double rounded = std::floor(ds_value + 0.5);
@ -3145,7 +3145,7 @@ void Simulator::decodeTypeRegister(SimInstruction* instr) {
// Rounding modes are not yet supported.
MOZ_ASSERT((FCSR_ & 3) == 0);
// In rounding mode 0 it should behave like ROUND.
MOZ_FALLTHROUGH;
[[fallthrough]];
case ff_round_l_fmt: { // Mips64r2 instruction.
double rounded = ds_value > 0 ? std::floor(ds_value + 0.5)
: std::ceil(ds_value - 0.5);

Просмотреть файл

@ -40,7 +40,7 @@ class RegExpStack;
#define V8_WARN_UNUSED_RESULT MOZ_MUST_USE
#define V8_EXPORT_PRIVATE MOZ_EXPORT
#define V8_FALLTHROUGH MOZ_FALLTHROUGH
#define V8_FALLTHROUGH [[fallthrough]]
#define FATAL(x) MOZ_CRASH(x)
#define UNREACHABLE() MOZ_CRASH("unreachable code")

Просмотреть файл

@ -2045,7 +2045,7 @@ static bool ConvertTranscodeResultToJSException(JSContext* cx,
return true;
default:
MOZ_FALLTHROUGH;
[[fallthrough]];
case JS::TranscodeResult_Failure:
MOZ_ASSERT(!cx->isExceptionPending());
JS_ReportErrorASCII(cx, "generic warning");

Просмотреть файл

@ -138,7 +138,7 @@ char* js_dtostr(DtoaState* state, char* buffer, size_t bufferSize,
case DTOSTR_EXPONENTIAL:
MOZ_ASSERT(precision > 0);
minNDigits = precision;
MOZ_FALLTHROUGH;
[[fallthrough]];
case DTOSTR_STANDARD_EXPONENTIAL:
exponentialNotation = true;
break;

Просмотреть файл

@ -5733,10 +5733,10 @@ class BaseCompiler final : public BaseCompilerInterface {
switch (access.type()) {
case Scalar::Float64:
*temp3 = needI32();
MOZ_FALLTHROUGH;
[[fallthrough]];
case Scalar::Float32:
*temp2 = needI32();
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
*temp1 = needI32();
break;

Просмотреть файл

@ -721,7 +721,7 @@ class WasmTokenStream {
*ref = AstRef(token.index());
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
generateError(token, error);
return false;
@ -920,7 +920,7 @@ WasmToken WasmTokenStream::next() {
if (!IsWasmDigit(*cur_)) {
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case '0':
case '1':
case '2':

Просмотреть файл

@ -193,7 +193,7 @@ bool XPCConvert::NativeData2JS(JSContext* cx, MutableHandleValue d,
case nsXPTType::T_CHAR_STR: {
const char* p = *static_cast<const char* const*>(s);
arrlen = p ? strlen(p) : 0;
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case nsXPTType::T_PSTRING_SIZE_IS: {
const char* p = *static_cast<const char* const*>(s);
@ -224,7 +224,7 @@ bool XPCConvert::NativeData2JS(JSContext* cx, MutableHandleValue d,
case nsXPTType::T_WCHAR_STR: {
const char16_t* p = *static_cast<const char16_t* const*>(s);
arrlen = p ? nsCharTraits<char16_t>::length(p) : 0;
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case nsXPTType::T_PWSTRING_SIZE_IS: {
const char16_t* p = *static_cast<const char16_t* const*>(s);

Просмотреть файл

@ -873,7 +873,7 @@ static void ProcessArgsForCompartment(JSContext* cx, char** argv, int argc) {
break;
case 'S':
ContextOptionsRef(cx).toggleWerror();
MOZ_FALLTHROUGH; // because -S implies -s
[[fallthrough]]; // because -S implies -s
case 's':
ContextOptionsRef(cx).toggleExtraWarnings();
break;

Просмотреть файл

@ -7484,7 +7484,7 @@ Element* PresShell::EventHandler::ComputeFocusedEventTargetElement(
if (aGUIEvent->mMessage == eKeyUp) {
sLastKeyDownEventTargetElement = nullptr;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
return eventTargetElement;
}
@ -8007,7 +8007,7 @@ void PresShell::EventHandler::RecordEventPreparationPerformance(
case eMouseUp:
Telemetry::AccumulateTimeDelta(Telemetry::INPUT_EVENT_QUEUED_CLICK_MS,
aEvent->mTimeStamp);
MOZ_FALLTHROUGH;
[[fallthrough]];
case ePointerDown:
case ePointerUp:
GetPresContext()->RecordInteractionTime(

Просмотреть файл

@ -4430,7 +4430,7 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay& aDisplay,
SCROLLABLE_ABSPOS_CONTAINER_XUL_FCDATA(NS_NewBoxFrame);
return &data;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case StyleDisplayInside::Flex:
case StyleDisplayInside::WebkitBox: {

Просмотреть файл

@ -130,7 +130,7 @@ nscoord CSSAlignUtils::AlignJustifySelf(uint8_t aAlignment, LogicalAxis aAxis,
}
break;
case NS_STYLE_ALIGN_STRETCH:
MOZ_FALLTHROUGH; // ComputeSize() deals with it
[[fallthrough]]; // ComputeSize() deals with it
case NS_STYLE_ALIGN_START:
offset = marginStart;
break;

Просмотреть файл

@ -3223,7 +3223,7 @@ CrossAxisPositionTracker::CrossAxisPositionTracker(
"NYI: "
"align-items/align-self:left/right/self-start/self-end/baseline/"
"last baseline");
MOZ_FALLTHROUGH;
[[fallthrough]];
case NS_STYLE_ALIGN_FLEX_START:
// All packing space should go at the end --> nothing to do here.
break;

Просмотреть файл

@ -2442,10 +2442,10 @@ LogicalRect nsFloatManager::ShapeInfo::ComputeShapeBoxRect(
switch (aShapeOutside.GetReferenceBox()) {
case StyleGeometryBox::ContentBox:
rect.Deflate(aWM, aFrame->GetLogicalUsedPadding(aWM));
MOZ_FALLTHROUGH;
[[fallthrough]];
case StyleGeometryBox::PaddingBox:
rect.Deflate(aWM, aFrame->GetLogicalUsedBorder(aWM));
MOZ_FALLTHROUGH;
[[fallthrough]];
case StyleGeometryBox::BorderBox:
rect.Deflate(aWM, aFrame->GetLogicalUsedMargin(aWM));
break;

Просмотреть файл

@ -3149,7 +3149,7 @@ void nsIFrame::BuildDisplayListForStackingContext(
case nsDisplayTransform::PartialPrerender:
allowAsyncAnimation = true;
visibleRect = dirtyRect;
MOZ_FALLTHROUGH;
[[fallthrough]];
// fall through to the NoPrerender case
case nsDisplayTransform::NoPrerender:
if (overflow.IsEmpty() && !extend3DContext) {
@ -8603,7 +8603,7 @@ nsresult nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos) {
aPos->mWordMovementType = eEndWord;
}
// Intentionally fall through the eSelectWord case.
MOZ_FALLTHROUGH;
[[fallthrough]];
case eSelectWord: {
// wordSelectEatSpace means "are we looking for a boundary between
// whitespace and non-whitespace (in the direction we're moving in)". It

Просмотреть файл

@ -6014,7 +6014,7 @@ void nsGridContainerFrame::Tracks::AlignJustifyContent(
case NS_STYLE_ALIGN_BASELINE:
case NS_STYLE_ALIGN_LAST_BASELINE:
NS_WARNING("NYI: 'first/last baseline' (bug 1151204)"); // XXX
MOZ_FALLTHROUGH;
[[fallthrough]];
case NS_STYLE_ALIGN_START:
distribute = false;
break;

Просмотреть файл

@ -2961,7 +2961,7 @@ void nsLineLayout::ExpandRubyBox(PerFrameData* aFrame, nscoord aReservedISize,
}
// If there are no justification opportunities for space-between,
// fall-through to center per spec.
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case StyleRubyAlign::Center:
// Indent all children by half of the reserved inline size.
@ -3148,7 +3148,7 @@ void nsLineLayout::TextAlignLine(nsLineBox* aLine, bool aIsLastLine) {
}
// Fall through to the default case if we could not justify to fill
// the space.
MOZ_FALLTHROUGH;
[[fallthrough]];
}
case NS_STYLE_TEXT_ALIGN_START:

Просмотреть файл

@ -7853,7 +7853,7 @@ bool ClusterIterator::IsPunctuation() {
if (ch == '_' && !sStopAtUnderscore) {
return false;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case HB_UNICODE_GENERAL_CATEGORY_DASH_PUNCTUATION: /* Pd */
case HB_UNICODE_GENERAL_CATEGORY_CLOSE_PUNCTUATION: /* Pe */
case HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION: /* Pf */

Просмотреть файл

@ -3639,7 +3639,7 @@ void nsCSSRendering::GetTableBorderSolidSegments(
break;
}
// else fall through to solid
MOZ_FALLTHROUGH;
[[fallthrough]];
case StyleBorderStyle::Solid:
aSegments.AppendElement(
SolidBeveledBorderSegment{aBorder,

Просмотреть файл

@ -1212,7 +1212,7 @@ Color MakeBorderColor(nscolor aColor, BorderColorStyle aBorderColorStyle) {
case BorderColorStyleLight:
k = 1;
MOZ_FALLTHROUGH;
[[fallthrough]];
case BorderColorStyleDark:
NS_GetSpecial3DColors(colors, aColor);
return Color::FromABGR(colors[k]);

Просмотреть файл

@ -156,7 +156,7 @@ PrintPreviewUserEventSuppressor::HandleEvent(Event* aEvent) {
}
}
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case eEventAction_Suppress:
aEvent->StopPropagation();
aEvent->PreventDefault();

Просмотреть файл

@ -532,7 +532,7 @@ static void InvalidateImages(nsIFrame* aFrame, imgIRequest* aRequest) {
->UsingSharedSurface(aRequest->GetProducerId())) {
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
invalidateFrame = true;
break;

Просмотреть файл

@ -91,7 +91,7 @@ SpanningCellSorter::Item* SpanningCellSorter::GetNext(int32_t* aColSpan) {
/* prepare to enumerate the array */
mState = ENUMERATING_ARRAY;
mEnumerationIndex = 0;
MOZ_FALLTHROUGH;
[[fallthrough]];
case ENUMERATING_ARRAY:
while (mEnumerationIndex < ARRAY_SIZE && !mArray[mEnumerationIndex])
++mEnumerationIndex;
@ -121,7 +121,7 @@ SpanningCellSorter::Item* SpanningCellSorter::GetNext(int32_t* aColSpan) {
nullptr);
mSortedHashTable = sh;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case ENUMERATING_HASH:
if (mEnumerationIndex < mHashTable.EntryCount()) {
Item* result = mSortedHashTable[mEnumerationIndex]->mItems;
@ -137,7 +137,7 @@ SpanningCellSorter::Item* SpanningCellSorter::GetNext(int32_t* aColSpan) {
return result;
}
mState = DONE;
MOZ_FALLTHROUGH;
[[fallthrough]];
case DONE:;
}
return nullptr;

Просмотреть файл

@ -818,7 +818,7 @@ void nsTableCellMap::ResetBStartStart(LogicalSide aSide, nsCellMap& aCellMap,
switch (aSide) {
case eLogicalSideBEnd:
aRowIndex++;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eLogicalSideBStart:
cellData = (BCCellData*)aCellMap.GetDataAt(aRowIndex - aRowGroupStart,
aColIndex);
@ -840,7 +840,7 @@ void nsTableCellMap::ResetBStartStart(LogicalSide aSide, nsCellMap& aCellMap,
break;
case eLogicalSideIEnd:
aColIndex++;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eLogicalSideIStart:
cellData = (BCCellData*)aCellMap.GetDataAt(aRowIndex - aRowGroupStart,
aColIndex);
@ -880,7 +880,7 @@ void nsTableCellMap::SetBCBorderEdge(LogicalSide aSide, nsCellMap& aCellMap,
case eLogicalSideBEnd:
rgYPos++;
yPos++;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eLogicalSideBStart:
lastIndex = xPos + aLength - 1;
for (xIndex = xPos; xIndex <= lastIndex; xIndex++) {
@ -924,7 +924,7 @@ void nsTableCellMap::SetBCBorderEdge(LogicalSide aSide, nsCellMap& aCellMap,
break;
case eLogicalSideIEnd:
xPos++;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eLogicalSideIStart:
// since bStart, bEnd borders were set, there should already be a cellData
// entry

Просмотреть файл

@ -578,7 +578,7 @@ void nsTableCellFrame::BlockDirAlignChild(WritingMode aWM, nscoord aMaxAscent) {
}
// Empty cells don't participate in baseline alignment -
// fallback to start alignment.
MOZ_FALLTHROUGH;
[[fallthrough]];
case StyleVerticalAlignKeyword::Top:
// Align the top of the child frame with the top of the content area,
kidBStart = bStartInset;

Просмотреть файл

@ -6711,7 +6711,7 @@ Maybe<BCBorderParameters> BCBlockDirSeg::BuildBorderParameters(
if (!aIter.IsTableIEndMost() && (relColIndex > 0)) {
col = aIter.mBlockDirInfo[relColIndex - 1].mCol;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case eColGroupOwner:
if (col) {
owner = col->GetParent();
@ -6722,13 +6722,13 @@ Maybe<BCBorderParameters> BCBlockDirSeg::BuildBorderParameters(
if (!aIter.IsTableIEndMost() && (relColIndex > 0)) {
col = aIter.mBlockDirInfo[relColIndex - 1].mCol;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case eColOwner:
owner = col;
break;
case eAjaRowGroupOwner:
NS_ERROR("a neighboring rowgroup can never own a vertical border");
MOZ_FALLTHROUGH;
[[fallthrough]];
case eRowGroupOwner:
NS_ASSERTION(aIter.IsTableIStartMost() || aIter.IsTableIEndMost(),
"row group can own border only at table edge");
@ -6736,7 +6736,7 @@ Maybe<BCBorderParameters> BCBlockDirSeg::BuildBorderParameters(
break;
case eAjaRowOwner:
NS_ERROR("program error");
MOZ_FALLTHROUGH;
[[fallthrough]];
case eRowOwner:
NS_ASSERTION(aIter.IsTableIStartMost() || aIter.IsTableIEndMost(),
"row can own border only at table edge");
@ -6745,7 +6745,7 @@ Maybe<BCBorderParameters> BCBlockDirSeg::BuildBorderParameters(
case eAjaCellOwner:
side = eLogicalSideIEnd;
cell = mAjaCell;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eCellOwner:
owner = cell;
break;
@ -7110,7 +7110,7 @@ Maybe<BCBorderParameters> BCInlineDirSeg::BuildBorderParameters(
break;
case eAjaColGroupOwner:
NS_ERROR("neighboring colgroups can never own an inline-dir border");
MOZ_FALLTHROUGH;
[[fallthrough]];
case eColGroupOwner:
NS_ASSERTION(aIter.IsTableBStartMost() || aIter.IsTableBEndMost(),
"col group can own border only at the table edge");
@ -7120,7 +7120,7 @@ Maybe<BCBorderParameters> BCInlineDirSeg::BuildBorderParameters(
break;
case eAjaColOwner:
NS_ERROR("neighboring column can never own an inline-dir border");
MOZ_FALLTHROUGH;
[[fallthrough]];
case eColOwner:
NS_ASSERTION(aIter.IsTableBStartMost() || aIter.IsTableBEndMost(),
"col can own border only at the table edge");
@ -7129,14 +7129,14 @@ Maybe<BCBorderParameters> BCInlineDirSeg::BuildBorderParameters(
case eAjaRowGroupOwner:
side = eLogicalSideBEnd;
rg = (aIter.IsTableBEndMost()) ? aIter.mRg : aIter.mPrevRg;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eRowGroupOwner:
owner = rg;
break;
case eAjaRowOwner:
side = eLogicalSideBEnd;
row = (aIter.IsTableBEndMost()) ? aIter.mRow : aIter.mPrevRow;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eRowOwner:
owner = row;
break;
@ -7145,7 +7145,7 @@ Maybe<BCBorderParameters> BCInlineDirSeg::BuildBorderParameters(
// if this is null due to the damage area origin-y > 0, then the border
// won't show up anyway
cell = mAjaCell;
MOZ_FALLTHROUGH;
[[fallthrough]];
case eCellOwner:
owner = cell;
break;

Просмотреть файл

@ -2149,7 +2149,7 @@ bool nsXULPopupManager::HandleKeyboardEventWithKeyCode(
Rollup(0, false, nullptr, nullptr);
break;
}
MOZ_FALLTHROUGH;
[[fallthrough]];
#endif
case KeyboardEvent_Binding::DOM_VK_LEFT:
@ -2195,7 +2195,7 @@ bool nsXULPopupManager::HandleKeyboardEventWithKeyCode(
break;
}
// Intentional fall-through to RETURN case
MOZ_FALLTHROUGH;
[[fallthrough]];
case KeyboardEvent_Binding::DOM_VK_RETURN: {
// If there is a popup open, check if the current item needs to be opened.

Просмотреть файл

@ -905,7 +905,7 @@ void TransportLayerDtls::Handshake() {
MOZ_MTLOG(ML_ERROR, LAYER_INFO << "Malformed DTLS message; ignoring");
// If this were TLS (and not DTLS), this would be fatal, but
// here we're required to ignore bad messages, so fall through
MOZ_FALLTHROUGH;
[[fallthrough]];
case PR_WOULD_BLOCK_ERROR:
MOZ_MTLOG(ML_NOTICE, LAYER_INFO << "Handshake would have blocked");
PRIntervalTime timeout;

Просмотреть файл

@ -629,11 +629,11 @@ struct AssertionConditionType {
* debug builds, but intentionally fall through in release builds to handle
* unexpected values.
*
* Why do we need MOZ_FALLTHROUGH_ASSERT in addition to MOZ_FALLTHROUGH? In
* Why do we need MOZ_FALLTHROUGH_ASSERT in addition to [[fallthrough]]? In
* release builds, the MOZ_ASSERT(false) will expand to `do { } while (false)`,
* requiring a MOZ_FALLTHROUGH annotation to suppress a -Wimplicit-fallthrough
* requiring a [[fallthrough]] annotation to suppress a -Wimplicit-fallthrough
* warning. In debug builds, the MOZ_ASSERT(false) will expand to something like
* `if (true) { MOZ_CRASH(); }` and the MOZ_FALLTHROUGH annotation will cause
* `if (true) { MOZ_CRASH(); }` and the [[fallthrough]] annotation will cause
* a -Wunreachable-code warning. The MOZ_FALLTHROUGH_ASSERT macro breaks this
* warning stalemate.
*
@ -642,7 +642,7 @@ struct AssertionConditionType {
* default:
* // This case wants to assert in debug builds, fall through in release.
* MOZ_ASSERT(false); // -Wimplicit-fallthrough warning in release builds!
* MOZ_FALLTHROUGH; // but -Wunreachable-code warning in debug builds!
* [[fallthrough]]; // but -Wunreachable-code warning in debug builds!
* case 5:
* return 5;
* }
@ -660,7 +660,7 @@ struct AssertionConditionType {
# define MOZ_FALLTHROUGH_ASSERT(...) \
MOZ_CRASH("MOZ_FALLTHROUGH_ASSERT: " __VA_ARGS__)
#else
# define MOZ_FALLTHROUGH_ASSERT(...) MOZ_FALLTHROUGH
# define MOZ_FALLTHROUGH_ASSERT(...) [[fallthrough]]
#endif
/*

Просмотреть файл

@ -118,7 +118,7 @@ nsresult nsJARInputStream::InitDirectory(nsJAR* aJar,
case ')':
case '\\':
escDirName.Append('\\');
MOZ_FALLTHROUGH;
[[fallthrough]];
default:
escDirName.Append(*curr);
}

Просмотреть файл

@ -96,11 +96,11 @@ size_t XZStream::Decode(void* aOutBuf, size_t aOutSize) {
case XZ_STREAM_END:
// Stream ended, the next loop iteration should terminate.
MOZ_ASSERT(mBuffers.in_pos == mBuffers.in_size);
MOZ_FALLTHROUGH;
[[fallthrough]];
#ifdef XZ_DEC_ANY_CHECK
case XZ_UNSUPPORTED_CHECK:
// Ignore unsupported check.
MOZ_FALLTHROUGH;
[[fallthrough]];
#endif
case XZ_OK:
// Chunk decoded, proceed.
@ -123,7 +123,7 @@ size_t XZStream::Decode(void* aOutBuf, size_t aOutSize) {
return 0;
case XZ_DATA_ERROR:
MOZ_FALLTHROUGH;
[[fallthrough]];
case XZ_BUF_ERROR:
ERROR("XZ decoding: corrupt input stream");
return 0;

Просмотреть файл

@ -873,7 +873,7 @@ bool mozilla::PrintfTarget::vprint(const char* fmt, va_list ap) {
break;
}
MOZ_ASSERT(type == TYPE_LONG);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 'S':
#if defined(XP_WIN)
{

Просмотреть файл

@ -445,7 +445,7 @@ inline nsresult ParseIPv4Number(const nsACString& input, int32_t base,
switch (base) {
case 16:
++current;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 8:
++current;
break;

Просмотреть файл

@ -372,7 +372,7 @@ nsresult net_ResolveRelativePath(const nsACString& relativePath,
case '#':
case '?':
stop = true;
MOZ_FALLTHROUGH;
[[fallthrough]];
case '/':
// delimiter found
if (name.EqualsLiteral("..")) {

Просмотреть файл

@ -77,35 +77,35 @@ CacheHash::Hash32_t CacheHash::Hash(const char* aData, uint32_t aSize,
switch (len) { /* all the case statements fall through */
case 11:
c += (uint32_t(k[10]) << 24);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 10:
c += (uint32_t(k[9]) << 16);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 9:
c += (uint32_t(k[8]) << 8);
MOZ_FALLTHROUGH;
[[fallthrough]];
/* the low-order byte of c is reserved for the length */
case 8:
b += (uint32_t(k[7]) << 24);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 7:
b += (uint32_t(k[6]) << 16);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 6:
b += (uint32_t(k[5]) << 8);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 5:
b += k[4];
MOZ_FALLTHROUGH;
[[fallthrough]];
case 4:
a += (uint32_t(k[3]) << 24);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 3:
a += (uint32_t(k[2]) << 16);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 2:
a += (uint32_t(k[1]) << 8);
MOZ_FALLTHROUGH;
[[fallthrough]];
case 1:
a += k[0];
/* case 0: nothing left to add */
@ -190,10 +190,10 @@ void CacheHash::Update(const char* aData, uint32_t aLen) {
switch (aLen) {
case 3:
mBuf += data[2] << 16;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 2:
mBuf += data[1] << 8;
MOZ_FALLTHROUGH;
[[fallthrough]];
case 1:
mBuf += data[0];
}

Просмотреть файл

@ -146,7 +146,7 @@ class CacheIndexEntryAutoManage {
if (!mDoNotSearchInUpdates) {
entry = mIndex->mPendingUpdates.GetEntry(*mHash);
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case CacheIndex::BUILDING:
case CacheIndex::UPDATING:
case CacheIndex::READY:
@ -446,7 +446,7 @@ nsresult CacheIndex::Shutdown() {
switch (oldState) {
case WRITING:
index->FinishWrite(false);
MOZ_FALLTHROUGH;
[[fallthrough]];
case READY:
if (index->mIndexOnDiskIsValid && !index->mDontMarkIndexClean) {
if (!sanitize && NS_FAILED(index->WriteLogToDisk())) {
@ -1225,7 +1225,7 @@ nsresult CacheIndex::HasEntry(
case READING:
case WRITING:
entry = index->mPendingUpdates.GetEntry(hash);
MOZ_FALLTHROUGH;
[[fallthrough]];
case BUILDING:
case UPDATING:
case READY:

Просмотреть файл

@ -442,7 +442,7 @@ class WalkDiskCacheRunnable : public WalkCacheRunnable {
}
mPass = ITERATE_METADATA;
MOZ_FALLTHROUGH;
[[fallthrough]];
case ITERATE_METADATA:
// Now grab the context iterator.

Просмотреть файл

@ -71,7 +71,7 @@ nsCookiePermission::CanSetCookie(nsIURI* aURI, nsIChannel* aChannel,
switch (perm) {
case nsICookiePermission::ACCESS_SESSION:
*aIsSession = true;
MOZ_FALLTHROUGH;
[[fallthrough]];
case nsICookiePermission::ACCESS_ALLOW:
*aResult = true;

Просмотреть файл

@ -844,7 +844,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
}
// Fall through to the next upgrade.
MOZ_FALLTHROUGH;
[[fallthrough]];
case 2: {
// Add the baseDomain column and index to the table.
@ -902,7 +902,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
}
// Fall through to the next upgrade.
MOZ_FALLTHROUGH;
[[fallthrough]];
case 3: {
// Add the creationTime column to the table, and create a unique index
@ -998,7 +998,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
}
// Fall through to the next upgrade.
MOZ_FALLTHROUGH;
[[fallthrough]];
case 4: {
// We need to add appId/inBrowserElement, plus change a constraint on
@ -1046,7 +1046,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
("Upgraded database to schema version 5"));
}
// Fall through to the next upgrade.
MOZ_FALLTHROUGH;
[[fallthrough]];
case 5: {
// Change in the version: Replace the columns |appId| and
@ -1113,7 +1113,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
COOKIE_LOGSTRING(LogLevel::Debug,
("Upgraded database to schema version 6"));
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case 6: {
// We made a mistake in schema version 6. We cannot remove expected
@ -1168,7 +1168,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
COOKIE_LOGSTRING(LogLevel::Debug,
("Upgraded database to schema version 7"));
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case 7: {
// Remove the appId field from moz_cookies.
@ -1253,7 +1253,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
COOKIE_LOGSTRING(LogLevel::Debug,
("Upgraded database to schema version 8"));
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case 8: {
// Add the sameSite column to the table.
@ -1264,7 +1264,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
COOKIE_LOGSTRING(LogLevel::Debug,
("Upgraded database to schema version 9"));
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case 9: {
// Add the rawSameSite column to the table.
@ -1285,7 +1285,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
mDefaultDBState->syncConn->SetSchemaVersion(COOKIES_SCHEMA_VERSION);
NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
}
MOZ_FALLTHROUGH;
[[fallthrough]];
case COOKIES_SCHEMA_VERSION:
break;
@ -1303,7 +1303,7 @@ OpenDBResult nsCookieService::TryInitDB(bool aRecreateDB) {
NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
}
// fall through to downgrade check
MOZ_FALLTHROUGH;
[[fallthrough]];
// downgrading.
// if columns have been added to the table, we can still use the ones we

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше