RESOLVED FIXED 73472
[MutationObservers] Make WebKitMutationObserver::deliverAllMutations() tolerant of re-entrant calls
https://bugs.webkit.org/show_bug.cgi?id=73472
Summary [MutationObservers] Make WebKitMutationObserver::deliverAllMutations() tolera...
Rafael Weinstein
Reported 2011-11-30 11:01:54 PST
In effect, deliverAllMutations() needs to prevent each delivery from, itself, causing deliverAllMutations(). The code happens to be structured right now in such a way that it's behavior is still semantically correct, but we should avoid having multiple calls on this static on the stack.
Attachments
Patch (1.77 KB, patch)
2011-11-30 11:06 PST, Rafael Weinstein
no flags
Rafael Weinstein
Comment 1 2011-11-30 11:06:27 PST
Ojan Vafai
Comment 2 2011-11-30 11:10:15 PST
Comment on attachment 117228 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=117228&action=review > Source/WebCore/dom/WebKitMutationObserver.cpp:139 > + return; Should we have an ASSERT_NOT_REACHED() before the return here? It's a bug in the C++ code if we ever hit this, right?
Rafael Weinstein
Comment 3 2011-11-30 11:19:35 PST
No. We probably will reach it. deliveryAllMutations is likely going to invoke script for each observer. The easiest thing is for each embedder to simply hook ALL outer-most script invocations. This guard just means that for each delivery, the embedder will *try* and quietly fail to re-start delivery (which is already underway).
WebKit Review Bot
Comment 4 2011-11-30 21:00:16 PST
Comment on attachment 117228 [details] Patch Clearing flags on attachment: 117228 Committed r101597: <http://trac.webkit.org/changeset/101597>
WebKit Review Bot
Comment 5 2011-11-30 21:00:20 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.