Comment #15 on issue 26960 by [email protected]: Crashes drawing while  
closing tabs
http://code.google.com/p/chromium/issues/detail?id=26960

It leaves you vindicated, but I think se still need to get this for M4.  We  
see this in
normal close-one-or-two-tabs cases, you don't need to mash command-W wildly,
right?

Looking at -[GTMFadeTruncatingTextFieldCell drawInteriorWithFrame:inView:]  
at
GTMFadeTruncatingTextFieldCell.m:53 (because that's all we've got to go  
on)...

     NSColor *color = [self textColor];
     NSGradient *mask = [[NSGradient alloc]
         initWithStartingColor:color
                   endingColor:[color colorWithAlphaComponent:0.0]];

Does -[NSColor colorWithAlphaComponent:] return something autoreleased?  The
docs say "Creates and returns" but maybe I've just been reading CF/CG docs  
too
much today.  I guess even if it's not autoreleased, "creates" implies  
retainCount 1,
which would be over-retaining, but not over-releasing.  Let's back-burner  
this idea.

Since this is all we've got to go on, can we make the bug go away if we  
wrap the -
[NSGradient initWithStartingColor:endingColor:] in our own retain/release  
for the
colors we're giving it?  For that matter, can we just do better by caching  
the second
color or even the NSGradient as a member in the  
GTMFadeTruncatingTextFieldCell
object?  I guess we'd need to redo it if the textColor changes, but...

Maybe we can even do something that lets us share NSColors between
GTMFadeTruncatingTextFieldCell instances?

The less we need to make the crashy call, the better off we might be.   
Dunno.  Some
of this is crazy and I'm just thinking aloud.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

-- 
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs

Reply via email to