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

Issue 1958823002: Fix implicit access to raw pointer of scoped_refptr. (Closed)

Created:
4 years, 7 months ago by scheib
Modified:
4 years, 7 months ago
CC:
chromium-reviews, mcasas+watch+vc_chromium.org, viettrungluu+watch_chromium.org, posciak+watch_chromium.org, nasko+codewatch_chromium.org, gavinp+memory_chromium.org, yzshen+watch_chromium.org, sievers+watch_chromium.org, scheib+watch_chromium.org, ortuno+watch_chromium.org, tracing+reviews_chromium.org, ben+mojo_chromium.org, qsr+mojo_chromium.org, darin (slow to review), cbentzel+watch_chromium.org, jam, abarth-chromium, jbauman+watch_chromium.org, darin-cc_chromium.org, jkarlin+watch_chromium.org, kalyank, dbeam+watch-options_chromium.org, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, vabr+watchlistpasswordmanager_chromium.org, nhiroki, feature-media-reviews_chromium.org, oshima+watch_chromium.org, piman+watch_chromium.org, gcasto+watchlist_chromium.org, cc-bugs_chromium.org, mkwst+watchlist-passwords_chromium.org, michaelpg+watch-options_chromium.org, wfh+watch_chromium.org, Aaron Boodman, mkwst+moarreviews-renderer_chromium.org, danakj+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix implicit access to raw pointer of scoped_refptr. In following patch https://codereview.chromium.org/1963323004/ scoped_refptr will have the previous flawed "Safe Bool Idiom" implementation removed. This feature was incorrectly used throughout the codebase with code implicitly accessing the raw pointer from scoped_refptr instances. A correct "Safe Bool Idiom" would have prevented that, but the point is moot as we can now move to Cxx11 "explicit operator bool()". Usage has been corrected in two ways: + Logic tests no longer compare pointer values, but use a boolean expression (typically just the variable name). + Casts to boolean types are now explicit with stati_cast<bool>(). BUG=610048 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/4dac7f0d4c5050a5a827c2a1a5cd581afe1ae733 Cr-Commit-Position: refs/heads/master@{#393125}

Patch Set 1 : #

Total comments: 15

Patch Set 2 : #

Patch Set 3 : Splitting out change to scoped_refptr to follow up patch. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -57 lines) Patch
M base/threading/thread_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M blimp/common/blob_cache/in_memory_blob_cache_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/test/fake_video_frame_provider.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_serialization.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/banners/app_banner_manager.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/certificate_provider/certificate_provider_service_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/themes/theme_service.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/views/certificate_selector_browsertest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/password_manager_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/drive/drive_uploader.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/suggestions/image_manager_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/tracing/child_memory_dump_manager_delegate_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/cache_storage/cache_storage.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/media/webrtc/webrtc_internals.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/child/child_thread_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/child/shared_memory_data_consumer_handle.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webrtc/peer_connection_dependency_factory.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_win.cc View 1 chunk +1 line, -1 line 0 comments Download
M device/bluetooth/bluez/bluetooth_advertisement_bluez_unittest.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M device/usb/usb_device_handle_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_message_attachment_set_posix_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/blink/video_frame_compositor.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/gpu/h264_decoder.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/edk/system/shared_buffer_dispatcher.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/edk/system/wait_set_dispatcher_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/proxy/proxy_script_decider_unittest.cc View 8 chunks +8 lines, -8 lines 0 comments Download
M net/quic/crypto/quic_crypto_server_config.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ui/gfx/win/direct_write.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/gl/gl_image_ozone_native_pixmap_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/ozone/platform/drm/host/drm_cursor.cc View 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 25 (11 generated)
scheib
4 years, 7 months ago (2016-05-10 00:17:48 UTC) #2
danakj
Double check your NE/EQ stuffs. https://codereview.chromium.org/1958823002/diff/60001/chrome/browser/themes/theme_service.cc File chrome/browser/themes/theme_service.cc (right): https://codereview.chromium.org/1958823002/diff/60001/chrome/browser/themes/theme_service.cc#newcode571 chrome/browser/themes/theme_service.cc:571: if (theme_supplier_) i'm meh ...
4 years, 7 months ago (2016-05-10 21:37:02 UTC) #4
danakj
https://codereview.chromium.org/1958823002/diff/60001/base/memory/ref_counted.h File base/memory/ref_counted.h (right): https://codereview.chromium.org/1958823002/diff/60001/base/memory/ref_counted.h#newcode367 base/memory/ref_counted.h:367: private: There's no reason to make a private block ...
4 years, 7 months ago (2016-05-10 21:37:46 UTC) #5
danakj
https://codereview.chromium.org/1958823002/diff/60001/base/memory/ref_counted.h File base/memory/ref_counted.h (right): https://codereview.chromium.org/1958823002/diff/60001/base/memory/ref_counted.h#newcode367 base/memory/ref_counted.h:367: private: On 2016/05/10 21:37:46, danakj wrote: > There's no ...
4 years, 7 months ago (2016-05-10 21:38:52 UTC) #6
scheib
Thanks: https://codereview.chromium.org/1958823002/diff/60001/base/memory/ref_counted.h File base/memory/ref_counted.h (right): https://codereview.chromium.org/1958823002/diff/60001/base/memory/ref_counted.h#newcode367 base/memory/ref_counted.h:367: private: On 2016/05/10 21:38:51, danakj wrote: > On ...
4 years, 7 months ago (2016-05-10 22:25:00 UTC) #11
scheib
Also, I'm pondering if I should split this patch into the fixes and then the ...
4 years, 7 months ago (2016-05-10 23:51:45 UTC) #12
danakj
On Tue, May 10, 2016 at 4:51 PM, <scheib@chromium.org> wrote: > Also, I'm pondering if ...
4 years, 7 months ago (2016-05-11 00:46:04 UTC) #13
scheib
Ok, split out. Also, is this a TBR situation or should I add more OWNERS?
4 years, 7 months ago (2016-05-11 01:32:28 UTC) #15
danakj
LGTM. This is what src/OWNERS is for. You can ask one of them to review ...
4 years, 7 months ago (2016-05-11 20:01:02 UTC) #16
scheib
ben, OWNERS please.
4 years, 7 months ago (2016-05-11 21:09:36 UTC) #18
Ben Goodger (Google)
took a quick sampling... lgtm
4 years, 7 months ago (2016-05-11 22:51:27 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1958823002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1958823002/120001
4 years, 7 months ago (2016-05-11 22:56:08 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:120001)
4 years, 7 months ago (2016-05-12 00:55:16 UTC) #23
commit-bot: I haz the power
4 years, 7 months ago (2016-05-12 00:56:34 UTC) #25
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/4dac7f0d4c5050a5a827c2a1a5cd581afe1ae733
Cr-Commit-Position: refs/heads/master@{#393125}

Powered by Google App Engine
This is Rietveld 408576698