follow-up to: JSC Sampling Profiler: (host) is confusing in cases where I would expec...
authorsbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Feb 2016 21:41:24 +0000 (21:41 +0000)
committersbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Feb 2016 21:41:24 +0000 (21:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=153663
<rdar://problem/24415092>

Rubber stamped by Joseph Pecoraro.

We were performing operations that required us to
hold the VM lock even when we might not have been holding it.
We now ensure we're holding it.

* inspector/agents/InspectorScriptProfilerAgent.cpp:
(Inspector::InspectorScriptProfilerAgent::trackingComplete):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196188 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp

index bd2e83c..6a27a63 100644 (file)
@@ -1,3 +1,18 @@
+2016-02-05  Saam barati  <sbarati@apple.com>
+
+        follow-up to: JSC Sampling Profiler: (host) is confusing in cases where I would expect to see JS name
+        https://bugs.webkit.org/show_bug.cgi?id=153663
+        <rdar://problem/24415092>
+
+        Rubber stamped by Joseph Pecoraro.
+
+        We were performing operations that required us to
+        hold the VM lock even when we might not have been holding it.
+        We now ensure we're holding it.
+
+        * inspector/agents/InspectorScriptProfilerAgent.cpp:
+        (Inspector::InspectorScriptProfilerAgent::trackingComplete):
+
 2016-02-05  Filip Pizlo  <fpizlo@apple.com>
 
         Arrayify for a typed array shouldn't create a monster
index a06b8a0..21282ba 100644 (file)
@@ -190,6 +190,7 @@ void InspectorScriptProfilerAgent::trackingComplete()
 {
 #if ENABLE(SAMPLING_PROFILER)
     if (m_enabledSamplingProfiler) {
+        JSLockHolder lock(m_environment.scriptDebugServer().vm());
         SamplingProfiler* samplingProfiler = m_environment.scriptDebugServer().vm().samplingProfiler();
         RELEASE_ASSERT(samplingProfiler);
         LockHolder locker(samplingProfiler->getLock());