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

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

Issue 2478363003: PerformanceMonitor: do not leak performance objects through the monitor. (Closed)
Patch Set: rebaselined Created 4 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/timing/Performance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/timing/Performance.cpp
diff --git a/third_party/WebKit/Source/core/timing/Performance.cpp b/third_party/WebKit/Source/core/timing/Performance.cpp
index 0a6f2c9b45f4aa8ad9be010818929de0c224a6fb..2bf1572d39744af76477cc2abd9896f37417d6d7 100644
--- a/third_party/WebKit/Source/core/timing/Performance.cpp
+++ b/third_party/WebKit/Source/core/timing/Performance.cpp
@@ -61,7 +61,13 @@ Performance::Performance(LocalFrame* frame)
: PerformanceBase(toTimeOrigin(frame)), DOMWindowProperty(frame) {}
Performance::~Performance() {
+ if (frame())
+ PerformanceMonitor::performanceObserverRemoved(this);
+}
+
+void Performance::frameDestroyed() {
PerformanceMonitor::performanceObserverRemoved(this);
+ DOMWindowProperty::frameDestroyed();
}
ExecutionContext* Performance::getExecutionContext() const {
« no previous file with comments | « third_party/WebKit/Source/core/timing/Performance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698