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

Unified Diff: content/browser/power_profiler/power_profiler_service.cc

Issue 332623003: [DevTools] [PowerProfiler] Fix for browser crash with active timeline recording for capturing power. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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
« no previous file with comments | « content/browser/devtools/devtools_power_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/power_profiler/power_profiler_service.cc
diff --git a/content/browser/power_profiler/power_profiler_service.cc b/content/browser/power_profiler/power_profiler_service.cc
index 951034c3918125a81e45b7f18ab92bb12ea33596..0ba0d82710e1bd586db109a4ea993118d3a1136c 100644
--- a/content/browser/power_profiler/power_profiler_service.cc
+++ b/content/browser/power_profiler/power_profiler_service.cc
@@ -60,6 +60,9 @@ void PowerProfilerService::AddObserver(PowerProfilerObserver* observer) {
}
void PowerProfilerService::RemoveObserver(PowerProfilerObserver* observer) {
+ if (!observers_.might_have_observers())
jam 2014/06/19 16:42:34 why is this needed?
vivekg 2014/06/19 17:46:02 This was added after the discussion as per the htt
jam 2014/06/20 05:59:46 I don't follow that conversation, can you explaine
+ return;
+
observers_.RemoveObserver(observer);
if (!observers_.might_have_observers())
« no previous file with comments | « content/browser/devtools/devtools_power_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698