Bug 33162 - Releasing an initialized WebView without calling IWebView::close or DestroyWindow leaks the WebView
Summary: Releasing an initialized WebView without calling IWebView::close or DestroyWi...
Status: REOPENED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2010-01-04 11:31 PST by Adam Roben (:aroben)
Modified: 2011-09-26 05:16 PDT (History)
2 users (show)

See Also:


Attachments
Remove two failing WebKitAPITest tests (2.32 KB, patch)
2011-09-23 08:20 PDT, Adam Roben (:aroben)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2010-01-04 11:31:11 PST
If a WebKit application does the following:

IWebView* webView;
WebKitCreateInstance(CLSID_WebView, 0, IID_IWebView, reinterpret_cast<void**>(&webView));
webView->initWithFrame(rect, 0, 0);
webView->Release();

...then the WebView will be leaked.
Comment 1 Adam Roben (:aroben) 2010-01-04 11:31:38 PST
<rdar://problem/7507492>
Comment 2 Adam Roben (:aroben) 2010-02-22 08:46:08 PST
I think this might be fixed.
Comment 3 Adam Roben (:aroben) 2010-02-22 09:48:45 PST
Yes, this was fixed somewhere in r52829-52830.
Comment 4 Russ Schnapp 2010-04-05 10:16:56 PDT
(In reply to comment #3)
> Yes, this was fixed somewhere in r52829-52830.

Actually, I'm not sure this is really fixed. In rev 57076, WebKitAPITest WebViewDestruction, NoCloseOrDestroyViewWindow is failing:

FAIL: WebViewDestruction: NoCloseOrDestroyViewWindow
        webViewCount() == currentWebViewCount - 1 (.\tests\WebViewDestruction.cpp:92)

After assigning 0 to webView, statistics->webViewCount() is still returning a value of 1.

I found this while running the Windows build. Should I reopen this bug?
Comment 5 Adam Roben (:aroben) 2010-04-05 10:33:21 PDT
Sure, I guess reopening this is a good way to handle it.
Comment 6 Adam Roben (:aroben) 2011-09-23 08:20:32 PDT
Created attachment 108478 [details]
Remove two failing WebKitAPITest tests
Comment 7 Adam Roben (:aroben) 2011-09-26 05:16:13 PDT
Comment on attachment 108478 [details]
Remove two failing WebKitAPITest tests

Landed in r95943.