[webkit-reviews] review granted: [Bug 86300] RenderView::selectionBounds uses some maps with raw pointers that should be OwnPtr instead : [Attachment 141579] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat May 12 11:08:47 PDT 2012
Eric Seidel <eric at webkit.org> has granted Darin Adler <darin at apple.com>'s
request for review:
Bug 86300: RenderView::selectionBounds uses some maps with raw pointers that
should be OwnPtr instead
https://bugs.webkit.org/show_bug.cgi?id=86300
Attachment 141579: Patch
https://bugs.webkit.org/attachment.cgi?id=141579&action=review
------- Additional Comments from Eric Seidel <eric at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=141579&action=review
LGTM. Hopefully the timings on these deletions don't matter. I didn't look
closely at what RenderSelectionInfo to see if we're now extending the life of
objects in ways which could interact with later parts of these functions.
> Source/WebCore/ChangeLog:3
> + RenderView::selectionBounds and RenderView::setSelectoin use maps
with raw pointers that should be OwnPtr
"selectoin"
> Source/WebCore/rendering/RenderView.cpp:414
> + OwnPtr<RenderSelectionInfo>& blockInfo =
selectedObjects.add(cb, nullptr).iterator->second;
I thought someone had fixed our HashMap code to not use std:pair, and thus have
->key and ->value instead of first/second.
> Source/WebCore/rendering/RenderView.cpp:417
> + blockInfo = adoptPtr(new RenderSelectionInfo(cb,
clipToVisibleContent));
I presume that its' kosher to fill the iterator here, since as far as the
hashmap is concerned, it already added the value "nullPtr" if something didn't
previously exist for that key?
More information about the webkit-reviews
mailing list