Summary: | If "otherOrigin == this" in SecurityOrigin::equal, it's obviously equal. | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jeremy Orlow <jorlow> | ||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P3 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Jeremy Orlow
2009-06-03 19:19:51 PDT
Created attachment 30937 [details]
A fix.
Wouldn't it makes more sense to do this in isSameSchemeHostPort? I don't think so. I only see isSameSchemeHostPort used a couple places, but they don't seem like they'd benefit from such an optimization [1]. ::equal, on the other hand, is called pretty often (it's used a lot in hash tables). It seems a bit painful to require another function call plus a branch or two for a function that's not called very often. We could put the == check in both places. Doing one additional branch isn't going to hurt the slow path. It doesn't seem necessary though. [1] http://www.google.com/codesearch?hl=en&q=isSameSchemeHostPort+package%3A%22git%3A%2F%2Fandroid.git.kernel.org%2Fplatform%2Fexternal%2Fwebkit.git%22 Comment on attachment 30937 [details]
A fix.
Seems fine. r=me
Assign for landing. |