mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 18:27:35 +00:00
Fix for bug 285166: createElement crashes [@ NS_NewHTMLElement] [@
This commit is contained in:
parent
43aceb573a
commit
894e0ed85d
@ -971,6 +971,12 @@ NS_NewHTMLElement(nsIContent** aResult, nsINodeInfo *aNodeInfo)
|
||||
// Find tag in tag table
|
||||
parserService->HTMLCaseSensitiveAtomTagToId(name, &id);
|
||||
|
||||
// XXX Temporary fix for
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=285166
|
||||
if (id > NS_HTML_TAG_MAX) {
|
||||
id = eHTMLTag_userdefined;
|
||||
}
|
||||
|
||||
result = MakeContentObject(nsHTMLTag(id), aNodeInfo, nsnull,
|
||||
PR_FALSE, PR_FALSE);
|
||||
}
|
||||
@ -978,7 +984,13 @@ NS_NewHTMLElement(nsIContent** aResult, nsINodeInfo *aNodeInfo)
|
||||
// Find tag in tag table
|
||||
parserService->HTMLAtomTagToId(name, &id);
|
||||
|
||||
// Revese map id to name to get the correct character case in
|
||||
// XXX Temporary fix for
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=285166
|
||||
if (id > NS_HTML_TAG_MAX) {
|
||||
id = eHTMLTag_userdefined;
|
||||
}
|
||||
|
||||
// Reverse map id to name to get the correct character case in
|
||||
// the tag name.
|
||||
|
||||
nsCOMPtr<nsINodeInfo> kungFuDeathGrip;
|
||||
|
Loading…
Reference in New Issue
Block a user