Changeset 240330 in webkit


Ignore:
Timestamp:
Jan 23, 2019 2:12:56 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[GLIB] Remote Inspector: no data displayed
https://bugs.webkit.org/show_bug.cgi?id=193569

Reviewed by Michael Catanzaro.

Release the remote inspector mutex before using RemoteConnectionToTarget in RemoteInspector::setup() to avoid a
deadlock.

  • inspector/remote/glib/RemoteInspectorGlib.cpp:

(Inspector::RemoteInspector::receivedSetupMessage):
(Inspector::RemoteInspector::setup):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r240329 r240330  
     12019-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GLIB] Remote Inspector: no data displayed
     4        https://bugs.webkit.org/show_bug.cgi?id=193569
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Release the remote inspector mutex before using RemoteConnectionToTarget in RemoteInspector::setup() to avoid a
     9        deadlock.
     10
     11        * inspector/remote/glib/RemoteInspectorGlib.cpp:
     12        (Inspector::RemoteInspector::receivedSetupMessage):
     13        (Inspector::RemoteInspector::setup):
     14
    1152019-01-22  Yusuke Suzuki  <ysuzuki@apple.com>
    216
  • trunk/Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorGlib.cpp

    r232833 r240330  
    294294void RemoteInspector::receivedSetupMessage(unsigned targetIdentifier)
    295295{
    296     std::lock_guard<Lock> lock(m_mutex);
    297296    setup(targetIdentifier);
    298297}
     
    329328void RemoteInspector::setup(unsigned targetIdentifier)
    330329{
    331     RemoteControllableTarget* target = m_targetMap.get(targetIdentifier);
    332     if (!target)
    333         return;
     330    RemoteControllableTarget* target;
     331    {
     332        std::lock_guard<Lock> lock(m_mutex);
     333        target = m_targetMap.get(targetIdentifier);
     334        if (!target)
     335            return;
     336    }
    334337
    335338    auto connectionToTarget = adoptRef(*new RemoteConnectionToTarget(*target));
     
    339342        return;
    340343    }
     344
     345    std::lock_guard<Lock> lock(m_mutex);
    341346    m_targetConnectionMap.set(targetIdentifier, WTFMove(connectionToTarget));
    342347
Note: See TracChangeset for help on using the changeset viewer.