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

Unified Diff: Source/core/timing/Performance.cpp

Issue 693483004: Enable Oilpan for core/timing/. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: de-weakify Performance::m_memoryInfo Created 5 years, 8 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 | « Source/core/timing/Performance.h ('k') | Source/core/timing/PerformanceEntry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/timing/Performance.cpp
diff --git a/Source/core/timing/Performance.cpp b/Source/core/timing/Performance.cpp
index 855275a94b95437be0845069d849f3c51c43c110..d77fb4f89bafb71539aacea2bbfe668d6326aee2 100644
--- a/Source/core/timing/Performance.cpp
+++ b/Source/core/timing/Performance.cpp
@@ -36,9 +36,13 @@
#include "core/events/Event.h"
#include "core/frame/LocalFrame.h"
#include "core/loader/DocumentLoader.h"
-#include "core/timing/ResourceTimingInfo.h"
+#include "core/timing/MemoryInfo.h"
+#include "core/timing/PerformanceEntry.h"
+#include "core/timing/PerformanceNavigation.h"
#include "core/timing/PerformanceResourceTiming.h"
+#include "core/timing/PerformanceTiming.h"
#include "core/timing/PerformanceUserTiming.h"
+#include "core/timing/ResourceTimingInfo.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "wtf/CurrentTime.h"
@@ -70,9 +74,11 @@ ExecutionContext* Performance::executionContext() const
return frame()->document();
}
-PassRefPtrWillBeRawPtr<MemoryInfo> Performance::memory() const
+MemoryInfo* Performance::memory()
{
- return MemoryInfo::create();
+ if (!m_memoryInfo)
+ m_memoryInfo = MemoryInfo::create();
+ return m_memoryInfo.get();
}
PerformanceNavigation* Performance::navigation() const
@@ -209,7 +215,7 @@ void Performance::addResourceTiming(const ResourceTimingInfo& info, Document* in
double startTime = info.initialTime();
if (info.redirectChain().isEmpty()) {
- RefPtrWillBeRawPtr<PerformanceEntry> entry = PerformanceResourceTiming::create(info, initiatorDocument, startTime, allowTimingDetails);
+ PerformanceEntry* entry = PerformanceResourceTiming::create(info, initiatorDocument, startTime, allowTimingDetails);
addResourceTimingBuffer(entry);
return;
}
@@ -228,11 +234,11 @@ void Performance::addResourceTiming(const ResourceTimingInfo& info, Document* in
ASSERT(lastRedirectTiming);
double lastRedirectEndTime = lastRedirectTiming->receiveHeadersEnd();
- RefPtrWillBeRawPtr<PerformanceEntry> entry = PerformanceResourceTiming::create(info, initiatorDocument, startTime, lastRedirectEndTime, allowTimingDetails, allowRedirectDetails);
+ PerformanceEntry* entry = PerformanceResourceTiming::create(info, initiatorDocument, startTime, lastRedirectEndTime, allowTimingDetails, allowRedirectDetails);
addResourceTimingBuffer(entry);
}
-void Performance::addResourceTimingBuffer(PassRefPtrWillBeRawPtr<PerformanceEntry> entry)
+void Performance::addResourceTimingBuffer(PerformanceEntry* entry)
{
m_resourceTimingBuffer.append(entry);
@@ -283,6 +289,7 @@ DEFINE_TRACE(Performance)
visitor->trace(m_navigation);
visitor->trace(m_timing);
visitor->trace(m_resourceTimingBuffer);
+ visitor->trace(m_memoryInfo);
visitor->trace(m_userTiming);
EventTargetWithInlineData::trace(visitor);
DOMWindowProperty::trace(visitor);
« no previous file with comments | « Source/core/timing/Performance.h ('k') | Source/core/timing/PerformanceEntry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698