Bug 54100 - Web Inspector: InspectorAgent should know nothing about InspectorController instance.
Summary: Web Inspector: InspectorAgent should know nothing about InspectorController i...
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: Ilya Tikhonovsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-09 07:01 PST by Ilya Tikhonovsky
Modified: 2011-02-09 08:32 PST (History)
10 users (show)

See Also:


Attachments
[patch] initial version (5.78 KB, patch)
2011-02-09 07:02 PST, Ilya Tikhonovsky
pfeldman: review-
Details | Formatted Diff | Diff
[patch] second version (6.28 KB, patch)
2011-02-09 07:21 PST, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
[patch] second version with assert (6.32 KB, patch)
2011-02-09 08:29 PST, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2011-02-09 07:01:05 PST
%subj%
Comment 1 Ilya Tikhonovsky 2011-02-09 07:02:49 PST
Created attachment 81804 [details]
[patch] initial version
Comment 2 Pavel Feldman 2011-02-09 07:14:56 PST
Comment on attachment 81804 [details]
[patch] initial version

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

> Source/WebCore/inspector/InspectorAgent.cpp:202
> +    m_domAgent->setDocument(m_inspectedPage->mainFrame()->document());

While you are here, please nuke setDocument call here - it is done from within pushDataCollectedOffline.

> Source/WebCore/inspector/InspectorController.cpp:117
> +    m_inspectorAgent->disconnectFrontend();

InspectorAgent::disconnectFrontend is manipulating front-end. Hence it should be called before the m_inspectorFrontend.clear() above.

> Source/WebCore/inspector/InspectorController.cpp:146
> +    if (!m_inspectorFrontend)

Now that you know that front-end does not exist, why checking for m_inspectorFrontend here?
Comment 3 Ilya Tikhonovsky 2011-02-09 07:21:38 PST
Created attachment 81809 [details]
[patch] second version

comments addressed
Comment 4 Ilya Tikhonovsky 2011-02-09 08:29:11 PST
Created attachment 81815 [details]
[patch] second version with assert
Comment 5 Ilya Tikhonovsky 2011-02-09 08:32:23 PST
Comment on attachment 81815 [details]
[patch] second version with assert

Clearing flags on attachment: 81815

Committed r78056: <http://trac.webkit.org/changeset/78056>
Comment 6 Ilya Tikhonovsky 2011-02-09 08:32:34 PST
All reviewed patches have been landed.  Closing bug.