Bug 1447480 - Add a MOZ_ASSERT to make it clear that it can never fall through r=hsivonen
authorSylvestre Ledru <sledru@mozilla.com>
Tue, 03 Apr 2018 13:40:59 +0200
changeset 412344 639322e83c65ec7dd3394921cd02804935f021fc
parent 412343 cfe13e874f02c53a3d993075cc1b046b874cde4c
child 412345 1fdb4dcb4225228e5ebc36c3de4d259fe730aedf
push id33800
push usernerli@mozilla.com
push dateMon, 09 Apr 2018 16:45:06 +0000
treeherdermozilla-central@e37784665179 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs1447480
milestone61.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 1447480 - Add a MOZ_ASSERT to make it clear that it can never fall through r=hsivonen MozReview-Commit-ID: Hq9jG1CVwRK
parser/html/javasrc/TreeBuilder.java
parser/html/nsHtml5TreeBuilder.cpp
--- a/parser/html/javasrc/TreeBuilder.java
+++ b/parser/html/javasrc/TreeBuilder.java
@@ -1162,16 +1162,17 @@ public abstract class TreeBuilder<T> imp
                                     flushCharacters();
                                     reconstructTheActiveFormattingElements();
                                     /*
                                      * Append the token's character to the
                                      * current node.
                                      */
                                     continue;
                             }
+                            // CPPONLY: MOZ_FALLTHROUGH_ASSERT();
                         default:
                             /*
                              * A character token that is not one of one of
                              * U+0009 CHARACTER TABULATION, U+000A LINE FEED
                              * (LF), U+000C FORM FEED (FF), or U+0020 SPACE
                              */
                             switch (mode) {
                                 case INITIAL:
--- 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();
           }
           default: {
             switch (mode) {
               case INITIAL: {
                 documentModeInternal(QUIRKS_MODE, nullptr, nullptr, false);
                 mode = BEFORE_HTML;
                 i--;
                 continue;