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

Changeset 271408 in webkit


Ignore:
Timestamp:
Jan 12, 2021, 11:05:02 AM (6 years ago)
Author:
Wenson Hsieh
Message:

ASSERTION FAILED: m_connection under WebKit::WebPageProxy::acceptsFirstMouse()
https://bugs.webkit.org/show_bug.cgi?id=220545
<rdar://problem/73043854>

Reviewed by Tim Horton.

Avoid the assertion by making it safe to call WebPageProxy::messageSenderConnection in debug builds, in the
case where the web process is still launching.

  • UIProcess/AuxiliaryProcessProxy.h:

(WebKit::AuxiliaryProcessProxy::hasConnection const):

Add a helper method that returns whether or not a process proxy has a non-null connection.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::messageSenderConnection const):

Use the above helper to avoid calling into AuxiliaryProcessProxy::connection() when the connection is null.

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r271405 r271408  
     12021-01-12  Wenson Hsieh  <wenson_hsieh@apple.com>
     2
     3        ASSERTION FAILED: m_connection under WebKit::WebPageProxy::acceptsFirstMouse()
     4        https://bugs.webkit.org/show_bug.cgi?id=220545
     5        <rdar://problem/73043854>
     6
     7        Reviewed by Tim Horton.
     8
     9        Avoid the assertion by making it safe to call `WebPageProxy::messageSenderConnection` in debug builds, in the
     10        case where the web process is still launching.
     11
     12        * UIProcess/AuxiliaryProcessProxy.h:
     13        (WebKit::AuxiliaryProcessProxy::hasConnection const):
     14
     15        Add a helper method that returns whether or not a process proxy has a non-null connection.
     16
     17        * UIProcess/WebPageProxy.cpp:
     18        (WebKit::WebPageProxy::messageSenderConnection const):
     19
     20        Use the above helper to avoid calling into `AuxiliaryProcessProxy::connection()` when the connection is null.
     21
    1222021-01-12  Jer Noble  <jer.noble@apple.com>
    223
  • trunk/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h

    r270573 r271408  
    7777        return m_connection.get();
    7878    }
     79
     80    bool hasConnection() const
     81    {
     82        return !!m_connection;
     83    }
    7984   
    8085    bool hasConnection(const IPC::Connection& connection) const
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r271381 r271408  
    64426442IPC::Connection* WebPageProxy::messageSenderConnection() const
    64436443{
    6444     return m_process->connection();
     6444    return m_process->hasConnection() ? m_process->connection() : nullptr;
    64456445}
    64466446
Note: See TracChangeset for help on using the changeset viewer.