Changeset 202464 in webkit


Ignore:
Timestamp:
Jun 24, 2016 5:36:47 PM (8 years ago)
Author:
BJ Burg
Message:

REGRESSION(r201171): CRASH at WebKit::WebInspectorProxy::open() + 31 when running inspector layout tests
https://bugs.webkit.org/show_bug.cgi?id=159070
<rdar://problem/26768628>

Reviewed by Joseph Pecoraro.

We have been seeing a few crashes underneath WebInspectorProxy::bringToFront() on the bots.
Previously, this code didn't use m_inspectorPage so there was nothing to null-dereference.

However, it doesn't make sense that we would hit the null dereference here:

  • The only caller of bringToFront() on the WebProcess side is InspectorController::show(). It only tries to bring to front if there is already a local frontend connection, which shouldn't be the case if m_inspectorPage is null.
  • It's guarded by m_underTest, which should have been set to true in createInspectorPage().

These clues lead me to believe that we may be improperly tearing down the inspector between tests.
For example, it seems possible that a local frontend connection is not being torn down, so
InspectorController never asks to create a inspector page when the next test calls showWebInspector.

Since this crash is not easy to reproduce, we don't have much to go on. For now, this patch
adds an early return in the case where m_inspectorPage is null when calling open().

  • UIProcess/WebInspectorProxy.cpp:

(WebKit::WebInspectorProxy::open):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r202455 r202464  
     12016-06-24  Brian Burg  <bburg@apple.com>
     2
     3        REGRESSION(r201171): CRASH at WebKit::WebInspectorProxy::open() + 31 when running inspector layout tests
     4        https://bugs.webkit.org/show_bug.cgi?id=159070
     5        <rdar://problem/26768628>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        We have been seeing a few crashes underneath WebInspectorProxy::bringToFront() on the bots.
     10        Previously, this code didn't use m_inspectorPage so there was nothing to null-dereference.
     11
     12        However, it doesn't make sense that we would hit the null dereference here:
     13
     14         - The only caller of bringToFront() on the WebProcess side is InspectorController::show().
     15           It only tries to bring to front if there is already a local frontend connection, which
     16           shouldn't be the case if m_inspectorPage is null.
     17
     18         - It's guarded by m_underTest, which should have been set to true in createInspectorPage().
     19
     20        These clues lead me to believe that we may be improperly tearing down the inspector between tests.
     21        For example, it seems possible that a local frontend connection is not being torn down, so
     22        InspectorController never asks to create a inspector page when the next test calls showWebInspector.
     23
     24        Since this crash is not easy to reproduce, we don't have much to go on. For now, this patch
     25        adds an early return in the case where m_inspectorPage is null when calling open().
     26
     27        * UIProcess/WebInspectorProxy.cpp:
     28        (WebKit::WebInspectorProxy::open):
     29
    1302016-06-24  Jer Noble  <jer.noble@apple.com>
    231
  • trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp

    r201171 r202464  
    581581        return;
    582582
     583    if (!m_inspectorPage)
     584        return;
     585
    583586    m_isVisible = true;
    584587    m_inspectorPage->process().send(Messages::WebInspectorUI::SetIsVisible(m_isVisible), m_inspectorPage->pageID());
Note: See TracChangeset for help on using the changeset viewer.