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

Issue 1004593005: base::RefCounted now DCHECKs when referenced from multiple threads. (Closed)

Created:
5 years, 9 months ago by Matt Giuca
Modified:
5 years, 8 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org, jam, gavinp+memory_chromium.org, rsesek+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base::RefCounted now DCHECKs when referenced from multiple threads. This will allow us to catch future violations of thread safety from scoped_refptrs. Added a new class base::UnsafeRefCounted, which does not do the DCHECKs (it is identical to the old RefCounted). Classes that violate the DCHECKs have been temporarily moved over to use UnsafeRefCounted. BUG=469952

Patch Set 1 #

Patch Set 2 : Fix lots of tests using UnsafeRefCounted. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -35 lines) Patch
M base/deferred_sequenced_task_runner_unittest.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M base/memory/ref_counted.h View 1 3 chunks +31 lines, -0 lines 1 comment Download
M components/nacl/loader/nacl_ipc_adapter.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M components/url_matcher/url_matcher.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/pepper/ssl_context_helper.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M content/public/common/resource_devtools_info.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M extensions/browser/api/cast_channel/logger.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M gpu/command_buffer/common/value_state.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager.h View 1 2 chunks +4 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/shader_translator_cache.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/valuebuffer_manager.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M gpu/config/gpu_control_list.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M ipc/ipc_message_attachment.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M net/disk_cache/blockfile/trace.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M ppapi/shared_impl/resource.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M sql/connection.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M storage/browser/blob/shareable_file_reference.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M ui/gfx/image/image.cc View 1 2 chunks +3 lines, -2 lines 0 comments Download
M ui/gl/gl_share_group.h View 1 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
noyau (Ping after 24h)
https://codereview.chromium.org/1004593005/diff/20001/base/memory/ref_counted.h File base/memory/ref_counted.h (right): https://codereview.chromium.org/1004593005/diff/20001/base/memory/ref_counted.h#newcode49 base/memory/ref_counted.h:49: // DFAKE_SCOPED_LOCK_THREAD_LOCKED(add_release_); Since your code is now doing the ...
5 years, 9 months ago (2015-03-24 09:01:21 UTC) #2
Alexander Potapenko
Can you please provide a command line that shows that a particular test fails the ...
5 years, 9 months ago (2015-03-24 15:01:12 UTC) #4
Matt Giuca
5 years, 8 months ago (2015-04-20 01:34:45 UTC) #5
Message was sent while issue was closed.
Closing issue, as we did not reach consensus on making it illegal to pass a
non-thread-safe RefCounted across threads. (People were in favour of doing it
carefully.)

Powered by Google App Engine
This is Rietveld 408576698