Bug 32868 - IWebView::mainFrame crashes if called after IWebView::close
Summary: IWebView::mainFrame crashes if called after IWebView::close
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2009-12-22 07:07 PST by Adam Roben (:aroben)
Modified: 2016-07-22 05:43 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.81 KB, patch)
2016-07-21 04:25 PDT, Per Arne Vollan
bfulgham: review+
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) 2009-12-22 07:07:40 PST
To reproduce:

1. Create a WebView
2. Call IWebView::close
3. Call IWebView::mainFrame

You'll crash.
Comment 1 Adam Roben (:aroben) 2009-12-22 07:07:52 PST
The problem is that IWebView::close deletes m_page, which ends up releasing the last reference to m_mainFrame, but we don't null-out m_mainFrame.
Comment 2 Adam Roben (:aroben) 2009-12-22 07:08:00 PST
<rdar://problem/7472766>
Comment 3 Per Arne Vollan 2016-07-21 04:25:45 PDT
Created attachment 284205 [details]
Patch
Comment 4 Brent Fulgham 2016-07-21 10:26:37 PDT
Comment on attachment 284205 [details]
Patch

Excellent! r=me.
Comment 5 Per Arne Vollan 2016-07-21 11:33:03 PDT
(In reply to comment #4)
> Comment on attachment 284205 [details]
> Patch
> 
> Excellent! r=me.

Thanks for reviewing :)
Comment 6 Per Arne Vollan 2016-07-22 05:43:21 PDT
Committed r203597: <https://trac.webkit.org/changeset/203597>