Index: Source/web/WebPageSerializer.cpp |
diff --git a/Source/web/WebPageSerializer.cpp b/Source/web/WebPageSerializer.cpp |
index ac543d6b2c368cefdac827f7c9f1d0be2be9777d..4df430c537fe381963c7aec7df378899ca23688d 100644 |
--- a/Source/web/WebPageSerializer.cpp |
+++ b/Source/web/WebPageSerializer.cpp |
@@ -109,9 +109,10 @@ void retrieveResourcesForElement(Element* element, |
Vector<KURL>* frameURLs, |
Vector<KURL>* resourceURLs) |
{ |
+ ASSERT(element); |
// If the node is a frame, we'll process it later in retrieveResourcesForFrame. |
- if ((element->hasTagName(HTMLNames::iframeTag) || element->hasTagName(HTMLNames::frameTag) |
- || element->hasTagName(HTMLNames::objectTag) || element->hasTagName(HTMLNames::embedTag)) |
+ if ((isHTMLIFrameElement(*element) || isHTMLFrameElement(*element) |
+ || isHTMLObjectElement(*element) || isHTMLEmbedElement(*element)) |
&& element->isFrameOwnerElement()) { |
if (LocalFrame* frame = toHTMLFrameOwnerElement(element)->contentFrame()) { |
if (!visitedFrames->contains(frame)) |