Summary: | Encapsulate access to documentNamedItemMap and windowNamedItemMap | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||
Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | barraclough, benjamin, cmarcelo, commit-queue, esprehn+autocc, ggaren, kangil.han | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | 119700 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Ryosuke Niwa
2013-08-12 14:43:59 PDT
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> |