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

Unified Diff: Source/core/timing/PerformanceUserTiming.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/timing/Performance.cpp ('k') | Source/core/workers/AbstractWorker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/timing/PerformanceUserTiming.cpp
diff --git a/Source/core/timing/PerformanceUserTiming.cpp b/Source/core/timing/PerformanceUserTiming.cpp
index 997e15c6491459fbe98b70291cb41577a66a9cd5..d31f00015d68fe44387467b45523d05180e9e938 100644
--- a/Source/core/timing/PerformanceUserTiming.cpp
+++ b/Source/core/timing/PerformanceUserTiming.cpp
@@ -99,10 +99,10 @@ static void clearPeformanceEntries(PerformanceEntryMap& performanceEntryMap, con
performanceEntryMap.remove(name);
}
-void UserTiming::mark(const String& markName, ExceptionState& es)
+void UserTiming::mark(const String& markName, ExceptionState& exceptionState)
{
if (restrictedKeyMap().contains(markName)) {
- es.throwDOMException(SyntaxError, "'" + markName + "' is part of the PerformanceTiming interface, and cannot be used as a mark name.");
+ exceptionState.throwDOMException(SyntaxError, "'" + markName + "' is part of the PerformanceTiming interface, and cannot be used as a mark name.");
return;
}
@@ -116,7 +116,7 @@ void UserTiming::clearMarks(const String& markName)
clearPeformanceEntries(m_marksMap, markName);
}
-double UserTiming::findExistingMarkStartTime(const String& markName, ExceptionState& es)
+double UserTiming::findExistingMarkStartTime(const String& markName, ExceptionState& exceptionState)
{
if (m_marksMap.contains(markName))
return m_marksMap.get(markName).last()->startTime();
@@ -124,17 +124,17 @@ double UserTiming::findExistingMarkStartTime(const String& markName, ExceptionSt
if (restrictedKeyMap().contains(markName)) {
double value = static_cast<double>((m_performance->timing()->*(restrictedKeyMap().get(markName)))());
if (!value) {
- es.throwDOMException(InvalidAccessError, "'" + markName + "' is empty: either the event hasn't happened yet, or it would provide cross-origin timing information.");
+ exceptionState.throwDOMException(InvalidAccessError, "'" + markName + "' is empty: either the event hasn't happened yet, or it would provide cross-origin timing information.");
return 0.0;
}
return value - m_performance->timing()->navigationStart();
}
- es.throwDOMException(SyntaxError, "The mark '" + markName + "' does not exist.");
+ exceptionState.throwDOMException(SyntaxError, "The mark '" + markName + "' does not exist.");
return 0.0;
}
-void UserTiming::measure(const String& measureName, const String& startMark, const String& endMark, ExceptionState& es)
+void UserTiming::measure(const String& measureName, const String& startMark, const String& endMark, ExceptionState& exceptionState)
{
double startTime = 0.0;
double endTime = 0.0;
@@ -143,15 +143,15 @@ void UserTiming::measure(const String& measureName, const String& startMark, con
endTime = m_performance->now();
else if (endMark.isNull()) {
endTime = m_performance->now();
- startTime = findExistingMarkStartTime(startMark, es);
- if (es.hadException())
+ startTime = findExistingMarkStartTime(startMark, exceptionState);
+ if (exceptionState.hadException())
return;
} else {
- endTime = findExistingMarkStartTime(endMark, es);
- if (es.hadException())
+ endTime = findExistingMarkStartTime(endMark, exceptionState);
+ if (exceptionState.hadException())
return;
- startTime = findExistingMarkStartTime(startMark, es);
- if (es.hadException())
+ startTime = findExistingMarkStartTime(startMark, exceptionState);
+ if (exceptionState.hadException())
return;
}
« no previous file with comments | « Source/core/timing/Performance.cpp ('k') | Source/core/workers/AbstractWorker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698