Title: [208366] trunk/Source/WebCore
- Revision
- 208366
- Author
- rn...@webkit.org
- Date
- 2016-11-03 20:46:51 -0700 (Thu, 03 Nov 2016)
Log Message
Add an assertion to diagnose stress GC bots test failures
https://bugs.webkit.org/show_bug.cgi?id=164396
Reviewed by Antti Koivisto.
Added an assertion for calling ElementQueue::add while ElementQueue::invokeAll is in progress.
This should never happen as long as all DOM API has an appropriate CEReactions IDL attribute.
* dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementReactionStack::ElementQueue::add):
(WebCore::CustomElementReactionStack::ElementQueue::invokeAll):
* dom/CustomElementReactionQueue.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (208365 => 208366)
--- trunk/Source/WebCore/ChangeLog 2016-11-04 02:57:49 UTC (rev 208365)
+++ trunk/Source/WebCore/ChangeLog 2016-11-04 03:46:51 UTC (rev 208366)
@@ -1,3 +1,18 @@
+2016-11-03 Ryosuke Niwa <rn...@webkit.org>
+
+ Add an assertion to diagnose stress GC bots test failures
+ https://bugs.webkit.org/show_bug.cgi?id=164396
+
+ Reviewed by Antti Koivisto.
+
+ Added an assertion for calling ElementQueue::add while ElementQueue::invokeAll is in progress.
+ This should never happen as long as all DOM API has an appropriate CEReactions IDL attribute.
+
+ * dom/CustomElementReactionQueue.cpp:
+ (WebCore::CustomElementReactionStack::ElementQueue::add):
+ (WebCore::CustomElementReactionStack::ElementQueue::invokeAll):
+ * dom/CustomElementReactionQueue.h:
+
2016-11-03 Said Abou-Hallawa <sabouhall...@apple.com>
Add the asynchronous image decoding mode
Modified: trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp (208365 => 208366)
--- trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp 2016-11-04 02:57:49 UTC (rev 208365)
+++ trunk/Source/WebCore/dom/CustomElementReactionQueue.cpp 2016-11-04 03:46:51 UTC (rev 208366)
@@ -205,6 +205,7 @@
inline void CustomElementReactionStack::ElementQueue::add(Element& element)
{
+ ASSERT(!m_invoking);
// FIXME: Avoid inserting the same element multiple times.
m_elements.append(element);
}
@@ -211,6 +212,9 @@
inline void CustomElementReactionStack::ElementQueue::invokeAll()
{
+#if !ASSERT_DISABLED
+ TemporaryChange<bool> invoking(m_invoking);
+#endif
Vector<Ref<Element>> elements;
elements.swap(m_elements);
for (auto& element : elements) {
Modified: trunk/Source/WebCore/dom/CustomElementReactionQueue.h (208365 => 208366)
--- trunk/Source/WebCore/dom/CustomElementReactionQueue.h 2016-11-04 02:57:49 UTC (rev 208365)
+++ trunk/Source/WebCore/dom/CustomElementReactionQueue.h 2016-11-04 03:46:51 UTC (rev 208366)
@@ -89,6 +89,9 @@
private:
Vector<Ref<Element>> m_elements;
+#if !ASSERT_DISABLED
+ bool m_invoking { false };
+#endif
};
WEBCORE_EXPORT void processQueue();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes