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

Unified Diff: Source/core/dom/Element.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/dom/Document.cpp ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index a63bdcd3c8cbeac1ccf82cb3f5152f2dfd8e26ca..7d79c4509285dd9a56b10a3a931230cbccdaa47d 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -831,7 +831,7 @@ const AtomicString& Element::getAttributeNS(const AtomicString& namespaceURI, co
void Element::setAttribute(const AtomicString& localName, const AtomicString& value, ExceptionState& es)
{
if (!Document::isValidName(localName)) {
- es.throwDOMException(InvalidCharacterError);
+ es.throwUninformativeAndGenericDOMException(InvalidCharacterError);
return;
}
@@ -1606,7 +1606,7 @@ PassRefPtr<ShadowRoot> Element::createShadowRoot(ExceptionState& es)
// subtrees won't work well in that element. Until they are fixed, we disable
// adding author shadow root for them.
if (!areAuthorShadowsAllowed()) {
- es.throwDOMException(HierarchyRequestError);
+ es.throwUninformativeAndGenericDOMException(HierarchyRequestError);
return 0;
}
return ensureShadow()->addShadowRoot(this, ShadowRoot::AuthorShadowRoot);
@@ -1814,7 +1814,7 @@ const Vector<RefPtr<Attr> >& Element::attrNodeList()
PassRefPtr<Attr> Element::setAttributeNode(Attr* attrNode, ExceptionState& es)
{
if (!attrNode) {
- es.throwDOMException(TypeMismatchError);
+ es.throwUninformativeAndGenericDOMException(TypeMismatchError);
return 0;
}
@@ -1825,7 +1825,7 @@ PassRefPtr<Attr> Element::setAttributeNode(Attr* attrNode, ExceptionState& es)
// InUseAttributeError: Raised if node is an Attr that is already an attribute of another Element object.
// The DOM user must explicitly clone Attr nodes to re-use them in other elements.
if (attrNode->ownerElement()) {
- es.throwDOMException(InUseAttributeError);
+ es.throwUninformativeAndGenericDOMException(InUseAttributeError);
return 0;
}
@@ -1857,11 +1857,11 @@ PassRefPtr<Attr> Element::setAttributeNodeNS(Attr* attr, ExceptionState& es)
PassRefPtr<Attr> Element::removeAttributeNode(Attr* attr, ExceptionState& es)
{
if (!attr) {
- es.throwDOMException(TypeMismatchError);
+ es.throwUninformativeAndGenericDOMException(TypeMismatchError);
return 0;
}
if (attr->ownerElement() != this) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return 0;
}
@@ -1871,7 +1871,7 @@ PassRefPtr<Attr> Element::removeAttributeNode(Attr* attr, ExceptionState& es)
size_t index = elementData()->getAttrIndex(attr);
if (index == kNotFound) {
- es.throwDOMException(NotFoundError);
+ es.throwUninformativeAndGenericDOMException(NotFoundError);
return 0;
}
@@ -1890,7 +1890,7 @@ bool Element::parseAttributeName(QualifiedName& out, const AtomicString& namespa
QualifiedName qName(prefix, localName, namespaceURI);
if (!Document::hasValidNamespaceForAttributes(qName)) {
- es.throwDOMException(NamespaceError);
+ es.throwUninformativeAndGenericDOMException(NamespaceError);
return false;
}
@@ -2506,7 +2506,7 @@ RenderObject* Element::pseudoElementRenderer(PseudoId pseudoId) const
bool Element::webkitMatchesSelector(const String& selector, ExceptionState& es)
{
if (selector.isEmpty()) {
- es.throwDOMException(SyntaxError);
+ es.throwUninformativeAndGenericDOMException(SyntaxError);
return false;
}
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/MessagePort.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698