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

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

Issue 1780523005: Fix JSON serialization of PerformanceEntry subclasses (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceResourceTiming.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp
diff --git a/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp b/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp
index 0fda8c4700dd6a6b9e62ce508d220462e72049f6..18ccf424ef7002fa658a99dd43f4385466a11416 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp
+++ b/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp
@@ -31,6 +31,7 @@
#include "core/timing/PerformanceResourceTiming.h"
+#include "bindings/core/v8/V8ObjectBuilder.h"
#include "core/timing/PerformanceBase.h"
#include "platform/network/ResourceRequest.h"
#include "platform/network/ResourceResponse.h"
@@ -212,4 +213,22 @@ double PerformanceResourceTiming::responseEnd() const
return monotonicTimeToDOMHighResTimeStamp(m_timeOrigin, m_finishTime);
}
+void PerformanceResourceTiming::buildJSONValue(V8ObjectBuilder& builder) const
+{
+ PerformanceEntry::buildJSONValue(builder);
+ builder.addString("initiatorType", initiatorType());
+ builder.addNumber("workerStart", workerStart());
+ builder.addNumber("redirectStart", redirectStart());
+ builder.addNumber("redirectEnd", redirectEnd());
+ builder.addNumber("fetchStart", fetchStart());
+ builder.addNumber("domainLookupStart", domainLookupStart());
+ builder.addNumber("domainLookupEnd", domainLookupEnd());
+ builder.addNumber("connectStart", connectStart());
+ builder.addNumber("connectEnd", connectEnd());
+ builder.addNumber("secureConnectionStart", secureConnectionStart());
+ builder.addNumber("requestStart", requestStart());
+ builder.addNumber("responseStart", responseStart());
+ builder.addNumber("responseEnd", responseEnd());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceResourceTiming.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698