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

Issue 3940002: Use scoped_refptr for refcounted param in DomStorageDispatcherHost. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 6 months ago by willchan
Modified:
2 years, 11 months ago
Reviewers:
jorlow
CC:
chromium-reviews_chromium.org, darin-cc_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Use scoped_refptr for refcounted param in DomStorageDispatcherHost.

BUG=28083
TEST=none

Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=63214

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Lint Patch
M chrome/browser/in_process_webkit/dom_storage_dispatcher_host.cc View 1 chunk +2 lines, -1 line 0 comments 0 errors Download
Commit:

Messages

Total messages: 3
willchan
3 years, 6 months ago #1
jorlow
LGTM Is this needed for clang or something?
3 years, 6 months ago #2
willchan
3 years, 6 months ago #3
Nope, it's unsafe to pass them as a raw pointer, since the RunnableMethod
task that gets created will store a Tuple with a raw pointer instead of a
scoped_refptr.  This means that before the task invokes the function pointer
later, its refcounted parameter may get deleted since the RunnableMethod
doesn't hold a refcount to it.

Once I fix all instances of this anti-pattern, I'm going to add a template
type trait to prevent anyone from doing this again.

On Wed, Oct 20, 2010 at 2:02 AM, <jorlow@chromium.org> wrote:

> LGTM
>
> Is this needed for clang or something?
>
>
> http://codereview.chromium.org/3940002/show
>
Sign in to reply to this message.

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