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

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

Issue 64113006: Rename es => exceptionState in core/dom (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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/DOMStringMap.h ('k') | Source/core/dom/DOMURL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DOMTokenList.cpp
diff --git a/Source/core/dom/DOMTokenList.cpp b/Source/core/dom/DOMTokenList.cpp
index 68bf91c224d6bf6194eaf7eb9590000899910c8b..fc815eee9bb52b453249ac874ced6ed909e64e3d 100644
--- a/Source/core/dom/DOMTokenList.cpp
+++ b/Source/core/dom/DOMTokenList.cpp
@@ -33,17 +33,17 @@
namespace WebCore {
-bool DOMTokenList::validateToken(const AtomicString& token, const char* method, ExceptionState& es)
+bool DOMTokenList::validateToken(const AtomicString& token, const char* method, ExceptionState& exceptionState)
{
if (token.isEmpty()) {
- es.throwDOMException(SyntaxError, ExceptionMessages::failedToExecute(method, "DOMTokenList", "The token provided must not be empty."));
+ exceptionState.throwDOMException(SyntaxError, ExceptionMessages::failedToExecute(method, "DOMTokenList", "The token provided must not be empty."));
return false;
}
unsigned length = token.length();
for (unsigned i = 0; i < length; ++i) {
if (isHTMLSpace<UChar>(token[i])) {
- es.throwDOMException(InvalidCharacterError, ExceptionMessages::failedToExecute(method, "DOMTokenList", "The token provided ('" + token + "') contains HTML space characters, which are not valid in tokens."));
+ exceptionState.throwDOMException(InvalidCharacterError, ExceptionMessages::failedToExecute(method, "DOMTokenList", "The token provided ('" + token + "') contains HTML space characters, which are not valid in tokens."));
return false;
}
}
@@ -51,36 +51,36 @@ bool DOMTokenList::validateToken(const AtomicString& token, const char* method,
return true;
}
-bool DOMTokenList::validateTokens(const Vector<String>& tokens, const char* method, ExceptionState& es)
+bool DOMTokenList::validateTokens(const Vector<String>& tokens, const char* method, ExceptionState& exceptionState)
{
for (size_t i = 0; i < tokens.size(); ++i) {
- if (!validateToken(tokens[i], method, es))
+ if (!validateToken(tokens[i], method, exceptionState))
return false;
}
return true;
}
-bool DOMTokenList::contains(const AtomicString& token, ExceptionState& es) const
+bool DOMTokenList::contains(const AtomicString& token, ExceptionState& exceptionState) const
{
- if (!validateToken(token, "contains", es))
+ if (!validateToken(token, "contains", exceptionState))
return false;
return containsInternal(token);
}
-void DOMTokenList::add(const AtomicString& token, ExceptionState& es)
+void DOMTokenList::add(const AtomicString& token, ExceptionState& exceptionState)
{
Vector<String> tokens;
tokens.append(token.string());
- add(tokens, es);
+ add(tokens, exceptionState);
}
-void DOMTokenList::add(const Vector<String>& tokens, ExceptionState& es)
+void DOMTokenList::add(const Vector<String>& tokens, ExceptionState& exceptionState)
{
Vector<String> filteredTokens;
filteredTokens.reserveCapacity(tokens.size());
for (size_t i = 0; i < tokens.size(); ++i) {
- if (!validateToken(tokens[i], "add", es))
+ if (!validateToken(tokens[i], "add", exceptionState))
return;
if (containsInternal(tokens[i]))
continue;
@@ -95,16 +95,16 @@ void DOMTokenList::add(const Vector<String>& tokens, ExceptionState& es)
setValue(addTokens(value(), filteredTokens));
}
-void DOMTokenList::remove(const AtomicString& token, ExceptionState& es)
+void DOMTokenList::remove(const AtomicString& token, ExceptionState& exceptionState)
{
Vector<String> tokens;
tokens.append(token.string());
- remove(tokens, es);
+ remove(tokens, exceptionState);
}
-void DOMTokenList::remove(const Vector<String>& tokens, ExceptionState& es)
+void DOMTokenList::remove(const Vector<String>& tokens, ExceptionState& exceptionState)
{
- if (!validateTokens(tokens, "remove", es))
+ if (!validateTokens(tokens, "remove", exceptionState))
return;
// Check using containsInternal first since it is a lot faster than going
@@ -121,9 +121,9 @@ void DOMTokenList::remove(const Vector<String>& tokens, ExceptionState& es)
setValue(removeTokens(value(), tokens));
}
-bool DOMTokenList::toggle(const AtomicString& token, ExceptionState& es)
+bool DOMTokenList::toggle(const AtomicString& token, ExceptionState& exceptionState)
{
- if (!validateToken(token, "toggle", es))
+ if (!validateToken(token, "toggle", exceptionState))
return false;
if (containsInternal(token)) {
@@ -134,9 +134,9 @@ bool DOMTokenList::toggle(const AtomicString& token, ExceptionState& es)
return true;
}
-bool DOMTokenList::toggle(const AtomicString& token, bool force, ExceptionState& es)
+bool DOMTokenList::toggle(const AtomicString& token, bool force, ExceptionState& exceptionState)
{
- if (!validateToken(token, "toggle", es))
+ if (!validateToken(token, "toggle", exceptionState))
return false;
if (force)
« no previous file with comments | « Source/core/dom/DOMStringMap.h ('k') | Source/core/dom/DOMURL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698