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

Changeset 232157 in webkit


Ignore:
Timestamp:
May 24, 2018, 12:13:28 PM (8 years ago)
Author:
pvollan@apple.com
Message:

Crash under WebKit::PluginProxy::destroy()
​https://bugs.webkit.org/show_bug.cgi?id=185841
<rdar://problem/39936896>

Reviewed by Brent Fulgham.

A release assert in Connection::sencSync is failing since scripts are not allowed in this context,
and the WebKit process is allowed to process incoming messages while waiting for the sync reply.
In this context, scripts are disallowed in the method Element::addShadowRoot. To make sure the
WebContent process will not wait indefinitely for a reply from the Plugin process, use a timeout
of 1 second when sending the message.

  • WebProcess/Plugins/PluginProxy.cpp:

(WebKit::PluginProxy::destroy):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r232151 r232157  
     12018-05-24  Per Arne Vollan  <pvollan@apple.com>
     2
     3        Crash under WebKit::PluginProxy::destroy()
     4        https://bugs.webkit.org/show_bug.cgi?id=185841
     5        <rdar://problem/39936896>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        A release assert in Connection::sencSync is failing since scripts are not allowed in this context,
     10        and the WebKit process is allowed to process incoming messages while waiting for the sync reply.
     11        In this context, scripts are disallowed in the method Element::addShadowRoot. To make sure the
     12        WebContent process will not wait indefinitely for a reply from the Plugin process, use a timeout
     13        of 1 second when sending the message.
     14
     15        * WebProcess/Plugins/PluginProxy.cpp:
     16        (WebKit::PluginProxy::destroy):
     17
    1182018-05-24  Carlos Garcia Campos  <cgarcia@igalia.com>
    219
  • trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.cpp

    r221609 r232157  
    197197        return;
    198198
    199     m_connection->connection()->sendSync(Messages::WebProcessConnection::DestroyPlugin(m_pluginInstanceID, m_waitingOnAsynchronousInitialization), Messages::WebProcessConnection::DestroyPlugin::Reply(), 0);
     199    // Although this message is sent synchronously, the Plugin process replies immediately (before performing any tasks) so this is only waiting for
     200    // confirmation that the Plugin process received the DestroyPlugin message.
     201    m_connection->connection()->sendSync(Messages::WebProcessConnection::DestroyPlugin(m_pluginInstanceID, m_waitingOnAsynchronousInitialization), Messages::WebProcessConnection::DestroyPlugin::Reply(), 0, 1_s, IPC::SendSyncOption::DoNotProcessIncomingMessagesWhenWaitingForSyncReply);
    200202    m_connection->removePluginProxy(this);
    201203}
Note: See TracChangeset for help on using the changeset viewer.