[Webkit-unassigned] [Bug 48620] [Qt] WebKit2 needs to support historyitem, QWKHistoryItem
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Oct 30 02:11:17 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=48620
--- Comment #2 from Kenneth Rohde Christiansen <kenneth at webkit.org> 2010-10-30 02:11:17 PST ---
(From update of attachment 72299)
View in context: https://bugs.webkit.org/attachment.cgi?id=72299&action=review
> WebKit2/UIProcess/API/qt/qwkhistory.cpp:46
> +QWKHistoryItemPrivate::~QWKHistoryItemPrivate()
> +{
> +}
Why not just use the default destructor.
> WebKit2/UIProcess/API/qt/qwkhistory.cpp:59
> +QString QWKHistoryItem::title() const
> +{
> + return WKStringCopyQString(WKBackForwardListItemCopyTitle(d->m_backForwardListItem));
> +}
I think that you are leaking here. As you are not freeing the WKString.
Do something like:
WKRetainPtr<WKString> string = WKBackForwardListItemCopyTitle(d->m_backForwardListItem);
return WKStringCopyQString(string);
When the WKRetainPtr goes out of scope, it will free the string.
> WebKit2/UIProcess/API/qt/qwkhistory_p.h:43
> + WKBackForwardListItemRef m_backForwardListItem;
Don't you need to ref this one? ie. change this into a WKRetainPtr<WKBackForwardListItemRef>?
--
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