Bug 1426997 - Add MOZ_FALLTHROUGH_ASSERT to make it clear that it can never fall through r=hsivonen
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 29 Jan 2018 09:11:08 +0100
changeset 402308 59f5d0e5b7c85f6dc18482a279515b3bf26c0051
parent 402307 63117daac3ab59a8087d9c8c67c9449c0f1a119b
child 402309 6873d1a8a2adc31911ba6a2d0548921bdb24728a
push id59086
push usersledru@mozilla.com
push dateSat, 03 Feb 2018 07:21:50 +0000
treeherderautoland@59f5d0e5b7c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs1426997
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1426997 - Add MOZ_FALLTHROUGH_ASSERT to make it clear that it can never fall through r=hsivonen MozReview-Commit-ID: KZvVGnlJZtr
parser/html/nsHtml5TreeBuilder.cpp
--- a/parser/html/nsHtml5TreeBuilder.cpp
+++ b/parser/html/nsHtml5TreeBuilder.cpp
@@ -394,16 +394,17 @@ nsHtml5TreeBuilder::characters(const cha
                   accumulateCharacters(buf, start, i - start);
                   start = i;
                 }
                 flushCharacters();
                 reconstructTheActiveFormattingElements();
                 continue;
               }
             }
+          MOZ_FALLTHROUGH_ASSERT("unreachable");
           }
           default: {
             switch (mode) {
               case INITIAL: {
                 documentModeInternal(QUIRKS_MODE, nullptr, nullptr, false);
                 mode = BEFORE_HTML;
                 i--;
                 continue;