mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-06 15:27:30 +09:00
Bug 1347737 - Introduce a new non-heap-allocated type for holding nsStringBuffer* in the HTML parser. (java htmlparser)
This commit is contained in:
parent
bdd222ff43
commit
38d498e499
2 changed files with 38 additions and 33 deletions
|
|
@ -97,7 +97,7 @@ public class CppTypes {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] TREE_BUILDER_INCLUDES = { "nsContentUtils",
|
private static final String[] TREE_BUILDER_INCLUDES = { "nsContentUtils",
|
||||||
"nsIAtom", "nsHtml5AtomTable", "nsITimer", "nsString",
|
"nsIAtom", "nsHtml5AtomTable", "nsITimer", "nsHtml5String",
|
||||||
"nsNameSpaceManager", "nsIContent", "nsTraceRefcnt", "jArray",
|
"nsNameSpaceManager", "nsIContent", "nsTraceRefcnt", "jArray",
|
||||||
"nsHtml5DocumentMode", "nsHtml5ArrayCopy", "nsHtml5Parser",
|
"nsHtml5DocumentMode", "nsHtml5ArrayCopy", "nsHtml5Parser",
|
||||||
"nsHtml5Atoms", "nsHtml5TreeOperation", "nsHtml5StateSnapshot",
|
"nsHtml5Atoms", "nsHtml5TreeOperation", "nsHtml5StateSnapshot",
|
||||||
|
|
@ -107,14 +107,14 @@ public class CppTypes {
|
||||||
"mozilla/Likely", "nsIContentHandle", "nsHtml5OplessBuilder" };
|
"mozilla/Likely", "nsIContentHandle", "nsHtml5OplessBuilder" };
|
||||||
|
|
||||||
private static final String[] TOKENIZER_INCLUDES = { "nsIAtom",
|
private static final String[] TOKENIZER_INCLUDES = { "nsIAtom",
|
||||||
"nsHtml5AtomTable", "nsString", "nsIContent", "nsTraceRefcnt",
|
"nsHtml5AtomTable", "nsHtml5String", "nsIContent", "nsTraceRefcnt",
|
||||||
"jArray", "nsHtml5DocumentMode", "nsHtml5ArrayCopy",
|
"jArray", "nsHtml5DocumentMode", "nsHtml5ArrayCopy",
|
||||||
"nsHtml5NamedCharacters", "nsHtml5NamedCharactersAccel",
|
"nsHtml5NamedCharacters", "nsHtml5NamedCharactersAccel",
|
||||||
"nsHtml5Atoms", "nsAHtml5TreeBuilderState", "nsHtml5Macros",
|
"nsHtml5Atoms", "nsAHtml5TreeBuilderState", "nsHtml5Macros",
|
||||||
"nsHtml5Highlighter", "nsHtml5TokenizerLoopPolicies" };
|
"nsHtml5Highlighter", "nsHtml5TokenizerLoopPolicies" };
|
||||||
|
|
||||||
private static final String[] INCLUDES = { "nsIAtom", "nsHtml5AtomTable",
|
private static final String[] INCLUDES = { "nsIAtom", "nsHtml5AtomTable",
|
||||||
"nsString", "nsNameSpaceManager", "nsIContent", "nsTraceRefcnt",
|
"nsHtml5String", "nsNameSpaceManager", "nsIContent", "nsTraceRefcnt",
|
||||||
"jArray", "nsHtml5ArrayCopy", "nsAHtml5TreeBuilderState",
|
"jArray", "nsHtml5ArrayCopy", "nsAHtml5TreeBuilderState",
|
||||||
"nsHtml5Atoms", "nsHtml5ByteReadable", "nsIUnicodeDecoder",
|
"nsHtml5Atoms", "nsHtml5ByteReadable", "nsIUnicodeDecoder",
|
||||||
"nsHtml5Macros", "nsIContentHandle" };
|
"nsHtml5Macros", "nsIContentHandle" };
|
||||||
|
|
@ -193,7 +193,7 @@ public class CppTypes {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String stringType() {
|
public String stringType() {
|
||||||
return "nsString*";
|
return "nsHtml5String";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String localType() {
|
public String localType() {
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,13 @@
|
||||||
*/
|
*/
|
||||||
package nu.validator.htmlparser.cpptranslate;
|
package nu.validator.htmlparser.cpptranslate;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import japa.parser.ast.BlockComment;
|
import japa.parser.ast.BlockComment;
|
||||||
import japa.parser.ast.CompilationUnit;
|
import japa.parser.ast.CompilationUnit;
|
||||||
import japa.parser.ast.ImportDeclaration;
|
import japa.parser.ast.ImportDeclaration;
|
||||||
|
|
@ -110,13 +117,6 @@ import japa.parser.ast.type.Type;
|
||||||
import japa.parser.ast.type.VoidType;
|
import japa.parser.ast.type.VoidType;
|
||||||
import japa.parser.ast.type.WildcardType;
|
import japa.parser.ast.type.WildcardType;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Julio Vilmar Gesser
|
* @author Julio Vilmar Gesser
|
||||||
* @author Henri Sivonen
|
* @author Henri Sivonen
|
||||||
|
|
@ -1257,6 +1257,10 @@ public class CppVisitor extends AnnotationHelperVisitor<LocalSymbolTable> {
|
||||||
&& "Portability".equals(n.getScope().toString())) {
|
&& "Portability".equals(n.getScope().toString())) {
|
||||||
n.getArgs().get(0).accept(this, arg);
|
n.getArgs().get(0).accept(this, arg);
|
||||||
printer.print(".release()");
|
printer.print(".release()");
|
||||||
|
} else if ("releaseString".equals(n.getName())
|
||||||
|
&& "Portability".equals(n.getScope().toString())) {
|
||||||
|
n.getArgs().get(0).accept(this, arg);
|
||||||
|
printer.print(".Release()");
|
||||||
} else if ("deleteArray".equals(n.getName())
|
} else if ("deleteArray".equals(n.getName())
|
||||||
&& "Portability".equals(n.getScope().toString())) {
|
&& "Portability".equals(n.getScope().toString())) {
|
||||||
printer.print("delete[] ");
|
printer.print("delete[] ");
|
||||||
|
|
@ -1554,6 +1558,7 @@ public class CppVisitor extends AnnotationHelperVisitor<LocalSymbolTable> {
|
||||||
|| n.getName().startsWith("maybeWarn")
|
|| n.getName().startsWith("maybeWarn")
|
||||||
|| n.getName().startsWith("note")
|
|| n.getName().startsWith("note")
|
||||||
|| "releaseArray".equals(n.getName())
|
|| "releaseArray".equals(n.getName())
|
||||||
|
|| "releaseString".equals(n.getName())
|
||||||
|| "deleteArray".equals(n.getName())
|
|| "deleteArray".equals(n.getName())
|
||||||
|| "delete".equals(n.getName())) {
|
|| "delete".equals(n.getName())) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue