Bug 1424548 - Part 14: Regenerate HTML parser code with override specifiers. r=hsivonen
authorChris Peterson <cpeterson@mozilla.com>
Thu, 07 Dec 2017 01:27:56 -0800
changeset 397273 1fcbcdfba8e5e316278dff808f996eb70ab0daa1
parent 397272 7ea2b1f67e085452228710d80ecda4f15f5b0ff3
child 397274 433caabd1b475f08feca72a9860d035fd8edfa64
push id98497
push usercpeterson@mozilla.com
push dateFri, 22 Dec 2017 05:56:56 +0000
treeherdermozilla-inbound@1fcbcdfba8e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs1424548
milestone59.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 1424548 - Part 14: Regenerate HTML parser code with override specifiers. r=hsivonen Overridden virtual functions without override specifiers will become errors after gcc -Wsuggest-override warnings are enabled.
parser/html/javasrc/StateSnapshot.java
parser/html/javasrc/TreeBuilder.java
parser/html/nsHtml5StateSnapshot.h
parser/html/nsHtml5TreeBuilder.h
--- a/parser/html/javasrc/StateSnapshot.java
+++ b/parser/html/javasrc/StateSnapshot.java
@@ -77,121 +77,135 @@ public class StateSnapshot<T> implements
         this.framesetOk = framesetOk;
         this.needToDropLF = needToDropLF;
         this.quirks = quirks;
     }
     
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getStack()
      */
+    @Override
     public StackNode<T>[] getStack() {
         return stack;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getTemplateModeStack()
      */
+    @Override
     public int[] getTemplateModeStack() {
         return templateModeStack;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getListOfActiveFormattingElements()
      */
+    @Override
     public StackNode<T>[] getListOfActiveFormattingElements() {
         return listOfActiveFormattingElements;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getFormPointer()
      */
+    @Override
     public T getFormPointer() {
         return formPointer;
     }
 
     /**
      * Returns the headPointer.
      * 
      * @return the headPointer
      */
+    @Override
     public T getHeadPointer() {
         return headPointer;
     }
 
     /**
      * Returns the deepTreeSurrogateParent.
      * 
      * @return the deepTreeSurrogateParent
      */
+    @Override
     public T getDeepTreeSurrogateParent() {
         return deepTreeSurrogateParent;
     }
     
     /**
      * Returns the mode.
      * 
      * @return the mode
      */
+    @Override
     public int getMode() {
         return mode;
     }
 
     /**
      * Returns the originalMode.
      * 
      * @return the originalMode
      */
+    @Override
     public int getOriginalMode() {
         return originalMode;
     }
 
     /**
      * Returns the framesetOk.
      * 
      * @return the framesetOk
      */
+    @Override
     public boolean isFramesetOk() {
         return framesetOk;
     }
 
     /**
      * Returns the needToDropLF.
      * 
      * @return the needToDropLF
      */
+    @Override
     public boolean isNeedToDropLF() {
         return needToDropLF;
     }
 
     /**
      * Returns the quirks.
      * 
      * @return the quirks
      */
+    @Override
     public boolean isQuirks() {
         return quirks;
     }
     
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getListOfActiveFormattingElementsLength()
      */
+    @Override
     public int getListOfActiveFormattingElementsLength() {
         return listOfActiveFormattingElements.length;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getStackLength()
      */
+    @Override
     public int getStackLength() {
         return stack.length;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getTemplateModeStackLength()
      */
+    @Override
     public int getTemplateModeStackLength() {
         return templateModeStack.length;
     }
 
     @SuppressWarnings("unused") private void destructor() {
         for (int i = 0; i < stack.length; i++) {
             stack[i].release(null);
         }
--- a/parser/html/javasrc/TreeBuilder.java
+++ b/parser/html/javasrc/TreeBuilder.java
@@ -6302,121 +6302,135 @@ public abstract class TreeBuilder<T> imp
             }
         }
         return -1;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getFormPointer()
      */
+    @Override
     public T getFormPointer() {
         return formPointer;
     }
 
     /**
      * Returns the headPointer.
      *
      * @return the headPointer
      */
+    @Override
     public T getHeadPointer() {
         return headPointer;
     }
 
     /**
      * Returns the deepTreeSurrogateParent.
      *
      * @return the deepTreeSurrogateParent
      */
+    @Override
     public T getDeepTreeSurrogateParent() {
         return deepTreeSurrogateParent;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getListOfActiveFormattingElements()
      */
+    @Override
     public StackNode<T>[] getListOfActiveFormattingElements() {
         return listOfActiveFormattingElements;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getStack()
      */
+    @Override
     public StackNode<T>[] getStack() {
         return stack;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getTemplateModeStack()
      */
+    @Override
     public int[] getTemplateModeStack() {
         return templateModeStack;
     }
 
     /**
      * Returns the mode.
      *
      * @return the mode
      */
+    @Override
     public int getMode() {
         return mode;
     }
 
     /**
      * Returns the originalMode.
      *
      * @return the originalMode
      */
+    @Override
     public int getOriginalMode() {
         return originalMode;
     }
 
     /**
      * Returns the framesetOk.
      *
      * @return the framesetOk
      */
+    @Override
     public boolean isFramesetOk() {
         return framesetOk;
     }
 
     /**
      * Returns the needToDropLF.
      *
      * @return the needToDropLF
      */
+    @Override
     public boolean isNeedToDropLF() {
         return needToDropLF;
     }
 
     /**
      * Returns the quirks.
      *
      * @return the quirks
      */
+    @Override
     public boolean isQuirks() {
         return quirks;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getListOfActiveFormattingElementsLength()
      */
+    @Override
     public int getListOfActiveFormattingElementsLength() {
         return listPtr + 1;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getStackLength()
      */
+    @Override
     public int getStackLength() {
         return currentPtr + 1;
     }
 
     /**
      * @see nu.validator.htmlparser.impl.TreeBuilderState#getTemplateModeStackLength()
      */
+    @Override
     public int getTemplateModeStackLength() {
         return templateModePtr + 1;
     }
 
     /**
      * Reports a stray start tag.
      * @param name the name of the stray tag
      *
--- a/parser/html/nsHtml5StateSnapshot.h
+++ b/parser/html/nsHtml5StateSnapshot.h
@@ -77,28 +77,29 @@ public:
     nsIContentHandle* formPointer,
     nsIContentHandle* headPointer,
     nsIContentHandle* deepTreeSurrogateParent,
     int32_t mode,
     int32_t originalMode,
     bool framesetOk,
     bool needToDropLF,
     bool quirks);
-  jArray<nsHtml5StackNode*, int32_t> getStack();
-  jArray<int32_t, int32_t> getTemplateModeStack();
-  jArray<nsHtml5StackNode*, int32_t> getListOfActiveFormattingElements();
-  nsIContentHandle* getFormPointer();
-  nsIContentHandle* getHeadPointer();
-  nsIContentHandle* getDeepTreeSurrogateParent();
-  int32_t getMode();
-  int32_t getOriginalMode();
-  bool isFramesetOk();
-  bool isNeedToDropLF();
-  bool isQuirks();
-  int32_t getListOfActiveFormattingElementsLength();
-  int32_t getStackLength();
-  int32_t getTemplateModeStackLength();
+  jArray<nsHtml5StackNode*, int32_t> getStack() override;
+  jArray<int32_t, int32_t> getTemplateModeStack() override;
+  jArray<nsHtml5StackNode*, int32_t> getListOfActiveFormattingElements()
+    override;
+  nsIContentHandle* getFormPointer() override;
+  nsIContentHandle* getHeadPointer() override;
+  nsIContentHandle* getDeepTreeSurrogateParent() override;
+  int32_t getMode() override;
+  int32_t getOriginalMode() override;
+  bool isFramesetOk() override;
+  bool isNeedToDropLF() override;
+  bool isQuirks() override;
+  int32_t getListOfActiveFormattingElementsLength() override;
+  int32_t getStackLength() override;
+  int32_t getTemplateModeStackLength() override;
   ~nsHtml5StateSnapshot();
   static void initializeStatics();
   static void releaseStatics();
 };
 
 #endif
--- a/parser/html/nsHtml5TreeBuilder.h
+++ b/parser/html/nsHtml5TreeBuilder.h
@@ -611,29 +611,30 @@ public:
   void loadState(nsAHtml5TreeBuilderState* snapshot,
                  nsHtml5AtomTable* interner);
 
 private:
   int32_t findInArray(nsHtml5StackNode* node,
                       jArray<nsHtml5StackNode*, int32_t> arr);
 
 public:
-  nsIContentHandle* getFormPointer();
-  nsIContentHandle* getHeadPointer();
-  nsIContentHandle* getDeepTreeSurrogateParent();
-  jArray<nsHtml5StackNode*, int32_t> getListOfActiveFormattingElements();
-  jArray<nsHtml5StackNode*, int32_t> getStack();
-  jArray<int32_t, int32_t> getTemplateModeStack();
-  int32_t getMode();
-  int32_t getOriginalMode();
-  bool isFramesetOk();
-  bool isNeedToDropLF();
-  bool isQuirks();
-  int32_t getListOfActiveFormattingElementsLength();
-  int32_t getStackLength();
-  int32_t getTemplateModeStackLength();
+  nsIContentHandle* getFormPointer() override;
+  nsIContentHandle* getHeadPointer() override;
+  nsIContentHandle* getDeepTreeSurrogateParent() override;
+  jArray<nsHtml5StackNode*, int32_t> getListOfActiveFormattingElements()
+    override;
+  jArray<nsHtml5StackNode*, int32_t> getStack() override;
+  jArray<int32_t, int32_t> getTemplateModeStack() override;
+  int32_t getMode() override;
+  int32_t getOriginalMode() override;
+  bool isFramesetOk() override;
+  bool isNeedToDropLF() override;
+  bool isQuirks() override;
+  int32_t getListOfActiveFormattingElementsLength() override;
+  int32_t getStackLength() override;
+  int32_t getTemplateModeStackLength() override;
   static void initializeStatics();
   static void releaseStatics();
 
 #include "nsHtml5TreeBuilderHSupplement.h"
 };
 
 #endif