Changeset 92574 in webkit


Ignore:
Timestamp:
Aug 7, 2011 12:42:21 PM (13 years ago)
Author:
Joseph Pecoraro
Message:

[QT] Possible Leaks WKRetainPtr<> should Adopt allocated Copy
https://bugs.webkit.org/show_bug.cgi?id=65790

Reviewed by Sam Weinig.

Fix a leak by adopting an allocation instead of retaining it.

  • UIProcess/qt/qwkhistory.cpp:

(QWKHistoryItem::title):
(QWKHistoryItem::url):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r92568 r92574  
     12011-08-07  Joseph Pecoraro  <joepeck@webkit.org>
     2
     3        [QT] Possible Leaks WKRetainPtr<> should Adopt allocated Copy
     4        https://bugs.webkit.org/show_bug.cgi?id=65790
     5
     6        Reviewed by Sam Weinig.
     7
     8        Fix a leak by adopting an allocation instead of retaining it.
     9
     10        * UIProcess/qt/qwkhistory.cpp:
     11        (QWKHistoryItem::title):
     12        (QWKHistoryItem::url):
     13
    1142011-08-06  Mark Rowe  <mrowe@apple.com>
    215
  • trunk/Source/WebKit2/UIProcess/qt/qwkhistory.cpp

    r90458 r92574  
    7474    if (!d->m_backForwardListItem)
    7575        return QString();
    76     WKRetainPtr<WKStringRef> title = WKBackForwardListItemCopyTitle(d->m_backForwardListItem.get());
     76    WKRetainPtr<WKStringRef> title(AdoptWK, WKBackForwardListItemCopyTitle(d->m_backForwardListItem.get()));
    7777    return WKStringCopyQString(title.get());
    7878}
     
    8282    if (!d->m_backForwardListItem)
    8383        return QUrl();
    84     WKRetainPtr<WKURLRef> url = WKBackForwardListItemCopyURL(d->m_backForwardListItem.get());
     84    WKRetainPtr<WKURLRef> url(AdoptWK, WKBackForwardListItemCopyURL(d->m_backForwardListItem.get()));
    8585    return WKURLCopyQUrl(url.get());
    8686}
Note: See TracChangeset for help on using the changeset viewer.