|
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
|
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
|
Total messages: 4 (0 generated)
|