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

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceBase.cpp

Issue 2610063006: Create TaskAttributionTiming PerformanceEntry for attribution in PerformanceLongTaskTiming. Move cu… (Closed)
Patch Set: update layout test expectation Created 3 years, 11 months 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
Index: third_party/WebKit/Source/core/timing/PerformanceBase.cpp
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
index aa49b288243b451cf35a4f9024895baed6f96337..660507eee11d03eae3d5bff86da2a268791a26b1 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
@@ -133,12 +133,6 @@ PerformanceEntryVector PerformanceBase::getEntriesByType(
PerformanceEntry::toEntryTypeEnum(entryType);
switch (type) {
- case PerformanceEntry::Invalid:
- return entries;
- case PerformanceEntry::LongTask:
- // Unsupported for LongTask. Per the spec, Long task entries can only be
- // accessed via Performance Observer. No separate buffer is maintained.
- return entries;
case PerformanceEntry::Resource:
for (const auto& resource : m_resourceTimingBuffer)
entries.append(resource);
@@ -163,6 +157,15 @@ PerformanceEntryVector PerformanceBase::getEntriesByType(
if (m_userTiming)
entries.appendVector(m_userTiming->getMeasures());
break;
+ // Unsupported for LongTask, TaskAttribution.
+ // Per the spec, these entries can only be accessed via
+ // Performance Observer. No separate buffer is maintained.
+ case PerformanceEntry::LongTask:
+ break;
+ case PerformanceEntry::TaskAttribution:
+ break;
+ case PerformanceEntry::Invalid:
+ break;
Yoav Weiss 2017/01/06 10:13:05 Hmm, this is according to spec: https://w3c.github
}
std::sort(entries.begin(), entries.end(),
@@ -428,15 +431,15 @@ bool PerformanceBase::isFrameTimingBufferFull() {
void PerformanceBase::addLongTaskTiming(double startTime,
double endTime,
const String& name,
- const String& culpritFrameSrc,
- const String& culpritFrameId,
- const String& culpritFrameName) {
+ const String& frameSrc,
+ const String& frameId,
+ const String& frameName) {
if (!hasObserverFor(PerformanceEntry::LongTask))
return;
PerformanceEntry* entry = PerformanceLongTaskTiming::create(
monotonicTimeToDOMHighResTimeStamp(startTime),
- monotonicTimeToDOMHighResTimeStamp(endTime), name, culpritFrameSrc,
- culpritFrameId, culpritFrameName);
+ monotonicTimeToDOMHighResTimeStamp(endTime), name, frameSrc, frameId,
+ frameName);
notifyObserversOfEntry(*entry);
}
« no previous file with comments | « third_party/WebKit/Source/core/timing/BUILD.gn ('k') | third_party/WebKit/Source/core/timing/PerformanceEntry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698