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

Issue 4188008: Use make_scoped_refptr for NewRunnableMethod if the raw ptr type is derivd from RefCountedThreadSafe (Closed)

Created:
10 years, 1 month ago by Nico
Modified:
9 years, 7 months ago
CC:
chromium-reviews, Paweł Hajdan Jr., ben+cc_chromium.org
Visibility:
Public.

Description

Use make_scoped_refptr for NewRunnableMethod if the raw ptr type is derived from RefCountedThreadSafe Like http://codereview.chromium.org/4053006 , but for all of chrome. This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2809041. I manually fixed the one presubmit warning the rewriter introduced. BUG=28083 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=64614

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : presubmit #

Total comments: 2

Patch Set 4 : address comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -10 lines) Patch
M chrome/browser/debugger/devtools_http_protocol_handler.cc View 1 2 3 4 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/download/download_file_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/file_path_watcher_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/importer/importer_unittest.cc View 1 2 3 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/notifications/desktop_notification_service_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Nico
10 years, 1 month ago (2010-11-01 03:28:43 UTC) #1
willchan no longer on Chromium
LGTM except for the devtools error. Also note that the DownloadManager one might cause weird ...
10 years, 1 month ago (2010-11-01 09:09:08 UTC) #2
Nico
10 years, 1 month ago (2010-11-01 15:50:24 UTC) #3
http://codereview.chromium.org/4188008/diff/4001/5001
File chrome/browser/debugger/devtools_http_protocol_handler.cc (right):

http://codereview.chromium.org/4188008/diff/4001/5001#newcode163
chrome/browser/debugger/devtools_http_protocol_handler.cc:163:
make_scoped_refptr(socket)));
On 2010/11/01 09:09:09, willchan wrote:
> So actually, fixing this instance here (I think the other instances are fine
in
> the file, but I forget) is actually buggy.  socket actually points to an
already
> deleted object =/  See
http://code.google.com/p/chromium/issues/detail?id=59930
> for details.  The code needs to be fixed first.  It's a benign error here
> because the socket pointer is only used as a key, it's not actually
> dereferenced.  make_scoped_refptr() would make the error actually crash.

Yikes. Reverted this instance, thanks.

Powered by Google App Engine
This is Rietveld 408576698