Bug 80782 - Web Inspector: Crash using released frontendClient when resizing window with closed inspector
Summary: Web Inspector: Crash using released frontendClient when resizing window with ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-11 00:37 PST by Joseph Pecoraro
Modified: 2012-03-11 03:12 PDT (History)
11 users (show)

See Also:


Attachments
[PATCH] Clear Weak Pointers when Frontend is Closed (3.05 KB, patch)
2012-03-11 00:42 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Clear Weak Pointers when Frontend is Closed (With ASSERTs) (3.29 KB, patch)
2012-03-11 00:53 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2012-03-11 00:37:19 PST
* STEPS TO REPRODUCE
1. Open 1st Inspector.
2. Inspect Inspector (opens 2nd inspector)
3. Close 2nd inspector.
4. Resize 1st Inspector.
  => CRASH. Log below

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0  WebCore::InspectorController::inspectedPage() const + 4 (InspectorController.cpp:314)
1  WebCore::InspectorFrontendClientLocal::canAttachWindow() + 19 (OwnPtr.h:57)
2  WebKit::WebInspector::updateDockingAvailability() + 30 (WebInspector.cpp:236)
3  WebCore::FrameView::layout(bool) + 2483 (FrameView.cpp:1128)
4  WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive() + 128 (HashTable.h:327)
5  WebKit::WebPage::layoutIfNeeded() + 34 (RefPtr.h:72)

Patch to follow.
Comment 1 Joseph Pecoraro 2012-03-11 00:42:20 PST
Created attachment 131207 [details]
[PATCH] Clear Weak Pointers when Frontend is Closed

• I named the new function destroyInspectorPage for lack of a better name. It balances createInspectorPage.
• This matches the WK1 side, which clears its weak references when handling closeInspectorFrontend
Comment 2 Joseph Pecoraro 2012-03-11 00:53:54 PST
Created attachment 131208 [details]
[PATCH] Clear Weak Pointers when Frontend is Closed (With ASSERTs)

I added asserts in WebInspector::createInspectorPage that these values are null. What was happening before was that these values were just getting stale and overwritten.
Comment 3 WebKit Review Bot 2012-03-11 03:12:07 PDT
Comment on attachment 131208 [details]
[PATCH] Clear Weak Pointers when Frontend is Closed (With ASSERTs)

Clearing flags on attachment: 131208

Committed r110390: <http://trac.webkit.org/changeset/110390>
Comment 4 WebKit Review Bot 2012-03-11 03:12:12 PDT
All reviewed patches have been landed.  Closing bug.