- a/Source/WebKit2/ChangeLog +11 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2015-08-12  Brian Burg  <bburg@apple.com>
2
3
        Web Inspector: CRASH under WebInspector::closeFrontend for some protocol tests
4
        https://bugs.webkit.org/show_bug.cgi?id=147948
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * WebProcess/WebPage/WebInspector.cpp:
9
        (WebKit::WebInspector::closeFrontend): Don't invalidate the channel if it's null.
10
        * WebProcess/WebPage/WebInspector.h: Add default member variable values.
11
1
2015-08-12  Enrica Casucci  <enrica@apple.com>
12
2015-08-12  Enrica Casucci  <enrica@apple.com>
2
13
3
        Element interaction should not be canceled when the menu is already being shown.
14
        Element interaction should not be canceled when the menu is already being shown.
- a/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp -7 / +5 lines
Lines 60-70 Ref<WebInspector> WebInspector::create(WebPage* page) a/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp_sec1
60
60
61
WebInspector::WebInspector(WebPage* page)
61
WebInspector::WebInspector(WebPage* page)
62
    : m_page(page)
62
    : m_page(page)
63
    , m_attached(false)
64
    , m_previousCanAttach(false)
65
#if ENABLE(INSPECTOR_SERVER)
66
    , m_remoteFrontendConnected(false)
67
#endif
68
{
63
{
69
}
64
}
70
65
Lines 102-109 void WebInspector::closeFrontend() a/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp_sec2
102
{
97
{
103
    WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::DidClose(), m_page->pageID());
98
    WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::DidClose(), m_page->pageID());
104
99
105
    m_frontendConnection->invalidate();
100
    // If we tried to close the frontend before it was created, then no connection exists yet.
106
    m_frontendConnection = nullptr;
101
    if (m_frontendConnection) {
102
        m_frontendConnection->invalidate();
103
        m_frontendConnection = nullptr;
104
    }
107
105
108
    m_attached = false;
106
    m_attached = false;
109
    m_previousCanAttach = false;
107
    m_previousCanAttach = false;
- a/Source/WebKit2/WebProcess/WebPage/WebInspector.h -3 / +3 lines
Lines 105-114 private: a/Source/WebKit2/WebProcess/WebPage/WebInspector.h_sec1
105
105
106
    RefPtr<IPC::Connection> m_frontendConnection;
106
    RefPtr<IPC::Connection> m_frontendConnection;
107
107
108
    bool m_attached;
108
    bool m_attached { false };
109
    bool m_previousCanAttach;
109
    bool m_previousCanAttach { false };
110
#if ENABLE(INSPECTOR_SERVER)
110
#if ENABLE(INSPECTOR_SERVER)
111
    bool m_remoteFrontendConnected;
111
    bool m_remoteFrontendConnected { false };
112
#endif
112
#endif
113
};
113
};
114
114

Return to Bug 147948