Commit 493e890b authored by Tom McKee's avatar Tom McKee Committed by Commit Bot

Avoid copying by using 'find()' instead of 'at()'

Bug: 943732
Change-Id: I7b8566db4dfd7e62c369f685f0d21c1644ce1cc1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2050607Reviewed-by: default avatarYoav Weiss <yoavweiss@chromium.org>
Commit-Queue: Tom McKee <tommckee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#741468}
parent 15ea2923
...@@ -114,8 +114,11 @@ void UserTiming::ClearMarks(const AtomicString& mark_name) { ...@@ -114,8 +114,11 @@ void UserTiming::ClearMarks(const AtomicString& mark_name) {
double UserTiming::FindExistingMarkStartTime(const AtomicString& mark_name, double UserTiming::FindExistingMarkStartTime(const AtomicString& mark_name,
ExceptionState& exception_state) { ExceptionState& exception_state) {
if (marks_map_.Contains(mark_name)) PerformanceEntryMap::const_iterator existing_marks =
return marks_map_.at(mark_name).back()->startTime(); marks_map_.find(mark_name);
if (existing_marks != marks_map_.end()) {
return existing_marks->value.back()->startTime();
}
PerformanceTiming::PerformanceTimingGetter timing_function = PerformanceTiming::PerformanceTimingGetter timing_function =
PerformanceTiming::GetAttributeMapping().at(mark_name); PerformanceTiming::GetAttributeMapping().at(mark_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment