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

Issue 226263008: Revert of Attempting to resolve a race condition with PowerMonitor (Closed)

Created:
6 years, 8 months ago by scottmg
Modified:
6 years, 8 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, chromium-apps-reviews_chromium.org, erikwright+watch_chromium.org
Visibility:
Public.

Description

Revert of Attempting to resolve a race condition with PowerMonitor (https://codereview.chromium.org/179923006/) Reason for revert: Failing interactive_ui_tests dbg: http://build.chromium.org/p/chromium.win/builders/Interactive%20Tests%20(dbg)/builds/47083/steps/interactive_ui_tests/logs/stdio Original issue's description: > Attempting to resolve a race condition with PowerMonitor. > > ThreadSanitizer caught multiple instances where PowerMonitor::Get or PowerMonitor::Add/RemoveObserver were being called concurrently with the PowerMonitor constructor in the main thread. These functions access a process-global PowerMontior instance (g_power_monitor), which was not thread safe. > > This change adds locks around PowerMonitor creation and deletion, and forces Add/RemoveObserver to be called in a threadsafe manner. It also removes the need to call PowerMonitor::Get. > > BUG=268924 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262018 TBR=mattm@chromium.org,jyasskin@chromium.org,kbr@chromium.org,bradnelson@chromium.org,brettw@chromium.org,bradchen@chromium.org,willchan@chromium.org,jam@chromium.org,jochen@chromium.org,timurrrr@chromium.org,glider@chromium.org,acolwell@chromium.org,scherkus@chromium.org,bajones@chromium.org NOTREECHECKS=true NOTRY=true BUG=268924 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=262026

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -143 lines) Patch
M base/power_monitor/power_monitor.h View 2 chunks +15 lines, -15 lines 0 comments Download
M base/power_monitor/power_monitor.cc View 1 chunk +23 lines, -72 lines 0 comments Download
M base/power_monitor/power_monitor_source.h View 1 chunk +2 lines, -0 lines 0 comments Download
M base/power_monitor/power_monitor_source.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M base/power_monitor/power_monitor_unittest.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M base/timer/hi_res_timer_manager_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M base/timer/hi_res_timer_manager_win.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/extensions/event_router_forwarder_unittest.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M components/nacl/loader/nacl_helper_win_64.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/nacl/loader/nacl_main.cc View 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/browser_main_loop.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/power_monitor_message_broadcaster.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M content/browser/power_monitor_message_broadcaster_unittest.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 2 chunks +10 lines, -2 lines 0 comments Download
M content/child/child_thread.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/child/child_thread.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M content/child/power_monitor_broadcast_source_unittest.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M content/gpu/gpu_watchdog_thread.cc View 2 chunks +6 lines, -2 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M net/http/http_network_layer.cc View 1 chunk +6 lines, -2 lines 0 comments Download
M net/url_request/url_request_job.cc View 2 chunks +8 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
scottmg
Created Revert of Attempting to resolve a race condition with PowerMonitor
6 years, 8 months ago (2014-04-05 18:55:26 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/226263008/1
6 years, 8 months ago (2014-04-05 18:55:32 UTC) #2
commit-bot: I haz the power
Change committed as 262026
6 years, 8 months ago (2014-04-05 18:56:00 UTC) #3
Nico
6 years, 8 months ago (2014-04-05 19:03:50 UTC) #4
Message was sent while issue was closed.
(FWIW, browser_tests got pretty red on windows after this too:
http://build.chromium.org/p/chromium.win/buildstatus?builder=Win7%20Tests%20%...
)

Powered by Google App Engine
This is Rietveld 408576698