summaryrefslogtreecommitdiff
path: root/dom/performance/Performance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/performance/Performance.cpp')
-rwxr-xr-xdom/performance/Performance.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/dom/performance/Performance.cpp b/dom/performance/Performance.cpp
index f3523293a4..bf36707be8 100755
--- a/dom/performance/Performance.cpp
+++ b/dom/performance/Performance.cpp
@@ -300,6 +300,28 @@ Performance::ClearMarks(const Optional<nsAString>& aName)
ClearUserEntries(aName, NS_LITERAL_STRING("mark"));
}
+// To be removed once bug 1124165 lands
+bool
+Performance::IsPerformanceTimingAttribute(const nsAString& aName) const
+{
+ // Note that toJSON is added to this list due to bug 1047848
+ static const char* attributes[] =
+ {"navigationStart", "unloadEventStart", "unloadEventEnd", "redirectStart",
+ "redirectEnd", "fetchStart", "domainLookupStart", "domainLookupEnd",
+ "connectStart", "secureConnectionStart", "connectEnd", "requestStart", "responseStart",
+ "responseEnd", "domLoading", "domInteractive",
+ "domContentLoadedEventStart", "domContentLoadedEventEnd", "domComplete",
+ "loadEventStart", "loadEventEnd", nullptr};
+
+ for (uint32_t i = 0; attributes[i]; ++i) {
+ if (aName.EqualsASCII(attributes[i])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
DOMHighResTimeStamp
Performance::ConvertMarkToTimestampWithString(const nsAString& aName,
ErrorResult& aRv)