| Summary: | [Content Extensions] Only add unique universal action locations. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||
| Component: | WebCore Misc. | Assignee: | Alex Christensen <achristensen> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | 143338 | ||||||
| Bug Blocks: | |||||||
| Attachments: |
|
||||||
|
Description
Alex Christensen
2015-04-01 17:06:53 PDT
Created attachment 249954 [details]
Patch
Comment on attachment 249954 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249954&action=review > Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:151 > You could take the opportunity to remove that blank line. Comment on attachment 249954 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=249954&action=review > Source/WebCore/contentextensions/ContentExtensionCompiler.cpp:136 > + HashSet<uint64_t> universalActionLocations; HashSet won’t work with 0 nor will it work with the maximum value. Do we have a guarantee that actionLocationAndFlags will never have either of those values? This patch made a test assert: https://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fcontentextensions%2Fwhitelist.html ASSERT(!HashTranslator::equal(KeyTraits::emptyValue(), key)); Looks like Darin's comment is spot on. Re-opened since this is blocked by bug 143338 I forgot the HashTraits :( The value can be 0, so I used UnsignedWithZeroKeyHashTraits. We only use the lowest 48 bits of the uint64_t, so it will never be the maximum 2 values. http://trac.webkit.org/changeset/182283 |