Changeset 201079 in webkit


Ignore:
Timestamp:
May 18, 2016 7:52:20 AM (8 years ago)
Author:
BJ Burg
Message:

REGRESSION(r200959): "Start Timeline Recording" menu item doesn't start recording
https://bugs.webkit.org/show_bug.cgi?id=157821
<rdar://problem/26335429>

Reviewed by Timothy Hatcher.

In r200959, WebInspectorProxy started sending start/stop profiling
messages directly to the frontend process to avoid the inspected page
process from implicitly showing the frontend. To compensate, the WebKit
API layer was changed to call show() in togglePageProfiling().

Unfortunately, this fix was not quite right, because the ordering of
the Show and StartPageProfiling messages is undefined. The latter has to bounce
from UI to inspected to inspector processes, so the frontend may try
to start profiling before the frontend is shown, causing it to be ignored.

This patch takes a different approach: just remove all implicit show()
calls in the inspected page processes, and bounce both the Show and
StartPageProfiling messages through the inspected page process to ensure
they are handled in order by the frontend process.

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::togglePageProfiling):
Revert to sending to the inspected page process.

  • WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:

(WKBundleInspectorSetPageProfilingEnabled):
Add a call to show() now that the implementation doesn't do it implicitly.

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
Don't implicitly show the inspector. These methods are only called
through the WKBundleInspector API and via IPC from WebInspectorProxy.

Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r201056 r201079  
     12016-05-18  Brian Burg  <bburg@apple.com>
     2
     3        REGRESSION(r200959): "Start Timeline Recording" menu item doesn't start recording
     4        https://bugs.webkit.org/show_bug.cgi?id=157821
     5        <rdar://problem/26335429>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        In r200959, WebInspectorProxy started sending start/stop profiling
     10        messages directly to the frontend process to avoid the inspected page
     11        process from implicitly showing the frontend. To compensate, the WebKit
     12        API layer was changed to call show() in togglePageProfiling().
     13
     14        Unfortunately, this fix was not quite right, because the ordering of
     15        the Show and StartPageProfiling messages is undefined. The latter has to bounce
     16        from UI to inspected to inspector processes, so the frontend may try
     17        to start profiling before the frontend is shown, causing it to be ignored.
     18
     19        This patch takes a different approach: just remove all implicit show()
     20        calls in the inspected page processes, and bounce both the Show and
     21        StartPageProfiling messages through the inspected page process to ensure
     22        they are handled in order by the frontend process.
     23
     24        * UIProcess/WebInspectorProxy.cpp:
     25        (WebKit::WebInspectorProxy::togglePageProfiling):
     26        Revert to sending to the inspected page process.
     27
     28        * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
     29        (WKBundleInspectorSetPageProfilingEnabled):
     30        Add a call to show() now that the implementation doesn't do it implicitly.
     31
     32        * WebProcess/WebPage/WebInspector.cpp:
     33        (WebKit::WebInspector::startPageProfiling):
     34        (WebKit::WebInspector::stopPageProfiling):
     35        Don't implicitly show the inspector. These methods are only called
     36        through the WKBundleInspector API and via IPC from WebInspectorProxy.
     37
    1382016-05-17  Beth Dakin  <bdakin@apple.com>
    239
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp

    r200959 r201079  
    297297
    298298    if (m_isProfilingPage)
    299         m_inspectorPage->process().send(Messages::WebInspectorUI::StopPageProfiling(), m_inspectorPage->pageID());
     299        m_inspectedPage->process().send(Messages::WebInspector::StopPageProfiling(), m_inspectedPage->pageID());
    300300    else
    301         m_inspectorPage->process().send(Messages::WebInspectorUI::StartPageProfiling(), m_inspectorPage->pageID());
     301        m_inspectedPage->process().send(Messages::WebInspector::StartPageProfiling(), m_inspectedPage->pageID());
    302302
    303303    // FIXME: have the WebProcess notify us on state changes.
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp

    r178820 r201079  
    5656void WKBundleInspectorSetPageProfilingEnabled(WKBundleInspectorRef inspectorRef, bool enabled)
    5757{
     58    toImpl(inspectorRef)->show();
     59
    5860    if (enabled)
    5961        toImpl(inspectorRef)->startPageProfiling();
  • trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp

    r199380 r201079  
    197197        return;
    198198
    199     m_page->corePage()->inspectorController().show();
    200199    m_frontendConnection->send(Messages::WebInspectorUI::StartPageProfiling(), 0);
    201200}
     
    206205        return;
    207206
    208     m_page->corePage()->inspectorController().show();
    209207    m_frontendConnection->send(Messages::WebInspectorUI::StopPageProfiling(), 0);
    210208}
Note: See TracChangeset for help on using the changeset viewer.