Sometimes WebCore cast elements to HTMLUnknownElement. But it can cause a trouble which is hard to diagnose. We can add some mechanism to detect such wrong usages.
Created attachment 130037 [details] Patch
Comment on attachment 130037 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=130037&action=review > Source/WebCore/html/HTMLUnknownElement.h:57 > + ASSERT(!element || element->isHTMLUnknownElement()); Why this function accept element==0 though toMathMLElement() and toSVGElement() don't?
Created attachment 130039 [details] Patch
Comment on attachment 130037 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=130037&action=review Kent-san, thanks for the quick response! Could you taker another look? I updated it. >> Source/WebCore/html/HTMLUnknownElement.h:57 >> + ASSERT(!element || element->isHTMLUnknownElement()); > > Why this function accept element==0 though toMathMLElement() and toSVGElement() don't? Good catch! Actually this one is correct. We want to allow null to be casted.
Comment on attachment 130039 [details] Patch ok
Created attachment 130042 [details] Patch for landing
Comment on attachment 130042 [details] Patch for landing Clearing flags on attachment: 130042 Committed r109702: <http://trac.webkit.org/changeset/109702>
All reviewed patches have been landed. Closing bug.