Title: [101597] trunk/Source/WebCore
- Revision
- 101597
- Author
- [email protected]
- Date
- 2011-11-30 21:00:00 -0800 (Wed, 30 Nov 2011)
Log Message
[MutationObservers] Make WebKitMutationObserver::deliverAllMutations() tolerant of re-entrant calls
https://bugs.webkit.org/show_bug.cgi?id=73472
Patch by Rafael Weinstein <[email protected]> on 2011-11-30
Reviewed by Ojan Vafai.
No new tests. This patch just adds a static guard which makes more explicit the current semantics.
* dom/WebKitMutationObserver.cpp:
(WebCore::WebKitMutationObserver::deliverAllMutations):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (101596 => 101597)
--- trunk/Source/WebCore/ChangeLog 2011-12-01 04:27:25 UTC (rev 101596)
+++ trunk/Source/WebCore/ChangeLog 2011-12-01 05:00:00 UTC (rev 101597)
@@ -1,3 +1,15 @@
+2011-11-30 Rafael Weinstein <[email protected]>
+
+ [MutationObservers] Make WebKitMutationObserver::deliverAllMutations() tolerant of re-entrant calls
+ https://bugs.webkit.org/show_bug.cgi?id=73472
+
+ Reviewed by Ojan Vafai.
+
+ No new tests. This patch just adds a static guard which makes more explicit the current semantics.
+
+ * dom/WebKitMutationObserver.cpp:
+ (WebCore::WebKitMutationObserver::deliverAllMutations):
+
2011-11-30 Takashi Toyoshima <[email protected]>
Add OVERRIDE to WebSocket related sources for safe inheritances.
Modified: trunk/Source/WebCore/dom/WebKitMutationObserver.cpp (101596 => 101597)
--- trunk/Source/WebCore/dom/WebKitMutationObserver.cpp 2011-12-01 04:27:25 UTC (rev 101596)
+++ trunk/Source/WebCore/dom/WebKitMutationObserver.cpp 2011-12-01 05:00:00 UTC (rev 101597)
@@ -134,12 +134,19 @@
void WebKitMutationObserver::deliverAllMutations()
{
+ static bool deliveryInProgress = false;
+ if (deliveryInProgress)
+ return;
+ deliveryInProgress = true;
+
while (!activeMutationObservers().isEmpty()) {
MutationObserverSet::iterator iter = activeMutationObservers().begin();
RefPtr<WebKitMutationObserver> observer = *iter;
activeMutationObservers().remove(iter);
observer->deliver();
}
+
+ deliveryInProgress = false;
}
PassOwnPtr<MutationObserverInterestGroup> MutationObserverInterestGroup::createForChildListMutation(Node* target)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes