Skip to content

Commit 91f7a72

Browse files
committed
Mozilla bug 1603919 - Adapt translator to [[fallthrough]] and nsITimer.h changes. r=cpeterson.
1 parent 81089b4 commit 91f7a72

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

translator-src/nu/validator/htmlparser/cpptranslate/CppTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public class CppTypes {
8181
reservedWords.add("unicode");
8282
}
8383

84-
private static final String[] TREE_BUILDER_INCLUDES = { "nsContentUtils", "nsAtom", "nsHtml5AtomTable", "nsITimer",
84+
private static final String[] TREE_BUILDER_INCLUDES = { "nsContentUtils", "nsAtom", "nsHtml5AtomTable",
8585
"nsHtml5String", "nsNameSpaceManager", "nsIContent", "nsTraceRefcnt", "jArray", "nsHtml5DocumentMode",
8686
"nsHtml5ArrayCopy", "nsHtml5Parser", "nsGkAtoms", "nsHtml5TreeOperation", "nsHtml5StateSnapshot",
8787
"nsHtml5StackNode", "nsHtml5TreeOpExecutor", "nsHtml5StreamParser", "nsAHtml5TreeBuilderState",

translator-src/nu/validator/htmlparser/cpptranslate/CppVisitor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ public void visit(NameExpr n, LocalSymbolTable arg) {
334334
printer.print("this");
335335
} else if ("errorHandler".equals(n.getName())) {
336336
printer.print(cppTypes.errorHandler());
337+
} else if ("MOZ_FALLTHROUGH".equals(n.getName())) {
338+
printer.print("[[fallthrough]]");
337339
} else {
338340
printer.print(n.getName());
339341
}

0 commit comments

Comments
 (0)