<!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>[209812] 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/209812">209812</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-12-14 09:50:20 -0800 (Wed, 14 Dec 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/209766">r209766</a>.
Regressed Dromaeo JSLib by ~50%
Reverted changeset:
"Make opaque root scanning truly constraint-based"
https://bugs.webkit.org/show_bug.cgi?id=165760
http://trac.webkit.org/changeset/209766</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="#trunkSourceJavaScriptCoreheapHeaph">trunk/Source/JavaScriptCore/heap/Heap.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapInlinesh">trunk/Source/JavaScriptCore/heap/HeapInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMarkedSpacecpp">trunk/Source/JavaScriptCore/heap/MarkedSpace.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMarkedSpaceh">trunk/Source/JavaScriptCore/heap/MarkedSpace.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapSlotVisitorcpp">trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapSlotVisitorh">trunk/Source/JavaScriptCore/heap/SlotVisitor.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapSlotVisitorInlinesh">trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapWeakBlockcpp">trunk/Source/JavaScriptCore/heap/WeakBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapWeakBlockh">trunk/Source/JavaScriptCore/heap/WeakBlock.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapWeakSeth">trunk/Source/JavaScriptCore/heap/WeakSet.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>
<li><a href="#trunkSourceWebCorebindingsjsCommonVMh">trunk/Source/WebCore/bindings/js/CommonVM.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSAttrCustomcpp">trunk/Source/WebCore/bindings/js/JSAttrCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMessageChannelCustomcpp">trunk/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSMessagePortCustomcpp">trunk/Source/WebCore/bindings/js/JSMessagePortCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNodeIteratorCustomcpp">trunk/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSTextTrackCueCustomcpp">trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSTreeWalkerCustomcpp">trunk/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSWorkerGlobalScopeCustomcpp">trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSXMLHttpRequestCustomcpp">trunk/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSXPathResultCustomcpp">trunk/Source/WebCore/bindings/js/JSXPathResultCustom.cpp</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodeAlgorithmscpp">trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-12-14 Chris Dumez <cdumez@apple.com>
+
+ Unreviewed, rolling out r209766.
+
+ Regressed Dromaeo JSLib by ~50%
+
+ Reverted changeset:
+
+ "Make opaque root scanning truly constraint-based"
+ https://bugs.webkit.org/show_bug.cgi?id=165760
+ http://trac.webkit.org/changeset/209766
+
</ins><span class="cx"> 2016-12-14 Commit Queue <commit-queue@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r209795.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/Heap.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -519,7 +519,6 @@
</span><span class="cx">
</span><span class="cx"> if (m_collectionScope == CollectionScope::Full) {
</span><span class="cx"> m_opaqueRoots.clear();
</span><del>- m_constraints.clear();
</del><span class="cx"> m_collectorSlotVisitor->clearMarkStacks();
</span><span class="cx"> m_mutatorMarkStack->clear();
</span><span class="cx"> }
</span><span class="lines">@@ -618,15 +617,11 @@
</span><span class="cx">
</span><span class="cx"> m_jitStubRoutines->traceMarkedStubRoutines(*m_collectorSlotVisitor);
</span><span class="cx">
</span><del>- m_collectorSlotVisitor->mergeIfNecessary();
</del><ins>+ m_collectorSlotVisitor->mergeOpaqueRootsIfNecessary();
</ins><span class="cx"> for (auto& parallelVisitor : m_parallelSlotVisitors)
</span><del>- parallelVisitor->mergeIfNecessary();
-
- for (JSCell* cell : m_constraints)
- m_collectorSlotVisitor->visitSubsequently(cell);
- m_collectorSlotVisitor->mergeIfNecessary();
</del><ins>+ parallelVisitor->mergeOpaqueRootsIfNecessary();
</ins><span class="cx">
</span><del>- size_t weakSetCount = m_objectSpace.visitWeakSets(heapRootVisitor);
</del><ins>+ m_objectSpace.visitWeakSets(heapRootVisitor);
</ins><span class="cx"> harvestWeakReferences();
</span><span class="cx"> visitCompilerWorklistWeakReferences();
</span><span class="cx"> DFG::markCodeBlocks(*m_vm, *m_collectorSlotVisitor);
</span><span class="lines">@@ -633,7 +628,7 @@
</span><span class="cx"> bool shouldTerminate = m_collectorSlotVisitor->isEmpty() && m_mutatorMarkStack->isEmpty();
</span><span class="cx">
</span><span class="cx"> if (Options::logGC()) {
</span><del>- dataLog(m_collectorSlotVisitor->collectorMarkStack().size(), "+", m_mutatorMarkStack->size() + m_collectorSlotVisitor->mutatorMarkStack().size(), ", a=", m_bytesAllocatedThisCycle / 1024, " kb, b=", m_barriersExecuted, ", mu=", scheduler.currentDecision().targetMutatorUtilization(), ", ws=", weakSetCount, ", cs=", m_constraints.size(), " ");
</del><ins>+ dataLog(m_collectorSlotVisitor->collectorMarkStack().size(), "+", m_mutatorMarkStack->size() + m_collectorSlotVisitor->mutatorMarkStack().size(), ", a=", m_bytesAllocatedThisCycle / 1024, " kb, b=", m_barriersExecuted, ", mu=", scheduler.currentDecision().targetMutatorUtilization(), " ");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // We want to do this to conservatively ensure that we rescan any code blocks that are
</span><span class="lines">@@ -2225,10 +2220,27 @@
</span><span class="cx"> func(*slotVisitor);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Heap::writeBarrierOpaqueRootSlow(void* root)
+{
+ ASSERT(mutatorShouldBeFenced());
+
+ auto locker = holdLock(m_opaqueRootsMutex);
+ m_opaqueRoots.add(root);
+}
+
+void Heap::addMutatorShouldBeFencedCache(bool& cache)
+{
+ ASSERT(hasHeapAccess());
+ cache = m_mutatorShouldBeFenced;
+ m_mutatorShouldBeFencedCaches.append(&cache);
+}
+
</ins><span class="cx"> void Heap::setMutatorShouldBeFenced(bool value)
</span><span class="cx"> {
</span><span class="cx"> m_mutatorShouldBeFenced = value;
</span><span class="cx"> m_barrierThreshold = value ? tautologicalThreshold : blackThreshold;
</span><ins>+ for (bool* cache : m_mutatorShouldBeFencedCaches)
+ *cache = value;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.h (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.h        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/Heap.h        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -127,6 +127,8 @@
</span><span class="cx"> WriteBarrierBuffer& writeBarrierBuffer() { return m_writeBarrierBuffer; }
</span><span class="cx"> void flushWriteBarrierBuffer(JSCell*);
</span><span class="cx">
</span><ins>+ void writeBarrierOpaqueRoot(void*);
+
</ins><span class="cx"> Heap(VM*, HeapType);
</span><span class="cx"> ~Heap();
</span><span class="cx"> void lastChanceToFinalize();
</span><span class="lines">@@ -350,6 +352,8 @@
</span><span class="cx"> void preventCollection();
</span><span class="cx"> void allowCollection();
</span><span class="cx">
</span><ins>+ JS_EXPORT_PRIVATE void addMutatorShouldBeFencedCache(bool&);
+
</ins><span class="cx"> #if USE(CF)
</span><span class="cx"> CFRunLoopRef runLoop() const { return m_runLoop.get(); }
</span><span class="cx"> JS_EXPORT_PRIVATE void setRunLoop(CFRunLoopRef);
</span><span class="lines">@@ -493,6 +497,8 @@
</span><span class="cx">
</span><span class="cx"> void forEachCodeBlockImpl(const ScopedLambda<bool(CodeBlock*)>&);
</span><span class="cx">
</span><ins>+ JS_EXPORT_PRIVATE void writeBarrierOpaqueRootSlow(void*);
+
</ins><span class="cx"> void setMutatorShouldBeFenced(bool value);
</span><span class="cx">
</span><span class="cx"> const HeapType m_heapType;
</span><span class="lines">@@ -553,6 +559,7 @@
</span><span class="cx"> WriteBarrierBuffer m_writeBarrierBuffer;
</span><span class="cx"> bool m_mutatorShouldBeFenced { Options::forceFencedBarrier() };
</span><span class="cx"> unsigned m_barrierThreshold { Options::forceFencedBarrier() ? tautologicalThreshold : blackThreshold };
</span><ins>+ Vector<bool*> m_mutatorShouldBeFencedCaches;
</ins><span class="cx">
</span><span class="cx"> VM* m_vm;
</span><span class="cx"> double m_lastFullGCLength;
</span><span class="lines">@@ -596,8 +603,7 @@
</span><span class="cx"> bool m_parallelMarkersShouldExit { false };
</span><span class="cx">
</span><span class="cx"> Lock m_opaqueRootsMutex;
</span><del>- HashSet<const void*> m_opaqueRoots;
- HashSet<JSCell*> m_constraints;
</del><ins>+ HashSet<void*> m_opaqueRoots;
</ins><span class="cx">
</span><span class="cx"> static const size_t s_blockFragmentLength = 32;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapInlines.h (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapInlines.h        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/HeapInlines.h        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -370,4 +370,10 @@
</span><span class="cx"> stopIfNecessarySlow();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+inline void Heap::writeBarrierOpaqueRoot(void* root)
+{
+ if (mutatorShouldBeFenced())
+ writeBarrierOpaqueRootSlow(root);
+}
+
</ins><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMarkedSpacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MarkedSpace.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MarkedSpace.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/MarkedSpace.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -359,11 +359,10 @@
</span><span class="cx"> m_allocatorForEmptyAllocation = m_firstAllocator;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-size_t MarkedSpace::visitWeakSets(HeapRootVisitor& heapRootVisitor)
</del><ins>+void MarkedSpace::visitWeakSets(HeapRootVisitor& heapRootVisitor)
</ins><span class="cx"> {
</span><del>- size_t count = 0;
</del><span class="cx"> auto visit = [&] (WeakSet* weakSet) {
</span><del>- count += weakSet->visit(heapRootVisitor);
</del><ins>+ weakSet->visit(heapRootVisitor);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> m_newActiveWeakSets.forEach(visit);
</span><span class="lines">@@ -370,7 +369,6 @@
</span><span class="cx">
</span><span class="cx"> if (m_heap->collectionScope() == CollectionScope::Full)
</span><span class="cx"> m_activeWeakSets.forEach(visit);
</span><del>- return count;
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void MarkedSpace::reapWeakSets()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMarkedSpaceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MarkedSpace.h (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MarkedSpace.h        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/MarkedSpace.h        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -129,7 +129,7 @@
</span><span class="cx">
</span><span class="cx"> void prepareForAllocation();
</span><span class="cx">
</span><del>- size_t visitWeakSets(HeapRootVisitor&);
</del><ins>+ void visitWeakSets(HeapRootVisitor&);
</ins><span class="cx"> void reapWeakSets();
</span><span class="cx">
</span><span class="cx"> MarkedBlockSet& blocks() { return m_blocks; }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapSlotVisitorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/SlotVisitor.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -356,8 +356,8 @@
</span><span class="cx">
</span><span class="cx"> if (false) {
</span><span class="cx"> dataLog("Visiting ", RawPointer(cell));
</span><del>- if (!m_isFirstVisit)
- dataLog(" (subsequent)");
</del><ins>+ if (m_isVisitingMutatorStack)
+ dataLog(" (mutator)");
</ins><span class="cx"> dataLog("\n");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -391,17 +391,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (UNLIKELY(m_heapSnapshotBuilder)) {
</span><del>- if (m_isFirstVisit)
</del><ins>+ if (!m_isVisitingMutatorStack)
</ins><span class="cx"> m_heapSnapshotBuilder->appendNode(const_cast<JSCell*>(cell));
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SlotVisitor::visitSubsequently(JSCell* cell)
-{
- m_isFirstVisit = false;
- visitChildren(cell);
-}
-
</del><span class="cx"> void SlotVisitor::donateKnownParallel(MarkStackArray& from, MarkStackArray& to)
</span><span class="cx"> {
</span><span class="cx"> // NOTE: Because we re-try often, we can afford to be conservative, and
</span><span class="lines">@@ -471,7 +465,7 @@
</span><span class="cx"> updateMutatorIsStopped(locker);
</span><span class="cx"> if (!m_collectorStack.isEmpty()) {
</span><span class="cx"> m_collectorStack.refill();
</span><del>- m_isFirstVisit = true;
</del><ins>+ m_isVisitingMutatorStack = false;
</ins><span class="cx"> for (unsigned countdown = Options::minimumNumberOfScansBetweenRebalance(); m_collectorStack.canRemoveLast() && countdown--;)
</span><span class="cx"> visitChildren(m_collectorStack.removeLast());
</span><span class="cx"> } else if (!m_mutatorStack.isEmpty()) {
</span><span class="lines">@@ -479,7 +473,7 @@
</span><span class="cx"> // We know for sure that we are visiting objects because of the barrier, not because of
</span><span class="cx"> // marking. Marking will visit an object exactly once. The barrier will visit it
</span><span class="cx"> // possibly many times, and always after it was already marked.
</span><del>- m_isFirstVisit = false;
</del><ins>+ m_isVisitingMutatorStack = true;
</ins><span class="cx"> for (unsigned countdown = Options::minimumNumberOfScansBetweenRebalance(); m_mutatorStack.canRemoveLast() && countdown--;)
</span><span class="cx"> visitChildren(m_mutatorStack.removeLast());
</span><span class="cx"> }
</span><span class="lines">@@ -487,7 +481,7 @@
</span><span class="cx"> donateKnownParallel();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- mergeIfNecessary();
</del><ins>+ mergeOpaqueRootsIfNecessary();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool SlotVisitor::didReachTermination()
</span><span class="lines">@@ -606,7 +600,6 @@
</span><span class="cx"> if (Options::numberOfGCMarkers() == 1) {
</span><span class="cx"> // Put directly into the shared HashSet.
</span><span class="cx"> m_heap.m_opaqueRoots.add(root);
</span><del>- m_heap.m_constraints.add(m_currentCell);
</del><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> // Put into the local set, but merge with the shared one every once in
</span><span class="lines">@@ -613,19 +606,8 @@
</span><span class="cx"> // a while to make sure that the local sets don't grow too large.
</span><span class="cx"> mergeOpaqueRootsIfProfitable();
</span><span class="cx"> m_opaqueRoots.add(root);
</span><del>- m_constraints.add(m_currentCell);
</del><span class="cx"> }
</span><span class="cx">
</span><del>-void SlotVisitor::rescanAsConstraint()
-{
- if (Options::numberOfGCMarkers() == 1) {
- m_heap.m_constraints.add(m_currentCell);
- return;
- }
-
- m_constraints.add(m_currentCell);
-}
-
</del><span class="cx"> bool SlotVisitor::containsOpaqueRoot(void* root) const
</span><span class="cx"> {
</span><span class="cx"> if (!root)
</span><span class="lines">@@ -648,13 +630,13 @@
</span><span class="cx"> return MixedTriState;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SlotVisitor::mergeIfNecessary()
</del><ins>+void SlotVisitor::mergeOpaqueRootsIfNecessary()
</ins><span class="cx"> {
</span><del>- if (m_opaqueRoots.isEmpty() && m_constraints.isEmpty())
</del><ins>+ if (m_opaqueRoots.isEmpty())
</ins><span class="cx"> return;
</span><del>- mergeOpaqueRootsAndConstraints();
</del><ins>+ mergeOpaqueRoots();
</ins><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> void SlotVisitor::mergeOpaqueRootsIfProfitable()
</span><span class="cx"> {
</span><span class="cx"> if (static_cast<unsigned>(m_opaqueRoots.size()) < Options::opaqueRootMergeThreshold())
</span><span class="lines">@@ -687,19 +669,6 @@
</span><span class="cx"> m_opaqueRoots.clear();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SlotVisitor::mergeOpaqueRootsAndConstraints()
-{
- {
- std::lock_guard<Lock> lock(m_heap.m_opaqueRootsMutex);
- for (const void* root : m_opaqueRoots)
- m_heap.m_opaqueRoots.add(root);
- for (JSCell* constraint : m_constraints)
- m_heap.m_constraints.add(constraint);
- }
- m_opaqueRoots.clear();
- m_constraints.clear();
-}
-
</del><span class="cx"> void SlotVisitor::addWeakReferenceHarvester(WeakReferenceHarvester* weakReferenceHarvester)
</span><span class="cx"> {
</span><span class="cx"> m_heap.m_weakReferenceHarvesters.addThreadSafe(weakReferenceHarvester);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapSlotVisitorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/SlotVisitor.h (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/SlotVisitor.h        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/SlotVisitor.h        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -85,18 +85,7 @@
</span><span class="cx"> void appendUnbarrieredReadOnlyPointer(T*);
</span><span class="cx"> void appendUnbarrieredReadOnlyValue(JSValue);
</span><span class="cx">
</span><del>- void visitSubsequently(JSCell*);
-
- // Does your visitChildren do logic that depends on non-JS-object state that can
- // change during the course of a GC, or in between GCs? Then you should call this
- // method! It will cause the GC to invoke your visitChildren method again just before
- // terminating with the world stopped.
- JS_EXPORT_PRIVATE void rescanAsConstraint();
-
- // Implies rescanAsConstraint, so you don't have to call rescanAsConstraint() if you
- // call this unconditionally.
</del><span class="cx"> JS_EXPORT_PRIVATE void addOpaqueRoot(void*);
</span><del>-
</del><span class="cx"> JS_EXPORT_PRIVATE bool containsOpaqueRoot(void*) const;
</span><span class="cx"> TriState containsOpaqueRootTriState(void*) const;
</span><span class="cx">
</span><span class="lines">@@ -119,8 +108,6 @@
</span><span class="cx">
</span><span class="cx"> SharedDrainResult drainInParallel(MonotonicTime timeout = MonotonicTime::infinity());
</span><span class="cx"> SharedDrainResult drainInParallelPassively(MonotonicTime timeout = MonotonicTime::infinity());
</span><del>-
- void mergeIfNecessary();
</del><span class="cx">
</span><span class="cx"> // This informs the GC about auxiliary of some size that we are keeping alive. If you don't do
</span><span class="cx"> // this then the space will be freed at end of GC.
</span><span class="lines">@@ -140,6 +127,8 @@
</span><span class="cx">
</span><span class="cx"> HeapVersion markingVersion() const { return m_markingVersion; }
</span><span class="cx">
</span><ins>+ void mergeOpaqueRootsIfNecessary();
+
</ins><span class="cx"> bool mutatorIsStopped() const { return m_mutatorIsStopped; }
</span><span class="cx">
</span><span class="cx"> Lock& rightToRun() { return m_rightToRun; }
</span><span class="lines">@@ -178,9 +167,7 @@
</span><span class="cx">
</span><span class="cx"> void noteLiveAuxiliaryCell(HeapCell*);
</span><span class="cx">
</span><del>- void mergeOpaqueRoots();
- void mergeOpaqueRootsAndConstraints();
-
</del><ins>+ JS_EXPORT_PRIVATE void mergeOpaqueRoots();
</ins><span class="cx"> void mergeOpaqueRootsIfProfitable();
</span><span class="cx">
</span><span class="cx"> void visitChildren(const JSCell*);
</span><span class="lines">@@ -194,7 +181,6 @@
</span><span class="cx"> MarkStackArray m_collectorStack;
</span><span class="cx"> MarkStackArray m_mutatorStack;
</span><span class="cx"> OpaqueRootSet m_opaqueRoots; // Handle-owning data structures not visible to the garbage collector.
</span><del>- HashSet<JSCell*> m_constraints;
</del><span class="cx">
</span><span class="cx"> size_t m_bytesVisited;
</span><span class="cx"> size_t m_visitCount;
</span><span class="lines">@@ -206,7 +192,7 @@
</span><span class="cx">
</span><span class="cx"> HeapSnapshotBuilder* m_heapSnapshotBuilder { nullptr };
</span><span class="cx"> JSCell* m_currentCell { nullptr };
</span><del>- bool m_isFirstVisit { false };
</del><ins>+ bool m_isVisitingMutatorStack { false };
</ins><span class="cx"> bool m_mutatorIsStopped { false };
</span><span class="cx"> bool m_canOptimizeForStoppedMutator { false };
</span><span class="cx"> Lock m_rightToRun;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapSlotVisitorInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/SlotVisitorInlines.h        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">
</span><span class="cx"> inline void SlotVisitor::reportExtraMemoryVisited(size_t size)
</span><span class="cx"> {
</span><del>- if (m_isFirstVisit)
</del><ins>+ if (!m_isVisitingMutatorStack)
</ins><span class="cx"> heap()->reportExtraMemoryVisited(size);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx"> #if ENABLE(RESOURCE_USAGE)
</span><span class="cx"> inline void SlotVisitor::reportExternalMemoryVisited(size_t size)
</span><span class="cx"> {
</span><del>- if (m_isFirstVisit)
</del><ins>+ if (!m_isVisitingMutatorStack)
</ins><span class="cx"> heap()->reportExternalMemoryVisited(size);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> if (ASSERT_DISABLED)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (m_isFirstVisit) {
</del><ins>+ if (!m_isVisitingMutatorStack) {
</ins><span class="cx"> // This is the first visit so we don't need to remove anything.
</span><span class="cx"> return;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapWeakBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/WeakBlock.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/WeakBlock.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/WeakBlock.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -97,14 +97,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<typename ContainerType>
</span><del>-size_t WeakBlock::specializedVisit(ContainerType& container, HeapRootVisitor& heapRootVisitor)
</del><ins>+void WeakBlock::specializedVisit(ContainerType& container, HeapRootVisitor& heapRootVisitor)
</ins><span class="cx"> {
</span><span class="cx"> SlotVisitor& visitor = heapRootVisitor.visitor();
</span><span class="cx">
</span><span class="cx"> HeapVersion markingVersion = visitor.markingVersion();
</span><span class="cx">
</span><del>- size_t count = weakImplCount();
- for (size_t i = 0; i < count; ++i) {
</del><ins>+ for (size_t i = 0; i < weakImplCount(); ++i) {
</ins><span class="cx"> WeakImpl* weakImpl = &weakImpls()[i];
</span><span class="cx"> if (weakImpl->state() != WeakImpl::Live)
</span><span class="cx"> continue;
</span><span class="lines">@@ -122,22 +121,21 @@
</span><span class="cx">
</span><span class="cx"> heapRootVisitor.visit(&const_cast<JSValue&>(jsValue));
</span><span class="cx"> }
</span><del>-
- return count;
</del><span class="cx"> }
</span><span class="cx">
</span><del>-size_t WeakBlock::visit(HeapRootVisitor& heapRootVisitor)
</del><ins>+void WeakBlock::visit(HeapRootVisitor& heapRootVisitor)
</ins><span class="cx"> {
</span><span class="cx"> // If a block is completely empty, a visit won't have any effect.
</span><span class="cx"> if (isEmpty())
</span><del>- return 0;
</del><ins>+ return;
</ins><span class="cx">
</span><span class="cx"> // If this WeakBlock doesn't belong to a CellContainer, we won't even be here.
</span><span class="cx"> ASSERT(m_container);
</span><span class="cx">
</span><span class="cx"> if (m_container.isLargeAllocation())
</span><del>- return specializedVisit(m_container.largeAllocation(), heapRootVisitor);
- return specializedVisit(m_container.markedBlock(), heapRootVisitor);
</del><ins>+ specializedVisit(m_container.largeAllocation(), heapRootVisitor);
+ else
+ specializedVisit(m_container.markedBlock(), heapRootVisitor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WeakBlock::reap()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapWeakBlockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/WeakBlock.h (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/WeakBlock.h        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/WeakBlock.h        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> void sweep();
</span><span class="cx"> SweepResult takeSweepResult();
</span><span class="cx">
</span><del>- size_t visit(HeapRootVisitor&);
</del><ins>+ void visit(HeapRootVisitor&);
</ins><span class="cx"> void reap();
</span><span class="cx">
</span><span class="cx"> void lastChanceToFinalize();
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> static FreeCell* asFreeCell(WeakImpl*);
</span><span class="cx">
</span><span class="cx"> template<typename ContainerType>
</span><del>- size_t specializedVisit(ContainerType&, HeapRootVisitor&);
</del><ins>+ void specializedVisit(ContainerType&, HeapRootVisitor&);
</ins><span class="cx">
</span><span class="cx"> explicit WeakBlock(CellContainer);
</span><span class="cx"> void finalize(WeakImpl*);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapWeakSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/WeakSet.h (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/WeakSet.h        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/JavaScriptCore/heap/WeakSet.h        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">
</span><span class="cx"> bool isEmpty() const;
</span><span class="cx">
</span><del>- size_t visit(HeapRootVisitor&);
</del><ins>+ unsigned visit(HeapRootVisitor&);
</ins><span class="cx"> void reap();
</span><span class="cx"> void sweep();
</span><span class="cx"> void shrink();
</span><span class="lines">@@ -106,11 +106,13 @@
</span><span class="cx"> block->lastChanceToFinalize();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline size_t WeakSet::visit(HeapRootVisitor& visitor)
</del><ins>+inline unsigned WeakSet::visit(HeapRootVisitor& visitor)
</ins><span class="cx"> {
</span><del>- size_t count = 0;
- for (WeakBlock* block = m_blocks.head(); block; block = block->next())
- count += block->visit(visitor);
</del><ins>+ unsigned count = 0;
+ for (WeakBlock* block = m_blocks.head(); block; block = block->next()) {
+ count++;
+ block->visit(visitor);
+ }
</ins><span class="cx"> return count;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/ChangeLog        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-12-14 Chris Dumez <cdumez@apple.com>
+
+ Unreviewed, rolling out r209766.
+
+ Regressed Dromaeo JSLib by ~50%
+
+ Reverted changeset:
+
+ "Make opaque root scanning truly constraint-based"
+ https://bugs.webkit.org/show_bug.cgi?id=165760
+ http://trac.webkit.org/changeset/209766
+
</ins><span class="cx"> 2016-12-14 Andy Estes <aestes@apple.com>
</span><span class="cx">
</span><span class="cx"> EventDispatcher::dispatchEvent() should take its Node by reference
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCommonVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/CommonVM.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CommonVM.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/CommonVM.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> VM* g_commonVMOrNull;
</span><ins>+bool g_opaqueRootWriteBarrierEnabled;
</ins><span class="cx">
</span><span class="cx"> VM& commonVMSlow()
</span><span class="cx"> {
</span><span class="lines">@@ -55,6 +56,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> g_commonVMOrNull->setGlobalConstRedeclarationShouldThrow(Settings::globalConstRedeclarationShouldThrow());
</span><ins>+ g_commonVMOrNull->heap.addMutatorShouldBeFencedCache(g_opaqueRootWriteBarrierEnabled);
</ins><span class="cx">
</span><span class="cx"> initNormalWorldClientData(g_commonVMOrNull);
</span><span class="cx">
</span><span class="lines">@@ -61,5 +63,11 @@
</span><span class="cx"> return *g_commonVMOrNull;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void writeBarrierOpaqueRootSlow(void* root)
+{
+ if (VM* vm = g_commonVMOrNull)
+ vm->heap.writeBarrierOpaqueRoot(root);
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsCommonVMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/CommonVM.h (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/CommonVM.h        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/CommonVM.h        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -32,8 +32,10 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT extern JSC::VM* g_commonVMOrNull;
</span><ins>+WEBCORE_EXPORT extern bool g_opaqueRootWriteBarrierEnabled;
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT JSC::VM& commonVMSlow();
</span><ins>+WEBCORE_EXPORT void writeBarrierOpaqueRootSlow(void*);
</ins><span class="cx">
</span><span class="cx"> inline JSC::VM& commonVM()
</span><span class="cx"> {
</span><span class="lines">@@ -42,5 +44,12 @@
</span><span class="cx"> return commonVMSlow();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+template<typename Func>
+void writeBarrierOpaqueRoot(const Func& rootThunk)
+{
+ if (g_opaqueRootWriteBarrierEnabled)
+ writeBarrierOpaqueRootSlow(rootThunk());
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSAttrCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSAttrCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSAttrCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSAttrCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx">
</span><span class="cx"> void JSAttr::visitAdditionalChildren(JSC::SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
</del><span class="cx"> if (Element* element = wrapped().ownerElement())
</span><span class="cx"> visitor.addOpaqueRoot(root(element));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMWindowCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -51,7 +51,6 @@
</span><span class="cx">
</span><span class="cx"> void JSDOMWindow::visitAdditionalChildren(SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
</del><span class="cx"> if (Frame* frame = wrapped().frame())
</span><span class="cx"> visitor.addOpaqueRoot(frame);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -39,7 +39,6 @@
</span><span class="cx">
</span><span class="cx"> void JSIDBCursor::visitAdditionalChildren(SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
</del><span class="cx"> auto& cursor = wrapped();
</span><span class="cx"> if (auto* request = cursor.request())
</span><span class="cx"> visitor.addOpaqueRoot(request);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMessageChannelCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -35,8 +35,6 @@
</span><span class="cx">
</span><span class="cx"> void JSMessageChannel::visitAdditionalChildren(JSC::SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
-
</del><span class="cx"> if (MessagePort* port = wrapped().port1())
</span><span class="cx"> visitor.addOpaqueRoot(port);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSMessagePortCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSMessagePortCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSMessagePortCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSMessagePortCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -33,8 +33,6 @@
</span><span class="cx">
</span><span class="cx"> void JSMessagePort::visitAdditionalChildren(SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
-
</del><span class="cx"> // If we have a locally entangled port, we can directly mark it as reachable. Ports that are remotely entangled are marked in-use by markActiveObjectsForContext().
</span><span class="cx"> if (MessagePort* port = wrapped().locallyEntangledPort())
</span><span class="cx"> visitor.addOpaqueRoot(port);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNodeIteratorCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -27,8 +27,6 @@
</span><span class="cx">
</span><span class="cx"> void JSNodeIterator::visitAdditionalChildren(JSC::SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
-
</del><span class="cx"> if (NodeFilter* filter = wrapped().filter())
</span><span class="cx"> visitor.addOpaqueRoot(filter);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSTextTrackCueCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSTextTrackCueCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -77,8 +77,6 @@
</span><span class="cx">
</span><span class="cx"> void JSTextTrackCue::visitAdditionalChildren(SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
-
</del><span class="cx"> if (TextTrack* textTrack = wrapped().track())
</span><span class="cx"> visitor.addOpaqueRoot(root(textTrack));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSTreeWalkerCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -27,8 +27,6 @@
</span><span class="cx">
</span><span class="cx"> void JSTreeWalker::visitAdditionalChildren(JSC::SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
-
</del><span class="cx"> if (NodeFilter* filter = wrapped().filter())
</span><span class="cx"> visitor.addOpaqueRoot(filter);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSWorkerGlobalScopeCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSWorkerGlobalScopeCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -36,8 +36,6 @@
</span><span class="cx">
</span><span class="cx"> void JSWorkerGlobalScope::visitAdditionalChildren(SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
-
</del><span class="cx"> if (auto* location = wrapped().optionalLocation())
</span><span class="cx"> visitor.addOpaqueRoot(location);
</span><span class="cx"> if (auto* navigator = wrapped().optionalNavigator())
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSXMLHttpRequestCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -58,8 +58,6 @@
</span><span class="cx">
</span><span class="cx"> void JSXMLHttpRequest::visitAdditionalChildren(SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
-
</del><span class="cx"> if (XMLHttpRequestUpload* upload = wrapped().optionalUpload())
</span><span class="cx"> visitor.addOpaqueRoot(upload);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSXPathResultCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSXPathResultCustom.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSXPathResultCustom.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/bindings/js/JSXPathResultCustom.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -33,8 +33,6 @@
</span><span class="cx">
</span><span class="cx"> void JSXPathResult::visitAdditionalChildren(JSC::SlotVisitor& visitor)
</span><span class="cx"> {
</span><del>- visitor.rescanAsConstraint();
-
</del><span class="cx"> auto& value = wrapped().value();
</span><span class="cx"> if (value.isNodeSet()) {
</span><span class="cx"> // FIXME: This looks like it might race, but I'm not sure.
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodeAlgorithmscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp (209811 => 209812)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp        2016-12-14 17:41:28 UTC (rev 209811)
+++ trunk/Source/WebCore/dom/ContainerNodeAlgorithms.cpp        2016-12-14 17:50:20 UTC (rev 209812)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "ContainerNodeAlgorithms.h"
</span><span class="cx">
</span><ins>+#include "CommonVM.h"
</ins><span class="cx"> #include "HTMLFrameOwnerElement.h"
</span><span class="cx"> #include "InspectorInstrumentation.h"
</span><span class="cx"> #include "NoEventDispatchAssertion.h"
</span><span class="lines">@@ -101,6 +102,8 @@
</span><span class="cx"> notifyNodeInsertedIntoDocument(insertionPoint, node, postInsertionNotificationTargets);
</span><span class="cx"> else if (is<ContainerNode>(node))
</span><span class="cx"> notifyNodeInsertedIntoTree(insertionPoint, downcast<ContainerNode>(node), postInsertionNotificationTargets);
</span><ins>+
+ writeBarrierOpaqueRoot([&insertionPoint] () -> void* { return insertionPoint.opaqueRoot(); });
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void notifyNodeRemovedFromDocument(ContainerNode& insertionPoint, Node& node)
</span><span class="lines">@@ -152,6 +155,8 @@
</span><span class="cx">
</span><span class="cx"> void notifyChildNodeRemoved(ContainerNode& insertionPoint, Node& child)
</span><span class="cx"> {
</span><ins>+ writeBarrierOpaqueRoot([&child] () -> void* { return &child; });
+
</ins><span class="cx"> if (!child.inDocument()) {
</span><span class="cx"> if (is<ContainerNode>(child))
</span><span class="cx"> notifyNodeRemovedFromTree(insertionPoint, downcast<ContainerNode>(child));
</span></span></pre>
</div>
</div>
</body>
</html>