Bug 137150 - REGRESSION(r173929): Web inspector doesn't work after r173929 when INSPECTOR_SERVER is enabled
Summary: REGRESSION(r173929): Web inspector doesn't work after r173929 when INSPECTOR_...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2014-09-26 10:31 PDT by Carlos Garcia Campos
Modified: 2014-09-26 10:50 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.34 KB, patch)
2014-09-26 10:35 PDT, Carlos Garcia Campos
timothy: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2014-09-26 10:31:46 PDT
The inspector doesn't show anything because it's sending messages to a remote frontend that it's not running.
Comment 1 Carlos Garcia Campos 2014-09-26 10:35:59 PDT
Created attachment 238725 [details]
Patch
Comment 2 Timothy Hatcher 2014-09-26 10:39:23 PDT
Comment on attachment 238725 [details]
Patch

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

> Source/WebKit2/WebProcess/WebPage/WebInspector.cpp:67
> +    , m_remoteFrontendConnected(false)

This should get a ENABLE(INSPECTOR_SERVER) guard.

> Source/WebKit2/WebProcess/WebPage/WebInspector.cpp:224
>  #if !ENABLE(INSPECTOR_SERVER)
>      m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
>  #else
> -    WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
> +    if (m_remoteFrontendConnected)
> +        WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
> +    else
> +        m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
>  #endif

This can be simplified as:

#if ENABLE(INSPECTOR_SERVER)
    if (m_remoteFrontendConnected)
        WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
    else
#endif
        m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);

> Source/WebKit2/WebProcess/WebPage/WebInspector.h:107
> +    bool m_remoteFrontendConnected;

This should also get a ENABLE(INSPECTOR_SERVER) guard.
Comment 3 Carlos Garcia Campos 2014-09-26 10:42:27 PDT
(In reply to comment #2)
> (From update of attachment 238725 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=238725&action=review
> 
> > Source/WebKit2/WebProcess/WebPage/WebInspector.cpp:67
> > +    , m_remoteFrontendConnected(false)
> 
> This should get a ENABLE(INSPECTOR_SERVER) guard.

Right, it's only used and needed inside ENABLE(INSPECTOR_SERVER) blocks.

> > Source/WebKit2/WebProcess/WebPage/WebInspector.cpp:224
> >  #if !ENABLE(INSPECTOR_SERVER)
> >      m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
> >  #else
> > -    WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
> > +    if (m_remoteFrontendConnected)
> > +        WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
> > +    else
> > +        m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);
> >  #endif
> 
> This can be simplified as:
> 
> #if ENABLE(INSPECTOR_SERVER)
>     if (m_remoteFrontendConnected)
>         WebProcess::shared().parentProcessConnection()->send(Messages::WebInspectorProxy::SendMessageToRemoteFrontend(message), m_page->pageID());
>     else
> #endif
>         m_frontendConnection->send(Messages::WebInspectorUI::SendMessageToFrontend(message), 0);

Ok.

> > Source/WebKit2/WebProcess/WebPage/WebInspector.h:107
> > +    bool m_remoteFrontendConnected;
> 
> This should also get a ENABLE(INSPECTOR_SERVER) guard.
Comment 4 Carlos Garcia Campos 2014-09-26 10:50:32 PDT
Committed r174013: <http://trac.webkit.org/changeset/174013>