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

Unified Diff: Source/core/frame/Frame.cpp

Issue 390193003: [not for review] Add Draw entries to window Performance Timeline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Git pull Created 6 years, 5 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/frame/Frame.cpp
diff --git a/Source/core/frame/Frame.cpp b/Source/core/frame/Frame.cpp
index f3b756c49ab99af3821ed84e453db9e427d38231..58707e3fba00b5c77294e5b74e2e0df716103e0a 100644
--- a/Source/core/frame/Frame.cpp
+++ b/Source/core/frame/Frame.cpp
@@ -56,6 +56,18 @@ namespace blink {
using namespace HTMLNames;
+namespace {
+
+int64_t generateFrameID()
enne (OOO) 2014/07/22 20:45:26 style nit: FrameID => FrameId Does Blink have som
+{
+ // Initialize to the current time to reduce the likelihood of generating
+ // identifiers that overlap with those from past/future browser sessions.
+ static int64_t next = static_cast<int64_t>(currentTime() * 1000000.0);
+ return ++next;
+}
+
+} // namespace
+
DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, frameCounter, ("Frame"));
Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
@@ -63,6 +75,7 @@ Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner)
, m_host(host)
, m_owner(owner)
, m_client(client)
+ , m_frameID(generateFrameID())
, m_remotePlatformLayer(0)
{
ASSERT(page());

Powered by Google App Engine
This is Rietveld 408576698