[webkit-reviews] review denied: [Bug 62954] add/removeSpellcheckRange use RefPtr incorrectly for arguments : [Attachment 97900] A quick patch v1
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jun 20 19:24:51 PDT 2011
Darin Adler <darin at apple.com> has denied Hironori Bono <hbono at chromium.org>'s
request for review:
Bug 62954: add/removeSpellcheckRange use RefPtr incorrectly for arguments
https://bugs.webkit.org/show_bug.cgi?id=62954
Attachment 97900: A quick patch v1
https://bugs.webkit.org/attachment.cgi?id=97900&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=97900&action=review
I’d prefer to see a function that makes removeSpellcheckRange use a raw
pointer.
> Source/WebCore/html/HTMLDivElement.cpp:94
> -void HTMLDivElement::addSpellcheckRange(unsigned long start, unsigned long
length, RefPtr<DOMStringList> suggestions, unsigned short options)
> +void HTMLDivElement::addSpellcheckRange(unsigned long start, unsigned long
length, PassRefPtr<DOMStringList> prpSuggestions, unsigned short options)
> {
> - document()->markers()->addUserSpellingMarker(this, start, length,
suggestions, options);
> + document()->markers()->addUserSpellingMarker(this, start, length,
prpSuggestions, options);
> }
Here there is no reason to change the name of the argument. Just “suggestions”
would be fine. Same for the other overrides of this function.
> Source/WebCore/html/HTMLDivElement.h:45
> + void removeSpellcheckRange(PassRefPtr<SpellcheckRange>);
I don’t understand why the remove function takes a PassRefPtr. The caller is
not passing ownership in, so I’d think we could just use a raw pointer. Is
there some problem with DOM bindings that means we have to use PassRefPtr here?
More information about the webkit-reviews
mailing list