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

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

Issue 131113003: Fix DOMWindow::isCurrentlyDisplayedInFrame to return false when detached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix ScreenOrientation + test window.open. Created 6 years, 10 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
Index: Source/core/timing/Performance.cpp
diff --git a/Source/core/timing/Performance.cpp b/Source/core/timing/Performance.cpp
index 03375719a1fd5fded3fbbd5ff929331ab762dc7a..f3decc441656b93385a8321bf7d2773d642f2ba7 100644
--- a/Source/core/timing/Performance.cpp
+++ b/Source/core/timing/Performance.cpp
@@ -48,10 +48,9 @@ static const size_t defaultResourceTimingBufferSize = 150;
Performance::Performance(LocalFrame* frame)
: DOMWindowProperty(frame)
, m_resourceTimingBufferSize(defaultResourceTimingBufferSize)
- , m_referenceTime(frame->document()->loader()->timing()->referenceMonotonicTime())
+ , m_referenceTime(frame->host() ? frame->document()->loader()->timing()->referenceMonotonicTime() : 0.0)
, m_userTiming(nullptr)
{
- ASSERT(m_referenceTime);
ScriptWrappable::init(this);
}

Powered by Google App Engine
This is Rietveld 408576698