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

Side by Side Diff: third_party/WebKit/Source/core/timing/Performance.cpp

Issue 2390863002: Replace InspectedFrames::root with pointer to directly stored LocalFrame (Closed)
Patch Set: sync to head Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorWebPerfAgentTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 PerformanceTiming* Performance::timing() const { 80 PerformanceTiming* Performance::timing() const {
81 if (!m_timing) 81 if (!m_timing)
82 m_timing = PerformanceTiming::create(frame()); 82 m_timing = PerformanceTiming::create(frame());
83 83
84 return m_timing.get(); 84 return m_timing.get();
85 } 85 }
86 86
87 void Performance::updateLongTaskInstrumentation() { 87 void Performance::updateLongTaskInstrumentation() {
88 if (hasObserverFor(PerformanceEntry::LongTask) && !m_longTaskInspectorAgent) { 88 if (hasObserverFor(PerformanceEntry::LongTask) && !m_longTaskInspectorAgent) {
89 m_longTaskInspectorAgent = 89 m_longTaskInspectorAgent = new InspectorWebPerfAgent(frame());
90 new InspectorWebPerfAgent(InspectedFrames::create(frame()));
91 m_longTaskInspectorAgent->enable(); 90 m_longTaskInspectorAgent->enable();
92 } else if (!hasObserverFor(PerformanceEntry::LongTask) && 91 } else if (!hasObserverFor(PerformanceEntry::LongTask) &&
93 m_longTaskInspectorAgent) { 92 m_longTaskInspectorAgent) {
94 m_longTaskInspectorAgent->disable(); 93 m_longTaskInspectorAgent->disable();
95 m_longTaskInspectorAgent = nullptr; 94 m_longTaskInspectorAgent = nullptr;
96 } 95 }
97 } 96 }
98 97
99 DEFINE_TRACE(Performance) { 98 DEFINE_TRACE(Performance) {
100 visitor->trace(m_navigation); 99 visitor->trace(m_navigation);
101 visitor->trace(m_timing); 100 visitor->trace(m_timing);
102 visitor->trace(m_longTaskInspectorAgent); 101 visitor->trace(m_longTaskInspectorAgent);
103 DOMWindowProperty::trace(visitor); 102 DOMWindowProperty::trace(visitor);
104 PerformanceBase::trace(visitor); 103 PerformanceBase::trace(visitor);
105 } 104 }
106 105
107 } // namespace blink 106 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InspectorWebPerfAgentTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698