Index: Source/core/page/Performance.cpp |
diff --git a/Source/core/page/Performance.cpp b/Source/core/page/Performance.cpp |
index 0d9b274dfcd630d9e6c74e934b44f3328be20b94..2fa57a2da122d957f586ad186a2fa7dec83d669c 100644 |
--- a/Source/core/page/Performance.cpp |
+++ b/Source/core/page/Performance.cpp |
@@ -55,6 +55,11 @@ Performance::Performance(Frame* frame) |
, m_resourceTimingBufferSize(defaultResourceTimingBufferSize) |
, m_userTiming(0) |
{ |
+ ASSERT(m_frame); |
+ ASSERT(m_frame->document()); |
+ ASSERT(m_frame->document()->loader()); |
+ ASSERT(m_frame->document()->loader()->timing()->referenceMonotonicTime()); |
+ m_referenceTime = m_frame->document()->loader()->timing()->referenceMonotonicTime(); |
tonyg
2013/08/23 00:01:06
I don't think the asserts are going to teach you a
|
ScriptWrappable::init(this); |
} |
@@ -286,7 +291,7 @@ void Performance::clearMeasures(const String& measureName) |
double Performance::now() const |
{ |
- return 1000.0 * m_frame->document()->loader()->timing()->monotonicTimeToZeroBasedDocumentTime(monotonicallyIncreasingTime()); |
+ return 1000.0 * (monotonicallyIncreasingTime() - m_referenceTime); |
} |
} // namespace WebCore |