Changeset 238369 in webkit


Ignore:
Timestamp:
Nov 18, 2018 11:29:15 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Regression(r238330) ProcessSwap.WebInspector API test is a flaky crash in debug
https://bugs.webkit.org/show_bug.cgi?id=191812

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2018-11-18
Reviewed by Chris Dumez.

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::setFrontendConnection):
It can be possible to receive a frontend connection multiple times
if another WebProcess opened the inspector and this WebProcess got
swapped in before the InspectorProcess notified the WebProcess of
a connection to use. It is always best to use the latest connection
we have received, since any others would have been invalidated.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r238368 r238369  
     12018-11-18  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Regression(r238330) ProcessSwap.WebInspector API test is a flaky crash in debug
     4        https://bugs.webkit.org/show_bug.cgi?id=191812
     5
     6        Reviewed by Chris Dumez.
     7
     8        * WebProcess/WebPage/WebInspector.cpp:
     9        (WebKit::WebInspector::setFrontendConnection):
     10        It can be possible to receive a frontend connection multiple times
     11        if another WebProcess opened the inspector and this WebProcess got
     12        swapped in before the InspectorProcess notified the WebProcess of
     13        a connection to use. It is always best to use the latest connection
     14        we have received, since any others would have been invalidated.
     15
    1162018-11-18  Chris Dumez  <cdumez@apple.com>
    217
  • trunk/Source/WebKit/WebProcess/WebPage/WebInspector.cpp

    r238330 r238369  
    7878void WebInspector::setFrontendConnection(IPC::Attachment encodedConnectionIdentifier)
    7979{
    80     ASSERT(!m_frontendConnection);
     80    // We might receive multiple updates if this web process got swapped into a WebPageProxy
     81    // shortly after another process established the connection.
     82    if (m_frontendConnection) {
     83        m_frontendConnection->invalidate();
     84        m_frontendConnection = nullptr;
     85    }
    8186
    8287#if USE(UNIX_DOMAIN_SOCKETS)
Note: See TracChangeset for help on using the changeset viewer.