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

Issue 3148018: [Mac] Retain a reference within a scoped_nsobject of a Page Action's context menu. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 9 months ago by Andrew Bonventre (Bons)
Modified:
3 years, 10 months ago
Reviewers:
Scott Hess
CC:
chromium-reviews, John Grabowski, pam+watch_chromium.org, ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

[Mac] Retain a reference within a scoped_nsobject of a Page Action's context menu. The problem was that the menu was being dealloc'd upon selection of the 'Uninstall' option, which asynchonously loads the extension's icon. Upon deallocation, the ImageTracker was also being destructed and the loading cancelled, leaving OnImageLoad to never be called. BUG=40233 TEST=see bug for repro steps. should be able to uninstall page actions through their context menus. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56532

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fixed extra retain. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -6 lines) Patch
M chrome/browser/cocoa/location_bar/page_action_decoration.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/location_bar/page_action_decoration.mm View 1 3 chunks +8 lines, -6 lines 0 comments Download
Trybot results:
Commit: CQ not working?

Messages

Total messages: 4 (0 generated)
Miranda Callahan
LGTM.
4 years, 9 months ago (2010-08-18 02:50:25 UTC) #1
Andrew Bonventre (Bons)
Shess, since you wrote the original PageActionDecoration for this, if you could do a once-over ...
4 years, 9 months ago (2010-08-18 02:51:00 UTC) #2
Scott Hess
LGTM, except fix the extra ref (or tell me where I missed a trick). On ...
4 years, 9 months ago (2010-08-18 03:45:41 UTC) #3
Andrew Bonventre (Bons)
4 years, 9 months ago (2010-08-18 15:47:38 UTC) #4
On 2010/08/18 03:45:41, shess wrote:
> LGTM, except fix the extra ref (or tell me where I missed a trick).
> 
> On 2010/08/18 02:51:00, Andrew Bonventre (Bons) wrote:
> > Shess, since you wrote the original PageActionDecoration for this, if you
> could
> > do a once-over that would be great.
> 
> Fortunately, I think it was broken before my change.  Unfortunate that a tiny
> bit of digging while I was in there would have let me trivially fix it for M6.
> 
> http://codereview.chromium.org/3148018/diff/1/3
> File chrome/browser/cocoa/location_bar/page_action_decoration.mm (right):
> 
> http://codereview.chromium.org/3148018/diff/1/3#newcode225
> chrome/browser/cocoa/location_bar/page_action_decoration.mm:225:
> extensionAction:page_action_] retain]);
> I think this leaves you with one too many references (the one from alloc/init,
> plus one from retain).
Fixed.

> 
> As I mentioned on IM, this feels a little heavyweight for the effect desired,
> but I see how it matches the existing browser-action code, so it makes sense.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be