⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287786 in webkit


Ignore:
Timestamp:
Jan 7, 2022, 2:46:50 PM (5 years ago)
Author:
Patrick Angle
Message:

REGRESSION(r286498): Web Inspector: Inspector2 fails to load in release builds and crashes with an assertion in debug builds
https://bugs.webkit.org/show_bug.cgi?id=234968

Reviewed by Devin Rousso.

Inspector2 would fail to open a local inspector frontend because m_inspectedPageIdentifier was not set before
it was used in WebInspectorUIProxy::createFrontendPage. To correct this, we now cache the inspected page
identifier immediately upon creating the WebInspectorUIProxy, instead of only in
WebInspectorUIProxy::updateForNewPageProcess. This also allows us to use the cached identifier in
WebInspectorUIProxy::openLocalInspectorFrontend as discussed in <http://webkit.org/b/233293#c5>.

  • UIProcess/Inspector/WebInspectorUIProxy.cpp:

(WebKit::WebInspectorUIProxy::WebInspectorUIProxy):
(WebKit::WebInspectorUIProxy::openLocalInspectorFrontend):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r287782 r287786  
     12022-01-07  Patrick Angle  <pangle@apple.com>
     2
     3        REGRESSION(r286498): Web Inspector: Inspector^2 fails to load in release builds and crashes with an assertion in debug builds
     4        https://bugs.webkit.org/show_bug.cgi?id=234968
     5
     6        Reviewed by Devin Rousso.
     7
     8        Inspector^2 would fail to open a local inspector frontend because m_inspectedPageIdentifier was not set before
     9        it was used in `WebInspectorUIProxy::createFrontendPage`. To correct this, we now cache the inspected page
     10        identifier immediately upon creating the WebInspectorUIProxy, instead of only in
     11        `WebInspectorUIProxy::updateForNewPageProcess`. This also allows us to use the cached identifier in
     12        `WebInspectorUIProxy::openLocalInspectorFrontend` as discussed in <http://webkit.org/b/233293#c5>.
     13
     14        * UIProcess/Inspector/WebInspectorUIProxy.cpp:
     15        (WebKit::WebInspectorUIProxy::WebInspectorUIProxy):
     16        (WebKit::WebInspectorUIProxy::openLocalInspectorFrontend):
     17
    1182022-01-07  Said Abou-Hallawa  <said@apple.com>
    219
  • trunk/Source/WebKit/UIProcess/Inspector/WebInspectorUIProxy.cpp

    r286772 r287786  
    6868    : m_inspectedPage(&inspectedPage)
    6969    , m_inspectorClient(makeUnique<API::InspectorClient>())
     70    , m_inspectedPageIdentifier(inspectedPage.identifier())
    7071#if PLATFORM(MAC)
    7172    , m_closeFrontendAfterInactivityTimer(RunLoop::main(), this, &WebInspectorUIProxy::closeFrontendAfterInactivityTimerFired)
     
    449450        return;
    450451
    451     m_inspectorPage->send(Messages::WebInspectorUI::EstablishConnection(m_inspectedPage->identifier(), infoForLocalDebuggable(), m_underTest, inspectionLevel()));
     452    m_inspectorPage->send(Messages::WebInspectorUI::EstablishConnection(m_inspectedPageIdentifier, infoForLocalDebuggable(), m_underTest, inspectionLevel()));
    452453
    453454    ASSERT(!m_isActiveFrontend);
Note: See TracChangeset for help on using the changeset viewer.