Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1210)

Unified Diff: Source/core/xml/XMLSerializer.cpp

Issue 23717008: Remove useless null checks from Node::document() call sites (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGElementRareData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/xml/XMLSerializer.cpp
diff --git a/Source/core/xml/XMLSerializer.cpp b/Source/core/xml/XMLSerializer.cpp
index 3b05636498101f6b56da2300ff74215d465b2543..74be0eac04d0ad7be681906498fadc422cf5efa2 100644
--- a/Source/core/xml/XMLSerializer.cpp
+++ b/Source/core/xml/XMLSerializer.cpp
@@ -33,16 +33,6 @@ String XMLSerializer::serializeToString(Node* node, ExceptionState& es)
if (!node)
return String();
- if (!node->document()) {
- // Due to the fact that DocumentType nodes are created by the DOMImplementation
- // and not the Document, it is possible for it to not have a Document associated
- // with it. It should be the only type of node where this is possible.
- ASSERT(node->nodeType() == Node::DOCUMENT_TYPE_NODE);
-
- es.throwDOMException(InvalidAccessError);
- return String();
- }
-
return createMarkup(node);
}
« no previous file with comments | « Source/core/svg/SVGElementRareData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698