[Webkit-unassigned] [Bug 135211] ScriptController::updateDocument ASSERT mutating map while iterating map

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 25 12:01:48 PDT 2014


https://bugs.webkit.org/show_bug.cgi?id=135211





--- Comment #16 from Alexey Proskuryakov <ap at webkit.org>  2014-07-25 12:01:59 PST ---
> I believe that in HashMap/HashSet iteration order is not guaranteed; so depending on that behavior would be bad. Please correct me if I'm wrong!

This is certainly correct, one can't iterate over a container that's changing.

> We need to prevent against a removal of a window shell in m_windowShells during iteration because that can now happen at any time (GC of a media element). Creating a window shell still happens in only a few places.

OK, sounds good. I'm always worried about such copy-to-iterate fixes, because they can be papering over a problem, leaving us with a different random misbehavior that's almost impossible to diagnose.

If at all possible, it's desirable to at least to have an ASSERT that we don't have any new elements in the map after iteration.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list