[Webkit-unassigned] [Bug 43166] InsertOrderedList does not switch the list type properly when it has an inner list.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 29 14:46:23 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43166


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darin at apple.com




--- Comment #4 from Darin Adler <darin at apple.com>  2010-07-29 14:46:23 PST ---
(In reply to comment #3)
> > > +    RefPtr<Range> currentSelection = endingSelection().firstRange();
> > > +    doApplyForSingleParagraph(false, listTag, currentSelection.get());
> > 
> > You could do this without a local variable if you think that would be more readable.
> > 
> >     doApplyForSingleParagraph(false, listTag, endingSelection().firstRange().get());
> 
> Mn.. but doesn't that lead to a memory leak since firstRange() returns a PassRefPtr?  Because I'm passing the same range object to multiple doApplyForSingleParagraph in the case of range selection, I don't really want doApplyForSingleParagraph to take PassRefPtr.

No, it does not lead to a memory leak. The PassRefPtr that is the result of the firstRange function goes out of scope after the function returns, and that's when it calls deref.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list