Bug 49765

Summary: [Qt] Memory leak in QWebInspector
Product: WebKit Reporter: Yi Shen <max.hong.shen>
Component: WebKit QtAssignee: Yi Shen <max.hong.shen>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, kling
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
first try
none
prevent double delete by QWebPagePrivate
kling: review-
remove unnecessary stuff none

Description Yi Shen 2010-11-18 15:22:17 PST
should delete QWebInspectorPrivate in ~QWebInspector()
Comment 1 Yi Shen 2010-11-18 15:28:26 PST
Created attachment 74304 [details]
first try
Comment 2 Yi Shen 2010-11-18 15:44:36 PST
Created attachment 74306 [details]
prevent double delete by QWebPagePrivate
Comment 3 Andreas Kling 2010-11-18 21:16:22 PST
Comment on attachment 74306 [details]
prevent double delete by QWebPagePrivate

View in context: https://bugs.webkit.org/attachment.cgi?id=74306&action=review

Patch is fine, but:

> WebKit/qt/Api/qwebinspector.cpp:94
> +    if (d) {

Unnecessary if- "delete d" is a no-op if !d.

> WebKit/qt/Api/qwebinspector.cpp:96
> +        // Prevent double delete by QWebPagePrivate

Unnecessary comment.
Comment 4 Yi Shen 2010-11-19 04:21:49 PST
Created attachment 74367 [details]
remove unnecessary stuff

Thanks Kling, u r right :)
Comment 5 Laszlo Gombos 2010-11-19 04:53:04 PST
Comment on attachment 74367 [details]
remove unnecessary stuff

LGTM, r+.
Comment 6 WebKit Commit Bot 2010-11-19 21:20:39 PST
Comment on attachment 74367 [details]
remove unnecessary stuff

Clearing flags on attachment: 74367

Committed r72466: <http://trac.webkit.org/changeset/72466>
Comment 7 WebKit Commit Bot 2010-11-19 21:20:44 PST
All reviewed patches have been landed.  Closing bug.