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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceUserTiming.cpp

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Intel Inc. All rights reserved. 2 * Copyright (C) 2012 Intel Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 return entry; 124 return entry;
125 } 125 }
126 126
127 void UserTiming::clearMarks(const String& markName) { 127 void UserTiming::clearMarks(const String& markName) {
128 clearPeformanceEntries(m_marksMap, markName); 128 clearPeformanceEntries(m_marksMap, markName);
129 } 129 }
130 130
131 double UserTiming::findExistingMarkStartTime(const String& markName, 131 double UserTiming::findExistingMarkStartTime(const String& markName,
132 ExceptionState& exceptionState) { 132 ExceptionState& exceptionState) {
133 if (m_marksMap.contains(markName)) 133 if (m_marksMap.contains(markName))
134 return m_marksMap.get(markName).last()->startTime(); 134 return m_marksMap.get(markName).back()->startTime();
135 135
136 if (restrictedKeyMap().contains(markName) && m_performance->timing()) { 136 if (restrictedKeyMap().contains(markName) && m_performance->timing()) {
137 double value = static_cast<double>( 137 double value = static_cast<double>(
138 (m_performance->timing()->*(restrictedKeyMap().get(markName)))()); 138 (m_performance->timing()->*(restrictedKeyMap().get(markName)))());
139 if (!value) { 139 if (!value) {
140 exceptionState.throwDOMException( 140 exceptionState.throwDOMException(
141 InvalidAccessError, "'" + markName + 141 InvalidAccessError, "'" + markName +
142 "' is empty: either the event hasn't " 142 "' is empty: either the event hasn't "
143 "happened yet, or it would provide " 143 "happened yet, or it would provide "
144 "cross-origin timing information."); 144 "cross-origin timing information.");
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return getEntrySequenceByName(m_measuresMap, name); 245 return getEntrySequenceByName(m_measuresMap, name);
246 } 246 }
247 247
248 DEFINE_TRACE(UserTiming) { 248 DEFINE_TRACE(UserTiming) {
249 visitor->trace(m_performance); 249 visitor->trace(m_performance);
250 visitor->trace(m_marksMap); 250 visitor->trace(m_marksMap);
251 visitor->trace(m_measuresMap); 251 visitor->trace(m_measuresMap);
252 } 252 }
253 253
254 } // namespace blink 254 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698