WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
119701
Encapsulate access to documentNamedItemMap and windowNamedItemMap
https://bugs.webkit.org/show_bug.cgi?id=119701
Summary
Encapsulate access to documentNamedItemMap and windowNamedItemMap
Ryosuke Niwa
Reported
2013-08-12 14:43:59 PDT
We should encapsulate documentNamedItemMap and windowNamedItemMap so that random code in WebCore doesn't modify them.
Attachments
Cleanup
(14.66 KB, patch)
2013-08-12 16:12 PDT
,
Ryosuke Niwa
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Ryosuke Niwa
Comment 1
2013-08-12 16:12:53 PDT
Created
attachment 208569
[details]
Cleanup
Darin Adler
Comment 2
2013-08-12 16:19:44 PDT
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.
Ryosuke Niwa
Comment 3
2013-08-12 16:25:07 PDT
(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.
Ryosuke Niwa
Comment 4
2013-08-12 16:30:20 PDT
Ben says we also assert in HashTable::get so we can at least check it at runtime.
Ryosuke Niwa
Comment 5
2013-08-12 18:11:03 PDT
Committed
r153970
: <
http://trac.webkit.org/changeset/153970
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug