OLD | NEW |
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 | 94 |
95 static void clearPeformanceEntries(PerformanceEntryMap& performanceEntryMap, | 95 static void clearPeformanceEntries(PerformanceEntryMap& performanceEntryMap, |
96 const String& name) { | 96 const String& name) { |
97 if (name.isNull()) { | 97 if (name.isNull()) { |
98 performanceEntryMap.clear(); | 98 performanceEntryMap.clear(); |
99 return; | 99 return; |
100 } | 100 } |
101 | 101 |
102 if (performanceEntryMap.contains(name)) | 102 if (performanceEntryMap.contains(name)) |
103 performanceEntryMap.remove(name); | 103 performanceEntryMap.erase(name); |
104 } | 104 } |
105 | 105 |
106 PerformanceEntry* UserTiming::mark(const String& markName, | 106 PerformanceEntry* UserTiming::mark(const String& markName, |
107 ExceptionState& exceptionState) { | 107 ExceptionState& exceptionState) { |
108 if (restrictedKeyMap().contains(markName)) { | 108 if (restrictedKeyMap().contains(markName)) { |
109 exceptionState.throwDOMException( | 109 exceptionState.throwDOMException( |
110 SyntaxError, "'" + markName + | 110 SyntaxError, "'" + markName + |
111 "' is part of the PerformanceTiming interface, and " | 111 "' is part of the PerformanceTiming interface, and " |
112 "cannot be used as a mark name."); | 112 "cannot be used as a mark name."); |
113 return nullptr; | 113 return nullptr; |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |