Changeset 270060 in webkit


Ignore:
Timestamp:
Nov 19, 2020 5:05:08 PM (3 years ago)
Author:
Chris Dumez
Message:

Web Inspector: Unable to Show JavaScript Console in empty tab in Safari Technology Preview
https://bugs.webkit.org/show_bug.cgi?id=211590
<rdar://problem/63000159>

Reviewed by Simon Fraser.

We used to launch the initial process for the inspected page from inside
WebInspectorProxy::connect(). I thought this was a good bottleneck to
make sure the inspected page has a process to inspect.

However, while WebInspectorProxy::connect() gets called by functions by
WebInspectorProxy::show(), it does not get called by
WebInspectorProxy::showConsole() for example.

To address this, I have moved the code that launches the inspected page's
initial process from WebInspectorProxy::connect() to
WebInspectorProxy::createFrontendPage(). This seems like a much better
bottleneck.

  • UIProcess/Inspector/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::connect):
(WebKit::WebInspectorProxy::createFrontendPage):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r270035 r270060  
     12020-11-19  Chris Dumez  <cdumez@apple.com>
     2
     3        Web Inspector: Unable to Show JavaScript Console in empty tab in Safari Technology Preview
     4        https://bugs.webkit.org/show_bug.cgi?id=211590
     5        <rdar://problem/63000159>
     6
     7        Reviewed by Simon Fraser.
     8
     9        We used to launch the initial process for the inspected page from inside
     10        WebInspectorProxy::connect(). I thought this was a good bottleneck to
     11        make sure the inspected page has a process to inspect.
     12
     13        However, while WebInspectorProxy::connect() gets called by functions by
     14        WebInspectorProxy::show(), it does not get called by
     15        WebInspectorProxy::showConsole() for example.
     16
     17        To address this, I have moved the code that launches the inspected page's
     18        initial process from WebInspectorProxy::connect() to
     19        WebInspectorProxy::createFrontendPage(). This seems like a much better
     20        bottleneck.
     21
     22        * UIProcess/Inspector/WebInspectorProxy.cpp:
     23        (WebKit::WebInspectorProxy::connect):
     24        (WebKit::WebInspectorProxy::createFrontendPage):
     25
    1262020-11-19  Per Arne Vollan  <pvollan@apple.com>
    227
  • trunk/Source/WebKit/UIProcess/Inspector/WebInspectorProxy.cpp

    r269712 r270060  
    144144    createFrontendPage();
    145145
    146     m_inspectedPage->launchInitialProcessIfNecessary();
    147146    m_inspectedPage->send(Messages::WebInspectorInterruptDispatcher::NotifyNeedDebuggerBreak(), 0);
    148147    m_inspectedPage->send(Messages::WebInspector::Show());
     
    421420    trackInspectorPage(m_inspectorPage, m_inspectedPage);
    422421
     422    // Make sure the inspected page has a running WebProcess so we can inspect it.
     423    m_inspectedPage->launchInitialProcessIfNecessary();
     424
    423425    m_inspectorPage->process().addMessageReceiver(Messages::WebInspectorProxy::messageReceiverName(), m_inspectedPage->identifier(), *this);
    424426    m_inspectorPage->process().assumeReadAccessToBaseURL(*m_inspectorPage, WebInspectorProxy::inspectorBaseURL());
Note: See TracChangeset for help on using the changeset viewer.