We should encapsulate documentNamedItemMap and windowNamedItemMap so that random code in WebCore doesn't modify them.
Created attachment 208569 [details] Cleanup
Comment on attachment 208569 [details] Cleanup The need to not call these functions with a null string is less obvious when calling through these new functions than it was when dealing with the map directly; it’s easy to get that wrong at call sites. I worry a little about that.
(In reply to comment #2) > (From update of attachment 208569 [details]) > The need to not call these functions with a null string is less obvious when calling through these new functions than it was when dealing with the map directly; it’s easy to get that wrong at call sites. I worry a little about that. Yeah, I can't think of a good way to mitigate that. At least there is an assertion in the hash table not to insert null strings.
Ben says we also assert in HashTable::get so we can at least check it at runtime.
Committed r153970: <http://trac.webkit.org/changeset/153970>