Index: Source/core/page/Performance.cpp |
diff --git a/Source/core/page/Performance.cpp b/Source/core/page/Performance.cpp |
index 0d9b274dfcd630d9e6c74e934b44f3328be20b94..c77484c46f696cdd180a1cb613d8e9f0bfe55452 100644 |
--- a/Source/core/page/Performance.cpp |
+++ b/Source/core/page/Performance.cpp |
@@ -54,7 +54,9 @@ Performance::Performance(Frame* frame) |
: DOMWindowProperty(frame) |
, m_resourceTimingBufferSize(defaultResourceTimingBufferSize) |
, m_userTiming(0) |
+ , m_referenceTime(frame->document()->loader()->timing()->referenceMonotonicTime()) |
{ |
+ ASSERT(m_referenceTime); |
ScriptWrappable::init(this); |
} |
@@ -286,7 +288,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 |