|
Assert that thread-safe reference counting is used with
cross-thread NewRunnableMethod.
This assertion caught such an error in VisitedLinkMaster!
My approach, modify RunnableMethodTraits<T> to assert that
when ReleaseCallee happens on a different thread from
RetainCallee that the type supports thread-safe reference
counting. I do this by adding a static method to both
RefCounted<T> and RefCountedThreadSafe<T>.
This results in a little ugliness in cases where people
implement AddRef and Release by hand (to make the no-ops).
There may be a nicer way to deal with those few cases.
R=brettw
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=27379
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+108 lines, -124 lines) |
Patch |
![](/static/closedtriangle.gif) |
M |
base/message_pump_glib_unittest.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
base/ref_counted.h
|
View
|
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
base/task.h
|
View
|
|
4 chunks |
+28 lines, -6 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/browser_process_impl.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/browsing_data_remover.cc
|
View
|
|
1 chunk |
+6 lines, -9 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/chrome_plugin_host.cc
|
View
|
|
1 chunk |
+5 lines, -8 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/chromeos/touchpad.cc
|
View
|
|
1 chunk |
+5 lines, -8 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/dom_ui/chrome_url_data_manager.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/gears_integration.cc
|
View
|
|
2 chunks |
+10 lines, -16 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/history/history_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/printing/print_job.h
|
View
|
|
3 chunks |
+1 line, -10 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/printing/print_job_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -8 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/printing/print_job_worker.h
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/printing/print_job_worker.cc
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/printing/print_job_worker_owner.h
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/printing/printer_query.h
|
View
|
|
3 chunks |
+1 line, -9 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/renderer_host/render_crash_handler_host_linux.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/browser/visitedlink_master.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/common/extensions/extension_error_reporter.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/test/in_process_browser_test.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome/test/interactive_ui/view_event_test_base.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome_frame/chrome_frame_automation.cc
|
View
|
1
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome_frame/chrome_frame_delegate.h
|
View
|
1
|
1 chunk |
+2 lines, -5 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
chrome_frame/test/chrome_frame_unittests.cc
|
View
|
1
|
6 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
ipc/ipc_logging.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
ipc/ipc_sync_channel_unittest.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
![](/static/closedtriangle.gif) |
M |
net/proxy/proxy_config_service_linux_unittest.cc
|
View
|
|
1 chunk |
+5 lines, -6 lines |
0 comments
|
Download
|
Total messages: 2 (0 generated)
|