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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/css/MediaList.cpp ('k') | Source/core/dom/CustomElementException.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 90240809e8c6a21176a52c3d228d33db50a65b2a..dd9f85d3e7ed5901b8ade57106d3fdc5d1ab2961 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -144,7 +144,7 @@ static inline bool checkAcceptChild(ContainerNode* newParent, Node* newChild, No
{
// Not mentioned in spec: throw NotFoundError if newChild is null
if (!newChild) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return false;
}
@@ -153,7 +153,7 @@ static inline bool checkAcceptChild(ContainerNode* newParent, Node* newChild, No
ASSERT(!newParent->isDocumentTypeNode());
ASSERT(isChildTypeAllowed(newParent, newChild));
if (containsConsideringHostElements(newChild, newParent)) {
- es.throwDOMException(HierarchyRequestError);
+ es.throwUninformativeAndGenericDOMException(HierarchyRequestError);
return false;
}
return true;
@@ -162,22 +162,22 @@ static inline bool checkAcceptChild(ContainerNode* newParent, Node* newChild, No
// This should never happen, but also protect release builds from tree corruption.
ASSERT(!newChild->isPseudoElement());
if (newChild->isPseudoElement()) {
- es.throwDOMException(HierarchyRequestError);
+ es.throwUninformativeAndGenericDOMException(HierarchyRequestError);
return false;
}
if (containsConsideringHostElements(newChild, newParent)) {
- es.throwDOMException(HierarchyRequestError);
+ es.throwUninformativeAndGenericDOMException(HierarchyRequestError);
return false;
}
if (oldChild && newParent->isDocumentNode()) {
if (!toDocument(newParent)->canReplaceChild(newChild, oldChild)) {
- es.throwDOMException(HierarchyRequestError);
+ es.throwUninformativeAndGenericDOMException(HierarchyRequestError);
return false;
}
} else if (!isChildTypeAllowed(newParent, newChild)) {
- es.throwDOMException(HierarchyRequestError);
+ es.throwUninformativeAndGenericDOMException(HierarchyRequestError);
return false;
}
@@ -189,7 +189,7 @@ static inline bool checkAcceptChildGuaranteedNodeTypes(ContainerNode* newParent,
ASSERT(!newParent->isDocumentTypeNode());
ASSERT(isChildTypeAllowed(newParent, newChild));
if (newChild->contains(newParent)) {
- es.throwDOMException(HierarchyRequestError);
+ es.throwUninformativeAndGenericDOMException(HierarchyRequestError);
return false;
}
@@ -226,7 +226,7 @@ void ContainerNode::insertBefore(PassRefPtr<Node> newChild, Node* refChild, Exce
// NotFoundError: Raised if refChild is not a child of this node
if (refChild->parentNode() != this) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return;
}
@@ -334,7 +334,7 @@ void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
return;
if (!oldChild) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return;
}
@@ -344,7 +344,7 @@ void ContainerNode::replaceChild(PassRefPtr<Node> newChild, Node* oldChild, Exce
// NotFoundError: Raised if oldChild is not a child of this node.
if (oldChild->parentNode() != this) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return;
}
@@ -451,7 +451,7 @@ void ContainerNode::removeChild(Node* oldChild, ExceptionState& es)
// NotFoundError: Raised if oldChild is not a child of this node.
if (!oldChild || oldChild->parentNode() != this) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return;
}
@@ -465,7 +465,7 @@ void ContainerNode::removeChild(Node* oldChild, ExceptionState& es)
// Events fired when blurring currently focused node might have moved this
// child into a different parent.
if (child->parentNode() != this) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return;
}
@@ -473,7 +473,7 @@ void ContainerNode::removeChild(Node* oldChild, ExceptionState& es)
// Mutation events might have moved this child into a different parent.
if (child->parentNode() != this) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return;
}
« no previous file with comments | « Source/core/css/MediaList.cpp ('k') | Source/core/dom/CustomElementException.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698