[webkit-reviews] review denied: [Bug 38112] [Qt] QScriptValue::toString has a memory leak. : [Attachment 54273] Fix v1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 26 14:11:56 PDT 2010


Eric Seidel <eric at webkit.org> has denied Jędrzej Nowacki
<jedrzej.nowacki at nokia.com>'s request for review:
Bug 38112: [Qt] QScriptValue::toString has a memory leak.
https://bugs.webkit.org/show_bug.cgi?id=38112

Attachment 54273: Fix v1
https://bugs.webkit.org/attachment.cgi?id=54273&action=review

------- Additional Comments from Eric Seidel <eric at webkit.org>
This looks OK, but I think it could be better.

1.  We should probably have QScriptConverter handle this correctly.  i.e. have
a toString() method which takes a value() and context() directly, no?

2.  Isn't there a RetainPtr to use here so that you never have to release the
string explicitly?  Then it would look something like this:

RetainPtr<JSStringRef> string = JSValueToStringCopy();
return QScriptConverter::toString(string.get());


More information about the webkit-reviews mailing list