<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[213175] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/213175">213175</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2017-02-28 13:56:44 -0800 (Tue, 28 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove setExclusiveThread() and peers from the JSLock.
https://bugs.webkit.org/show_bug.cgi?id=168977

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

JSLock::setExclusiveThread() was only used by WebCore.  Benchmarking with
Speedometer, we see that removal of exclusive thread status has no measurable
impact on performance.  So, let's remove the code for handling exclusive thread
status, and simplify the JSLock code.

For the records, exclusive thread status does improve JSLock locking/unlocking
time by up to 20%.  However, this difference is not measurable in the way WebCore
uses the JSLock as confirmed by Speedometer.

Also applied a minor optimization in JSLock::lock() to assume the initial lock
entry case (as opposed to the re-entry case).  This appears to shows a small
fractional improvement (about 5%) in JSLock cumulative locking and unlocking
time in a micro-benchmark.

* heap/Heap.cpp:
(JSC::Heap::Heap):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::MachineThreads):
(JSC::MachineThreads::addCurrentThread):
* heap/MachineStackMarker.h:
* runtime/JSLock.cpp:
(JSC::JSLock::JSLock):
(JSC::JSLock::lock):
(JSC::JSLock::unlock):
(JSC::JSLock::currentThreadIsHoldingLock):
(JSC::JSLock::dropAllLocks):
(JSC::JSLock::grabAllLocks):
(JSC::JSLock::setExclusiveThread): Deleted.
* runtime/JSLock.h:
(JSC::JSLock::ownerThread):
(JSC::JSLock::hasExclusiveThread): Deleted.
(JSC::JSLock::exclusiveThread): Deleted.
* runtime/VM.h:
(JSC::VM::hasExclusiveThread): Deleted.
(JSC::VM::exclusiveThread): Deleted.
(JSC::VM::setExclusiveThread): Deleted.

Source/WebCore:

No new tests because this should already be covered by existing tests.

* bindings/js/CommonVM.cpp:
(WebCore::commonVMSlow):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapcpp">trunk/Source/JavaScriptCore/heap/Heap.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMachineStackMarkercpp">trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMachineStackMarkerh">trunk/Source/JavaScriptCore/heap/MachineStackMarker.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSLockcpp">trunk/Source/JavaScriptCore/runtime/JSLock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSLockh">trunk/Source/JavaScriptCore/runtime/JSLock.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMh">trunk/Source/JavaScriptCore/runtime/VM.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsCommonVMcpp">trunk/Source/WebCore/bindings/js/CommonVM.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2017-02-28  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Remove setExclusiveThread() and peers from the JSLock.
+        https://bugs.webkit.org/show_bug.cgi?id=168977
+
+        Reviewed by Filip Pizlo.
+
+        JSLock::setExclusiveThread() was only used by WebCore.  Benchmarking with
+        Speedometer, we see that removal of exclusive thread status has no measurable
+        impact on performance.  So, let's remove the code for handling exclusive thread
+        status, and simplify the JSLock code.
+
+        For the records, exclusive thread status does improve JSLock locking/unlocking
+        time by up to 20%.  However, this difference is not measurable in the way WebCore
+        uses the JSLock as confirmed by Speedometer.
+
+        Also applied a minor optimization in JSLock::lock() to assume the initial lock
+        entry case (as opposed to the re-entry case).  This appears to shows a small
+        fractional improvement (about 5%) in JSLock cumulative locking and unlocking
+        time in a micro-benchmark.
+
+        * heap/Heap.cpp:
+        (JSC::Heap::Heap):
+        * heap/MachineStackMarker.cpp:
+        (JSC::MachineThreads::MachineThreads):
+        (JSC::MachineThreads::addCurrentThread):
+        * heap/MachineStackMarker.h:
+        * runtime/JSLock.cpp:
+        (JSC::JSLock::JSLock):
+        (JSC::JSLock::lock):
+        (JSC::JSLock::unlock):
+        (JSC::JSLock::currentThreadIsHoldingLock):
+        (JSC::JSLock::dropAllLocks):
+        (JSC::JSLock::grabAllLocks):
+        (JSC::JSLock::setExclusiveThread): Deleted.
+        * runtime/JSLock.h:
+        (JSC::JSLock::ownerThread):
+        (JSC::JSLock::hasExclusiveThread): Deleted.
+        (JSC::JSLock::exclusiveThread): Deleted.
+        * runtime/VM.h:
+        (JSC::VM::hasExclusiveThread): Deleted.
+        (JSC::VM::exclusiveThread): Deleted.
+        (JSC::VM::setExclusiveThread): Deleted.
+
</ins><span class="cx"> 2017-02-28  Saam Barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Arm64 disassembler prints &quot;ars&quot; instead of &quot;asr&quot;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.cpp (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.cpp        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/JavaScriptCore/heap/Heap.cpp        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx">     , m_objectSpace(this)
</span><span class="cx">     , m_extraMemorySize(0)
</span><span class="cx">     , m_deprecatedExtraMemorySize(0)
</span><del>-    , m_machineThreads(std::make_unique&lt;MachineThreads&gt;(this))
</del><ins>+    , m_machineThreads(std::make_unique&lt;MachineThreads&gt;())
</ins><span class="cx">     , m_collectorSlotVisitor(std::make_unique&lt;SlotVisitor&gt;(*this, &quot;C&quot;))
</span><span class="cx">     , m_mutatorSlotVisitor(std::make_unique&lt;SlotVisitor&gt;(*this, &quot;M&quot;))
</span><span class="cx">     , m_mutatorMarkStack(std::make_unique&lt;MarkStackArray&gt;())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMachineStackMarkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -190,14 +190,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-MachineThreads::MachineThreads(Heap* heap)
</del><ins>+MachineThreads::MachineThreads()
</ins><span class="cx">     : m_registeredThreads(0)
</span><span class="cx">     , m_threadSpecificForMachineThreads(0)
</span><del>-#if !ASSERT_DISABLED
-    , m_heap(heap)
-#endif
</del><span class="cx"> {
</span><del>-    UNUSED_PARAM(heap);
</del><span class="cx">     threadSpecificKeyCreate(&amp;m_threadSpecificForMachineThreads, removeThread);
</span><span class="cx">     activeMachineThreadsManager().add(this);
</span><span class="cx"> }
</span><span class="lines">@@ -234,8 +230,6 @@
</span><span class="cx"> 
</span><span class="cx"> void MachineThreads::addCurrentThread()
</span><span class="cx"> {
</span><del>-    ASSERT(!m_heap-&gt;vm()-&gt;hasExclusiveThread() || m_heap-&gt;vm()-&gt;exclusiveThread() == std::this_thread::get_id());
-
</del><span class="cx">     if (threadSpecificGet(m_threadSpecificForMachineThreads)) {
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">         LockHolder lock(m_registeredThreadsMutex);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMachineStackMarkerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MachineStackMarker.h (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MachineStackMarker.h        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/JavaScriptCore/heap/MachineStackMarker.h        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> class MachineThreads {
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(MachineThreads);
</span><span class="cx"> public:
</span><del>-    MachineThreads(Heap*);
</del><ins>+    MachineThreads();
</ins><span class="cx">     ~MachineThreads();
</span><span class="cx"> 
</span><span class="cx">     void gatherConservativeRoots(ConservativeRoots&amp;, JITStubRoutineSet&amp;, CodeBlockSet&amp;, CurrentThreadState*);
</span><span class="lines">@@ -163,9 +163,6 @@
</span><span class="cx">     Lock m_registeredThreadsMutex;
</span><span class="cx">     Thread* m_registeredThreads;
</span><span class="cx">     WTF::ThreadSpecificKey m_threadSpecificForMachineThreads;
</span><del>-#if !ASSERT_DISABLED
-    Heap* m_heap;
-#endif
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #define DECLARE_AND_COMPUTE_CURRENT_THREAD_STATE(stateName) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSLockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSLock.cpp (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSLock.cpp        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/JavaScriptCore/runtime/JSLock.cpp        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2008, 2012, 2014, 2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005-2017 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * This library is free software; you can redistribute it and/or
</span><span class="cx">  * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -78,7 +78,6 @@
</span><span class="cx">     : m_ownerThreadID(std::thread::id())
</span><span class="cx">     , m_lockCount(0)
</span><span class="cx">     , m_lockDropDepth(0)
</span><del>-    , m_hasExclusiveThread(false)
</del><span class="cx">     , m_vm(vm)
</span><span class="cx">     , m_entryAtomicStringTable(nullptr)
</span><span class="cx"> {
</span><span class="lines">@@ -94,13 +93,6 @@
</span><span class="cx">     m_vm = nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void JSLock::setExclusiveThread(std::thread::id threadId)
-{
-    RELEASE_ASSERT(!m_lockCount &amp;&amp; m_ownerThreadID == std::thread::id());
-    m_hasExclusiveThread = (threadId != std::thread::id());
-    m_ownerThreadID = threadId;
-}
-
</del><span class="cx"> void JSLock::lock()
</span><span class="cx"> {
</span><span class="cx">     lock(1);
</span><span class="lines">@@ -109,15 +101,16 @@
</span><span class="cx"> void JSLock::lock(intptr_t lockCount)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(lockCount &gt; 0);
</span><del>-    if (currentThreadIsHoldingLock()) {
-        m_lockCount += lockCount;
-        return;
</del><ins>+    bool success = m_lock.tryLock();
+    if (UNLIKELY(!success)) {
+        if (currentThreadIsHoldingLock()) {
+            m_lockCount += lockCount;
+            return;
+        }
+        m_lock.lock();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (!m_hasExclusiveThread) {
-        m_lock.lock();
-        m_ownerThreadID = std::this_thread::get_id();
-    }
</del><ins>+    m_ownerThreadID = std::this_thread::get_id();
</ins><span class="cx">     ASSERT(!m_lockCount);
</span><span class="cx">     m_lockCount = lockCount;
</span><span class="cx"> 
</span><span class="lines">@@ -175,11 +168,8 @@
</span><span class="cx">     m_lockCount -= unlockCount;
</span><span class="cx"> 
</span><span class="cx">     if (!m_lockCount) {
</span><del>-        
-        if (!m_hasExclusiveThread) {
-            m_ownerThreadID = std::thread::id();
-            m_lock.unlock();
-        }
</del><ins>+        m_ownerThreadID = std::thread::id();
+        m_lock.unlock();
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -214,9 +204,6 @@
</span><span class="cx"> 
</span><span class="cx"> bool JSLock::currentThreadIsHoldingLock()
</span><span class="cx"> {
</span><del>-    ASSERT(!m_hasExclusiveThread || (exclusiveThread() == std::this_thread::get_id()));
-    if (m_hasExclusiveThread)
-        return !!m_lockCount;
</del><span class="cx">     return m_ownerThreadID == std::this_thread::get_id();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -223,11 +210,6 @@
</span><span class="cx"> // This function returns the number of locks that were dropped.
</span><span class="cx"> unsigned JSLock::dropAllLocks(DropAllLocks* dropper)
</span><span class="cx"> {
</span><del>-    if (m_hasExclusiveThread) {
-        ASSERT(exclusiveThread() == std::this_thread::get_id());
-        return 0;
-    }
-
</del><span class="cx">     if (!currentThreadIsHoldingLock())
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><span class="lines">@@ -247,8 +229,6 @@
</span><span class="cx"> 
</span><span class="cx"> void JSLock::grabAllLocks(DropAllLocks* dropper, unsigned droppedLockCount)
</span><span class="cx"> {
</span><del>-    ASSERT(!m_hasExclusiveThread || !droppedLockCount);
-
</del><span class="cx">     // If no locks were dropped, nothing to do!
</span><span class="cx">     if (!droppedLockCount)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSLockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSLock.h (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSLock.h        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/JavaScriptCore/runtime/JSLock.h        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2005, 2008, 2009, 2014, 2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2005-2017 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * This library is free software; you can redistribute it and/or
</span><span class="cx">  * modify it under the terms of the GNU Library General Public
</span><span class="lines">@@ -93,14 +93,7 @@
</span><span class="cx"> 
</span><span class="cx">     VM* vm() { return m_vm; }
</span><span class="cx"> 
</span><del>-    bool hasExclusiveThread() const { return m_hasExclusiveThread; }
-    std::thread::id exclusiveThread() const
-    {
-        ASSERT(m_hasExclusiveThread);
-        return m_ownerThreadID;
-    }
</del><span class="cx">     std::thread::id ownerThread() const { return m_ownerThreadID; }
</span><del>-    JS_EXPORT_PRIVATE void setExclusiveThread(std::thread::id);
</del><span class="cx">     JS_EXPORT_PRIVATE bool currentThreadIsHoldingLock();
</span><span class="cx"> 
</span><span class="cx">     void willDestroyVM(VM*);
</span><span class="lines">@@ -136,7 +129,6 @@
</span><span class="cx">     std::thread::id m_ownerThreadID;
</span><span class="cx">     intptr_t m_lockCount;
</span><span class="cx">     unsigned m_lockDropDepth;
</span><del>-    bool m_hasExclusiveThread;
</del><span class="cx">     bool m_shouldReleaseHeapAccess;
</span><span class="cx">     VM* m_vm;
</span><span class="cx">     AtomicStringTable* m_entryAtomicStringTable; 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.h (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.h        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/JavaScriptCore/runtime/VM.h        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -611,10 +611,6 @@
</span><span class="cx">     RTTraceList* m_rtTraceList;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool hasExclusiveThread() const { return m_apiLock-&gt;hasExclusiveThread(); }
-    std::thread::id exclusiveThread() const { return m_apiLock-&gt;exclusiveThread(); }
-    void setExclusiveThread(std::thread::id threadId) { m_apiLock-&gt;setExclusiveThread(threadId); }
-
</del><span class="cx">     std::thread::id ownerThread() const { return m_apiLock-&gt;ownerThread(); }
</span><span class="cx"> 
</span><span class="cx">     JS_EXPORT_PRIVATE void resetDateCache();
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/WebCore/ChangeLog        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-02-28  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Remove setExclusiveThread() and peers from the JSLock.
+        https://bugs.webkit.org/show_bug.cgi?id=168977
+
+        Reviewed by Filip Pizlo.
+
+        No new tests because this should already be covered by existing tests.
+
+        * bindings/js/CommonVM.cpp:
+        (WebCore::commonVMSlow):
+
</ins><span class="cx"> 2017-02-28  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Centering text inside a button set to display flex and justify-content: center is impossible
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCommonVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/CommonVM.cpp (213174 => 213175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CommonVM.cpp        2017-02-28 21:54:38 UTC (rev 213174)
+++ trunk/Source/WebCore/bindings/js/CommonVM.cpp        2017-02-28 21:56:44 UTC (rev 213175)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2016 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2016-2017 Apple Inc. All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -53,9 +53,7 @@
</span><span class="cx">     ScriptController::initializeThreading();
</span><span class="cx">     g_commonVMOrNull = &amp;VM::createLeaked(LargeHeap).leakRef();
</span><span class="cx">     g_commonVMOrNull-&gt;heap.acquireAccess(); // At any time, we may do things that affect the GC.
</span><del>-#if !PLATFORM(IOS)
-    g_commonVMOrNull-&gt;setExclusiveThread(std::this_thread::get_id());
-#else
</del><ins>+#if PLATFORM(IOS)
</ins><span class="cx">     g_commonVMOrNull-&gt;heap.setRunLoop(WebThreadRunLoop());
</span><span class="cx">     g_commonVMOrNull-&gt;heap.machineThreads().addCurrentThread();
</span><span class="cx"> #endif
</span></span></pre>
</div>
</div>

</body>
</html>