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

Unified Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry 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/inspector/InspectorCSSAgent.cpp ('k') | Source/core/inspector/InspectorDOMStorageAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 9af78cca9ea467b7a9c8c467f6cce196f32d073f..fc23569dd775c4b0bb50cec4f47753cb3c909f11 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -220,10 +220,10 @@ void RevalidateStyleAttributeTask::onTimer(Timer<RevalidateStyleAttributeTask>*)
m_elements.clear();
}
-String InspectorDOMAgent::toErrorString(ExceptionState& es)
+String InspectorDOMAgent::toErrorString(ExceptionState& exceptionState)
{
- if (es.hadException())
- return DOMException::getErrorName(es.code());
+ if (exceptionState.hadException())
+ return DOMException::getErrorName(exceptionState.code());
return "";
}
@@ -567,9 +567,9 @@ void InspectorDOMAgent::querySelector(ErrorString* errorString, int nodeId, cons
if (!node)
return;
- TrackExceptionState es;
- RefPtr<Element> element = node->querySelector(selectors, es);
- if (es.hadException()) {
+ TrackExceptionState exceptionState;
+ RefPtr<Element> element = node->querySelector(selectors, exceptionState);
+ if (exceptionState.hadException()) {
*errorString = "DOM Error while querying";
return;
}
@@ -584,9 +584,9 @@ void InspectorDOMAgent::querySelectorAll(ErrorString* errorString, int nodeId, c
if (!node)
return;
- TrackExceptionState es;
- RefPtr<NodeList> nodes = node->querySelectorAll(selectors, es);
- if (es.hadException()) {
+ TrackExceptionState exceptionState;
+ RefPtr<NodeList> nodes = node->querySelectorAll(selectors, exceptionState);
+ if (exceptionState.hadException()) {
*errorString = "DOM Error while querying";
return;
}
@@ -767,9 +767,9 @@ void InspectorDOMAgent::setNodeName(ErrorString* errorString, int nodeId, const
if (!oldNode || !oldNode->isElementNode())
return;
- TrackExceptionState es;
- RefPtr<Element> newElem = oldNode->document().createElement(tagName, es);
- if (es.hadException())
+ TrackExceptionState exceptionState;
+ RefPtr<Element> newElem = oldNode->document().createElement(tagName, exceptionState);
+ if (exceptionState.hadException())
return;
// Copy over the original node's attributes.
@@ -1003,15 +1003,15 @@ void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrim
// XPath evaluation
for (Vector<Document*>::iterator it = docs.begin(); it != docs.end(); ++it) {
Document* document = *it;
- TrackExceptionState es;
- RefPtr<XPathResult> result = DocumentXPathEvaluator::evaluate(document, whitespaceTrimmedQuery, document, 0, XPathResult::ORDERED_NODE_SNAPSHOT_TYPE, 0, es);
- if (es.hadException() || !result)
+ TrackExceptionState exceptionState;
+ RefPtr<XPathResult> result = DocumentXPathEvaluator::evaluate(document, whitespaceTrimmedQuery, document, 0, XPathResult::ORDERED_NODE_SNAPSHOT_TYPE, 0, exceptionState);
+ if (exceptionState.hadException() || !result)
continue;
- unsigned long size = result->snapshotLength(es);
- for (unsigned long i = 0; !es.hadException() && i < size; ++i) {
- Node* node = result->snapshotItem(i, es);
- if (es.hadException())
+ unsigned long size = result->snapshotLength(exceptionState);
+ for (unsigned long i = 0; !exceptionState.hadException() && i < size; ++i) {
+ Node* node = result->snapshotItem(i, exceptionState);
+ if (exceptionState.hadException())
break;
if (node->nodeType() == Node::ATTRIBUTE_NODE)
@@ -1023,9 +1023,9 @@ void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrim
// Selector evaluation
for (Vector<Document*>::iterator it = docs.begin(); it != docs.end(); ++it) {
Document* document = *it;
- TrackExceptionState es;
- RefPtr<NodeList> nodeList = document->querySelectorAll(whitespaceTrimmedQuery, es);
- if (es.hadException() || !nodeList)
+ TrackExceptionState exceptionState;
+ RefPtr<NodeList> nodeList = document->querySelectorAll(whitespaceTrimmedQuery, exceptionState);
+ if (exceptionState.hadException() || !nodeList)
continue;
unsigned size = nodeList->length();
@@ -1282,16 +1282,16 @@ void InspectorDOMAgent::moveTo(ErrorString* errorString, int nodeId, int targetE
void InspectorDOMAgent::undo(ErrorString* errorString)
{
- TrackExceptionState es;
- m_history->undo(es);
- *errorString = InspectorDOMAgent::toErrorString(es);
+ TrackExceptionState exceptionState;
+ m_history->undo(exceptionState);
+ *errorString = InspectorDOMAgent::toErrorString(exceptionState);
}
void InspectorDOMAgent::redo(ErrorString* errorString)
{
- TrackExceptionState es;
- m_history->redo(es);
- *errorString = InspectorDOMAgent::toErrorString(es);
+ TrackExceptionState exceptionState;
+ m_history->redo(exceptionState);
+ *errorString = InspectorDOMAgent::toErrorString(exceptionState);
}
void InspectorDOMAgent::markUndoableState(ErrorString*)
« no previous file with comments | « Source/core/inspector/InspectorCSSAgent.cpp ('k') | Source/core/inspector/InspectorDOMStorageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698