<!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>[213657] 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/213657">213657</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2017-03-09 13:05:41 -0800 (Thu, 09 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use const AbstractLocker&amp; (instead of const LockHolder&amp;) in more places.
https://bugs.webkit.org/show_bug.cgi?id=169424

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

* heap/CodeBlockSet.cpp:
(JSC::CodeBlockSet::promoteYoungCodeBlocks):
* heap/CodeBlockSet.h:
* heap/CodeBlockSetInlines.h:
(JSC::CodeBlockSet::mark):
* heap/ConservativeRoots.cpp:
(JSC::CompositeMarkHook::CompositeMarkHook):
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::tryCopyOtherThreadStacks):
* heap/MachineStackMarker.h:
* profiler/ProfilerDatabase.cpp:
(JSC::Profiler::Database::ensureBytecodesFor):
* profiler/ProfilerDatabase.h:
* runtime/SamplingProfiler.cpp:
(JSC::FrameWalker::FrameWalker):
(JSC::CFrameWalker::CFrameWalker):
(JSC::SamplingProfiler::createThreadIfNecessary):
(JSC::SamplingProfiler::takeSample):
(JSC::SamplingProfiler::start):
(JSC::SamplingProfiler::pause):
(JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
(JSC::SamplingProfiler::clearData):
(JSC::SamplingProfiler::releaseStackTraces):
* runtime/SamplingProfiler.h:
(JSC::SamplingProfiler::setStopWatch):
* wasm/WasmMemory.cpp:
(JSC::Wasm::availableFastMemories):
(JSC::Wasm::activeFastMemories):
(JSC::Wasm::viewActiveFastMemories):
* wasm/WasmMemory.h:

Source/WTF:

* wtf/RunLoop.h:
* wtf/generic/RunLoopGeneric.cpp:
(WTF::RunLoop::wakeUp):
(WTF::RunLoop::schedule):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCodeBlockSetcpp">trunk/Source/JavaScriptCore/heap/CodeBlockSet.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCodeBlockSeth">trunk/Source/JavaScriptCore/heap/CodeBlockSet.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapCodeBlockSetInlinesh">trunk/Source/JavaScriptCore/heap/CodeBlockSetInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapConservativeRootscpp">trunk/Source/JavaScriptCore/heap/ConservativeRoots.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="#trunkSourceJavaScriptCoreprofilerProfilerDatabasecpp">trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreprofilerProfilerDatabaseh">trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSamplingProfilercpp">trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSamplingProfilerh">trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemorycpp">trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorewasmWasmMemoryh">trunk/Source/JavaScriptCore/wasm/WasmMemory.h</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfRunLooph">trunk/Source/WTF/wtf/RunLoop.h</a></li>
<li><a href="#trunkSourceWTFwtfgenericRunLoopGenericcpp">trunk/Source/WTF/wtf/generic/RunLoopGeneric.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2017-03-09  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        Use const AbstractLocker&amp; (instead of const LockHolder&amp;) in more places.
+        https://bugs.webkit.org/show_bug.cgi?id=169424
+
+        Reviewed by Filip Pizlo.
+
+        * heap/CodeBlockSet.cpp:
+        (JSC::CodeBlockSet::promoteYoungCodeBlocks):
+        * heap/CodeBlockSet.h:
+        * heap/CodeBlockSetInlines.h:
+        (JSC::CodeBlockSet::mark):
+        * heap/ConservativeRoots.cpp:
+        (JSC::CompositeMarkHook::CompositeMarkHook):
+        * heap/MachineStackMarker.cpp:
+        (JSC::MachineThreads::tryCopyOtherThreadStacks):
+        * heap/MachineStackMarker.h:
+        * profiler/ProfilerDatabase.cpp:
+        (JSC::Profiler::Database::ensureBytecodesFor):
+        * profiler/ProfilerDatabase.h:
+        * runtime/SamplingProfiler.cpp:
+        (JSC::FrameWalker::FrameWalker):
+        (JSC::CFrameWalker::CFrameWalker):
+        (JSC::SamplingProfiler::createThreadIfNecessary):
+        (JSC::SamplingProfiler::takeSample):
+        (JSC::SamplingProfiler::start):
+        (JSC::SamplingProfiler::pause):
+        (JSC::SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread):
+        (JSC::SamplingProfiler::clearData):
+        (JSC::SamplingProfiler::releaseStackTraces):
+        * runtime/SamplingProfiler.h:
+        (JSC::SamplingProfiler::setStopWatch):
+        * wasm/WasmMemory.cpp:
+        (JSC::Wasm::availableFastMemories):
+        (JSC::Wasm::activeFastMemories):
+        (JSC::Wasm::viewActiveFastMemories):
+        * wasm/WasmMemory.h:
+
</ins><span class="cx"> 2017-03-09  Saam Barati  &lt;sbarati@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         WebAssembly: Make the Unity AngryBots demo run
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCodeBlockSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CodeBlockSet.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CodeBlockSet.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/CodeBlockSet.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">     ASSERT_UNUSED(isNewEntry, isNewEntry);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void CodeBlockSet::promoteYoungCodeBlocks(const LockHolder&amp;)
</del><ins>+void CodeBlockSet::promoteYoungCodeBlocks(const AbstractLocker&amp;)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx">     m_oldCodeBlocks.add(m_newCodeBlocks.begin(), m_newCodeBlocks.end());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCodeBlockSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CodeBlockSet.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CodeBlockSet.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/CodeBlockSet.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -62,9 +62,9 @@
</span><span class="cx">     // Mark a pointer that may be a CodeBlock that belongs to the set of DFG
</span><span class="cx">     // blocks. This is defined in CodeBlock.h.
</span><span class="cx"> private:
</span><del>-    void mark(const LockHolder&amp;, CodeBlock* candidateCodeBlock);
</del><ins>+    void mark(const AbstractLocker&amp;, CodeBlock* candidateCodeBlock);
</ins><span class="cx"> public:
</span><del>-    void mark(const LockHolder&amp;, void* candidateCodeBlock);
</del><ins>+    void mark(const AbstractLocker&amp;, void* candidateCodeBlock);
</ins><span class="cx">     
</span><span class="cx">     // Delete all code blocks that are only referenced by this set (i.e. owned
</span><span class="cx">     // by this set), and that have not been marked.
</span><span class="lines">@@ -86,7 +86,7 @@
</span><span class="cx">     void dump(PrintStream&amp;) const;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    void promoteYoungCodeBlocks(const LockHolder&amp;);
</del><ins>+    void promoteYoungCodeBlocks(const AbstractLocker&amp;);
</ins><span class="cx"> 
</span><span class="cx">     HashSet&lt;CodeBlock*&gt; m_oldCodeBlocks;
</span><span class="cx">     HashSet&lt;CodeBlock*&gt; m_newCodeBlocks;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapCodeBlockSetInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/CodeBlockSetInlines.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/CodeBlockSetInlines.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/CodeBlockSetInlines.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-inline void CodeBlockSet::mark(const LockHolder&amp; locker, void* candidateCodeBlock)
</del><ins>+inline void CodeBlockSet::mark(const AbstractLocker&amp; locker, void* candidateCodeBlock)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx">     // We have to check for 0 and -1 because those are used by the HashMap as markers.
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx">     mark(locker, codeBlock);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline void CodeBlockSet::mark(const LockHolder&amp;, CodeBlock* codeBlock)
</del><ins>+inline void CodeBlockSet::mark(const AbstractLocker&amp;, CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx">     if (!codeBlock)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapConservativeRootscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/ConservativeRoots.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx"> 
</span><span class="cx"> class CompositeMarkHook {
</span><span class="cx"> public:
</span><del>-    CompositeMarkHook(JITStubRoutineSet&amp; stubRoutines, CodeBlockSet&amp; codeBlocks, const LockHolder&amp; locker)
</del><ins>+    CompositeMarkHook(JITStubRoutineSet&amp; stubRoutines, CodeBlockSet&amp; codeBlocks, const AbstractLocker&amp; locker)
</ins><span class="cx">         : m_stubRoutines(stubRoutines)
</span><span class="cx">         , m_codeBlocks(codeBlocks)
</span><span class="cx">         , m_codeBlocksLocker(locker)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx"> private:
</span><span class="cx">     JITStubRoutineSet&amp; m_stubRoutines;
</span><span class="cx">     CodeBlockSet&amp; m_codeBlocks;
</span><del>-    const LockHolder&amp; m_codeBlocksLocker;
</del><ins>+    const AbstractLocker&amp; m_codeBlocksLocker;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> void ConservativeRoots::add(
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMachineStackMarkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/MachineStackMarker.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -928,7 +928,7 @@
</span><span class="cx">     thread-&gt;freeRegisters(registers);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool MachineThreads::tryCopyOtherThreadStacks(LockHolder&amp;, void* buffer, size_t capacity, size_t* size)
</del><ins>+bool MachineThreads::tryCopyOtherThreadStacks(const AbstractLocker&amp;, void* buffer, size_t capacity, size_t* size)
</ins><span class="cx"> {
</span><span class="cx">     // Prevent two VMs from suspending each other's threads at the same time,
</span><span class="cx">     // which can cause deadlock: &lt;rdar://problem/20300842&gt;.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMachineStackMarkerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MachineStackMarker.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MachineStackMarker.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/heap/MachineStackMarker.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -142,7 +142,7 @@
</span><span class="cx">     void gatherFromCurrentThread(ConservativeRoots&amp;, JITStubRoutineSet&amp;, CodeBlockSet&amp;, CurrentThreadState&amp;);
</span><span class="cx"> 
</span><span class="cx">     void tryCopyOtherThreadStack(Thread*, void*, size_t capacity, size_t*);
</span><del>-    bool tryCopyOtherThreadStacks(LockHolder&amp;, void*, size_t capacity, size_t*);
</del><ins>+    bool tryCopyOtherThreadStacks(const AbstractLocker&amp;, void*, size_t capacity, size_t*);
</ins><span class="cx"> 
</span><span class="cx">     static void THREAD_SPECIFIC_CALL removeThread(void*);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreprofilerProfilerDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx">     return ensureBytecodesFor(locker, codeBlock);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Bytecodes* Database::ensureBytecodesFor(const LockHolder&amp;, CodeBlock* codeBlock)
</del><ins>+Bytecodes* Database::ensureBytecodesFor(const AbstractLocker&amp;, CodeBlock* codeBlock)
</ins><span class="cx"> {
</span><span class="cx">     codeBlock = codeBlock-&gt;baselineAlternative();
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreprofilerProfilerDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/profiler/ProfilerDatabase.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     JS_EXPORT_PRIVATE void logEvent(CodeBlock* codeBlock, const char* summary, const CString&amp; detail);
</span><span class="cx">     
</span><span class="cx"> private:
</span><del>-    Bytecodes* ensureBytecodesFor(const LockHolder&amp;, CodeBlock*);
</del><ins>+    Bytecodes* ensureBytecodesFor(const AbstractLocker&amp;, CodeBlock*);
</ins><span class="cx">     
</span><span class="cx">     void addDatabaseToAtExit();
</span><span class="cx">     void removeDatabaseFromAtExit();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSamplingProfilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> 
</span><span class="cx"> class FrameWalker {
</span><span class="cx"> public:
</span><del>-    FrameWalker(VM&amp; vm, ExecState* callFrame, const LockHolder&amp; codeBlockSetLocker, const LockHolder&amp; machineThreadsLocker)
</del><ins>+    FrameWalker(VM&amp; vm, ExecState* callFrame, const AbstractLocker&amp; codeBlockSetLocker, const AbstractLocker&amp; machineThreadsLocker)
</ins><span class="cx">         : m_vm(vm)
</span><span class="cx">         , m_callFrame(callFrame)
</span><span class="cx">         , m_vmEntryFrame(vm.topVMEntryFrame)
</span><span class="lines">@@ -190,8 +190,8 @@
</span><span class="cx">     VM&amp; m_vm;
</span><span class="cx">     ExecState* m_callFrame;
</span><span class="cx">     VMEntryFrame* m_vmEntryFrame;
</span><del>-    const LockHolder&amp; m_codeBlockSetLocker;
-    const LockHolder&amp; m_machineThreadsLocker;
</del><ins>+    const AbstractLocker&amp; m_codeBlockSetLocker;
+    const AbstractLocker&amp; m_machineThreadsLocker;
</ins><span class="cx">     bool m_bailingOut { false };
</span><span class="cx">     size_t m_depth { 0 };
</span><span class="cx"> };
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx"> public:
</span><span class="cx">     typedef FrameWalker Base;
</span><span class="cx"> 
</span><del>-    CFrameWalker(VM&amp; vm, void* machineFrame, ExecState* callFrame, const LockHolder&amp; codeBlockSetLocker, const LockHolder&amp; machineThreadsLocker)
</del><ins>+    CFrameWalker(VM&amp; vm, void* machineFrame, ExecState* callFrame, const AbstractLocker&amp; codeBlockSetLocker, const AbstractLocker&amp; machineThreadsLocker)
</ins><span class="cx">         : Base(vm, callFrame, codeBlockSetLocker, machineThreadsLocker)
</span><span class="cx">         , m_machineFrame(machineFrame)
</span><span class="cx">     {
</span><span class="lines">@@ -296,7 +296,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SamplingProfiler::createThreadIfNecessary(const LockHolder&amp;)
</del><ins>+void SamplingProfiler::createThreadIfNecessary(const AbstractLocker&amp;)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx"> 
</span><span class="lines">@@ -334,7 +334,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SamplingProfiler::takeSample(const LockHolder&amp;, std::chrono::microseconds&amp; stackTraceProcessingTime)
</del><ins>+void SamplingProfiler::takeSample(const AbstractLocker&amp;, std::chrono::microseconds&amp; stackTraceProcessingTime)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx">     if (m_vm.entryScope) {
</span><span class="lines">@@ -659,7 +659,7 @@
</span><span class="cx">     start(locker);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SamplingProfiler::start(const LockHolder&amp; locker)
</del><ins>+void SamplingProfiler::start(const AbstractLocker&amp; locker)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx">     m_isPaused = false;
</span><span class="lines">@@ -666,7 +666,7 @@
</span><span class="cx">     createThreadIfNecessary(locker);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SamplingProfiler::pause(const LockHolder&amp;)
</del><ins>+void SamplingProfiler::pause(const AbstractLocker&amp;)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx">     m_isPaused = true;
</span><span class="lines">@@ -673,7 +673,7 @@
</span><span class="cx">     reportStats();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread(const LockHolder&amp;)
</del><ins>+void SamplingProfiler::noticeCurrentThreadAsJSCExecutionThread(const AbstractLocker&amp;)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx">     m_jscExecutionThread = m_vm.heap.machineThreads().machineThreadForCurrentThread();
</span><span class="lines">@@ -700,7 +700,7 @@
</span><span class="cx">     createThreadIfNecessary(locker);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void SamplingProfiler::clearData(const LockHolder&amp;)
</del><ins>+void SamplingProfiler::clearData(const AbstractLocker&amp;)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx">     m_stackTraces.clear();
</span><span class="lines">@@ -858,7 +858,7 @@
</span><span class="cx">     return url;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Vector&lt;SamplingProfiler::StackTrace&gt; SamplingProfiler::releaseStackTraces(const LockHolder&amp; locker)
</del><ins>+Vector&lt;SamplingProfiler::StackTrace&gt; SamplingProfiler::releaseStackTraces(const AbstractLocker&amp; locker)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_lock.isLocked());
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSamplingProfilerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -166,15 +166,15 @@
</span><span class="cx">     Lock&amp; getLock() { return m_lock; }
</span><span class="cx">     void setTimingInterval(std::chrono::microseconds interval) { m_timingInterval = interval; }
</span><span class="cx">     JS_EXPORT_PRIVATE void start();
</span><del>-    void start(const LockHolder&amp;);
-    Vector&lt;StackTrace&gt; releaseStackTraces(const LockHolder&amp;);
</del><ins>+    void start(const AbstractLocker&amp;);
+    Vector&lt;StackTrace&gt; releaseStackTraces(const AbstractLocker&amp;);
</ins><span class="cx">     JS_EXPORT_PRIVATE String stackTracesAsJSON();
</span><span class="cx">     JS_EXPORT_PRIVATE void noticeCurrentThreadAsJSCExecutionThread();
</span><del>-    void noticeCurrentThreadAsJSCExecutionThread(const LockHolder&amp;);
</del><ins>+    void noticeCurrentThreadAsJSCExecutionThread(const AbstractLocker&amp;);
</ins><span class="cx">     void processUnverifiedStackTraces(); // You should call this only after acquiring the lock.
</span><del>-    void setStopWatch(const LockHolder&amp;, Ref&lt;Stopwatch&gt;&amp;&amp; stopwatch) { m_stopwatch = WTFMove(stopwatch); }
-    void pause(const LockHolder&amp;);
-    void clearData(const LockHolder&amp;);
</del><ins>+    void setStopWatch(const AbstractLocker&amp;, Ref&lt;Stopwatch&gt;&amp;&amp; stopwatch) { m_stopwatch = WTFMove(stopwatch); }
+    void pause(const AbstractLocker&amp;);
+    void clearData(const AbstractLocker&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // Used for debugging in the JSC shell/DRT.
</span><span class="cx">     void registerForReportAtExit();
</span><span class="lines">@@ -185,9 +185,9 @@
</span><span class="cx">     JS_EXPORT_PRIVATE void reportTopBytecodes(PrintStream&amp;);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    void createThreadIfNecessary(const LockHolder&amp;);
</del><ins>+    void createThreadIfNecessary(const AbstractLocker&amp;);
</ins><span class="cx">     void timerLoop();
</span><del>-    void takeSample(const LockHolder&amp;, std::chrono::microseconds&amp; stackTraceProcessingTime);
</del><ins>+    void takeSample(const AbstractLocker&amp;, std::chrono::microseconds&amp; stackTraceProcessingTime);
</ins><span class="cx"> 
</span><span class="cx">     VM&amp; m_vm;
</span><span class="cx">     RefPtr&lt;Stopwatch&gt; m_stopwatch;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemory.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -68,19 +68,19 @@
</span><span class="cx"> static const unsigned maxFastMemories = 4;
</span><span class="cx"> static unsigned allocatedFastMemories { 0 };
</span><span class="cx"> StaticLock memoryLock;
</span><del>-inline Deque&lt;void*, maxFastMemories&gt;&amp; availableFastMemories(const LockHolder&amp;)
</del><ins>+inline Deque&lt;void*, maxFastMemories&gt;&amp; availableFastMemories(const AbstractLocker&amp;)
</ins><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;Deque&lt;void*, maxFastMemories&gt;&gt; availableFastMemories;
</span><span class="cx">     return availableFastMemories;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-inline HashSet&lt;void*&gt;&amp; activeFastMemories(const LockHolder&amp;)
</del><ins>+inline HashSet&lt;void*&gt;&amp; activeFastMemories(const AbstractLocker&amp;)
</ins><span class="cx"> {
</span><span class="cx">     static NeverDestroyed&lt;HashSet&lt;void*&gt;&gt; activeFastMemories;
</span><span class="cx">     return activeFastMemories;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-const HashSet&lt;void*&gt;&amp; viewActiveFastMemories(const LockHolder&amp; locker)
</del><ins>+const HashSet&lt;void*&gt;&amp; viewActiveFastMemories(const AbstractLocker&amp; locker)
</ins><span class="cx"> {
</span><span class="cx">     return activeFastMemories(locker);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorewasmWasmMemoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/wasm/WasmMemory.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/wasm/WasmMemory.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/JavaScriptCore/wasm/WasmMemory.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx"> 
</span><span class="cx"> const size_t fastMemoryMappedBytes = (static_cast&lt;size_t&gt;(std::numeric_limits&lt;uint32_t&gt;::max()) + 1) * 2; // pointer max + offset max. This is all we need since a load straddling readable memory will trap.
</span><span class="cx"> extern StaticLock memoryLock;
</span><del>-const HashSet&lt;void*&gt;&amp; viewActiveFastMemories(const LockHolder&amp;);
</del><ins>+const HashSet&lt;void*&gt;&amp; viewActiveFastMemories(const AbstractLocker&amp;);
</ins><span class="cx"> 
</span><span class="cx"> } } // namespace JSC::Wasm
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/WTF/ChangeLog        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2017-03-09  Mark Lam  &lt;mark.lam@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Use const AbstractLocker&amp; (instead of const LockHolder&amp;) in more places.
+        https://bugs.webkit.org/show_bug.cgi?id=169424
+
+        Reviewed by Filip Pizlo.
+
+        * wtf/RunLoop.h:
+        * wtf/generic/RunLoopGeneric.cpp:
+        (WTF::RunLoop::wakeUp):
+        (WTF::RunLoop::schedule):
+
+2017-03-09  Mark Lam  &lt;mark.lam@apple.com&gt;
+
</ins><span class="cx">         Make the VM Traps mechanism non-polling for the DFG and FTL.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=168920
</span><span class="cx">         &lt;rdar://problem/30738588&gt;
</span></span></pre></div>
<a id="trunkSourceWTFwtfRunLooph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/RunLoop.h (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/RunLoop.h        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/WTF/wtf/RunLoop.h        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -167,8 +167,8 @@
</span><span class="cx">     GRefPtr&lt;GSource&gt; m_source;
</span><span class="cx"> #elif USE(GENERIC_EVENT_LOOP)
</span><span class="cx">     void schedule(RefPtr&lt;TimerBase::ScheduledTask&gt;&amp;&amp;);
</span><del>-    void schedule(const LockHolder&amp;, RefPtr&lt;TimerBase::ScheduledTask&gt;&amp;&amp;);
-    void wakeUp(const LockHolder&amp;);
</del><ins>+    void schedule(const AbstractLocker&amp;, RefPtr&lt;TimerBase::ScheduledTask&gt;&amp;&amp;);
+    void wakeUp(const AbstractLocker&amp;);
</ins><span class="cx">     void scheduleAndWakeUp(RefPtr&lt;TimerBase::ScheduledTask&gt;);
</span><span class="cx"> 
</span><span class="cx">     enum class RunMode {
</span></span></pre></div>
<a id="trunkSourceWTFwtfgenericRunLoopGenericcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/generic/RunLoopGeneric.cpp (213656 => 213657)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/generic/RunLoopGeneric.cpp        2017-03-09 20:47:10 UTC (rev 213656)
+++ trunk/Source/WTF/wtf/generic/RunLoopGeneric.cpp        2017-03-09 21:05:41 UTC (rev 213657)
</span><span class="lines">@@ -206,7 +206,7 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RunLoop::wakeUp(const LockHolder&amp;)
</del><ins>+void RunLoop::wakeUp(const AbstractLocker&amp;)
</ins><span class="cx"> {
</span><span class="cx">     m_pendingTasks = true;
</span><span class="cx">     m_readyToRun.notifyOne();
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx">     wakeUp(locker);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RunLoop::schedule(const LockHolder&amp;, RefPtr&lt;TimerBase::ScheduledTask&gt;&amp;&amp; task)
</del><ins>+void RunLoop::schedule(const AbstractLocker&amp;, RefPtr&lt;TimerBase::ScheduledTask&gt;&amp;&amp; task)
</ins><span class="cx"> {
</span><span class="cx">     m_schedules.append(WTFMove(task));
</span><span class="cx">     std::push_heap(m_schedules.begin(), m_schedules.end(), TimerBase::ScheduledTask::EarliestSchedule());
</span></span></pre>
</div>
</div>

</body>
</html>