[Webkit-unassigned] [Bug 19470] Null pointer dereferences on a document with no documentElement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 13 14:06:45 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=19470


darin at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #21687|review?                     |review+
               Flag|                            |




------- Comment #6 from darin at apple.com  2008-06-13 14:06 PDT -------
(From update of attachment 21687)
Looks fine. There are various small problems such as:

+        * LayoutTests\fast\dom\documentElement-null-expected.txt: Added.

Slashes are backwards here. Paths are from the top level, but should be
relative to the ChangeLog file. LayoutTests needs its own separate ChangeLog
file, not entries in the WebCore ChangeLog file.

+            if (const Element *doc = static_cast<const Document
*>(this)->documentElement())
+                return doc->lookupPrefix(namespaceURI);
+            return String();

We put the * next to the type name, although the old code didn't do that. The
newly added braces aren't needed -- the if statement already scopes the
variable declared inside it.

I'd also suggest changing documentElement-null.html to create a document and
put a message in at the end indicating success.

But I think the patch is good enough as-is that I'm going to review+ it. The
person landing it can probably fix a few things, or someone could do a new
patch.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list