Avoid an accidental deletion of a static atom in the HTML5 tree builder

This commit is contained in:
Henri Sivonen 2009-03-16 17:12:21 +02:00
parent b8ec0e3dcd
commit 4a1c16d1a1
3 changed files with 2 additions and 6 deletions

View File

@ -1,5 +1,4 @@
HTML5_ATOM(emptystring, "")
HTML5_ATOM(html, "html")
HTML5_ATOM(title, "title")
HTML5_ATOM(textarea, "textarea")
HTML5_ATOM(style, "style")
@ -24,6 +23,7 @@ HTML5_ATOM(ruby, "ruby")
HTML5_ATOM(optgroup, "optgroup")
HTML5_ATOM(frameset, "frameset")
HTML5_ATOM(select, "select")
HTML5_ATOM(html, "html")
HTML5_ATOM(td, "td")
HTML5_ATOM(th, "th")
HTML5_ATOM(tr, "tr")

View File

@ -2717,7 +2717,7 @@ nsHtml5TreeBuilder::isQuirky(nsIAtom* name, nsString* publicIdentifier, nsString
if (forceQuirks) {
return PR_TRUE;
}
if (name != HTML_LOCAL) {
if (name != nsHtml5Atoms::html) {
return PR_TRUE;
}
if (!!publicIdentifier) {
@ -3655,7 +3655,6 @@ nsHtml5TreeBuilder::initializeStatics()
QUIRKY_PUBLIC_IDS[52] = nsHtml5StringLiterals::___w3o__dtd_w3_html_3_0__;
QUIRKY_PUBLIC_IDS[53] = nsHtml5StringLiterals::___webtechs__dtd_mozilla_html_2_0__;
QUIRKY_PUBLIC_IDS[54] = nsHtml5StringLiterals::___webtechs__dtd_mozilla_html__;
HTML_LOCAL = nsHtml5Atoms::html;
}
void
@ -3663,7 +3662,6 @@ nsHtml5TreeBuilder::releaseStatics()
{
ISINDEX_PROMPT.release();
QUIRKY_PUBLIC_IDS.release();
delete HTML_LOCAL;
}

View File

@ -67,7 +67,6 @@ class nsHtml5TreeBuilder
private:
static jArray<PRUnichar,PRInt32> ISINDEX_PROMPT;
static jArray<nsString*,PRInt32> QUIRKY_PUBLIC_IDS;
static nsIAtom* HTML_LOCAL;
PRInt32 mode;
PRInt32 originalMode;
PRInt32 foreignFlag;
@ -205,7 +204,6 @@ class nsHtml5TreeBuilder
#ifdef nsHtml5TreeBuilder_cpp__
jArray<nsString*,PRInt32> nsHtml5TreeBuilder::QUIRKY_PUBLIC_IDS = nsnull;
nsIAtom* nsHtml5TreeBuilder::HTML_LOCAL = nsnull;
#endif
#define NS_HTML5TREE_BUILDER_OTHER 0