Title: [240330] trunk/Source/_javascript_Core
Revision
240330
Author
[email protected]
Date
2019-01-23 02:12:56 -0800 (Wed, 23 Jan 2019)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (240329 => 240330)


--- trunk/Source/_javascript_Core/ChangeLog	2019-01-23 06:21:41 UTC (rev 240329)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-01-23 10:12:56 UTC (rev 240330)
@@ -1,3 +1,17 @@
+2019-01-23  Carlos Garcia Campos  <[email protected]>
+
+        [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):
+
 2019-01-22  Yusuke Suzuki  <[email protected]>
 
         Unreviewed, fix initial global lexical binding epoch

Modified: trunk/Source/_javascript_Core/inspector/remote/glib/RemoteInspectorGlib.cpp (240329 => 240330)


--- trunk/Source/_javascript_Core/inspector/remote/glib/RemoteInspectorGlib.cpp	2019-01-23 06:21:41 UTC (rev 240329)
+++ trunk/Source/_javascript_Core/inspector/remote/glib/RemoteInspectorGlib.cpp	2019-01-23 10:12:56 UTC (rev 240330)
@@ -293,7 +293,6 @@
 
 void RemoteInspector::receivedSetupMessage(unsigned targetIdentifier)
 {
-    std::lock_guard<Lock> lock(m_mutex);
     setup(targetIdentifier);
 }
 
@@ -328,9 +327,13 @@
 
 void RemoteInspector::setup(unsigned targetIdentifier)
 {
-    RemoteControllableTarget* target = m_targetMap.get(targetIdentifier);
-    if (!target)
-        return;
+    RemoteControllableTarget* target;
+    {
+        std::lock_guard<Lock> lock(m_mutex);
+        target = m_targetMap.get(targetIdentifier);
+        if (!target)
+            return;
+    }
 
     auto connectionToTarget = adoptRef(*new RemoteConnectionToTarget(*target));
     ASSERT(is<RemoteInspectionTarget>(target) || is<RemoteAutomationTarget>(target));
@@ -338,6 +341,8 @@
         connectionToTarget->close();
         return;
     }
+
+    std::lock_guard<Lock> lock(m_mutex);
     m_targetConnectionMap.set(targetIdentifier, WTFMove(connectionToTarget));
 
     updateHasActiveDebugSession();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to