Chromium Code Reviews
Help | Chromium Project | Sign in
(370)

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

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 5 months ago by Nico (ooo Apr 18 - Apr 20)
Modified:
2 years, 11 months ago
Reviewers:
willchan
CC:
chromium-reviews_chromium.org, 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) Lint Patch
M chrome/browser/debugger/devtools_http_protocol_handler.cc View 1 2 3 4 chunks +5 lines, -3 lines 0 comments 0 errors Download
M chrome/browser/download/download_file_manager.cc View 1 chunk +1 line, -1 line 0 comments 0 errors Download
M chrome/browser/file_path_watcher_browsertest.cc View 1 chunk +1 line, -1 line 0 comments 0 errors Download
M chrome/browser/importer/importer_unittest.cc View 1 2 3 2 chunks +8 lines, -4 lines 0 comments 0 errors Download
M chrome/browser/notifications/desktop_notification_service_unittest.cc View 1 chunk +1 line, -1 line 0 comments 0 errors Download
Trybot results:
Commit:

Messages

Total messages: 3
Nico (ooo Apr 18 - Apr 20)
3 years, 5 months ago #1
willchan
LGTM except for the devtools error. Also note that the DownloadManager one might cause weird ...
3 years, 5 months ago #2
Nico (ooo Apr 18 - Apr 20)
3 years, 5 months ago #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.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6