diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-12-30 10:33:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-30 10:33:40 -0800 |
commit | b06f4aec67ff93b1d667a5817084b0952e56664e (patch) | |
tree | e1f0e281d5632752040103d0e6efe995ffab03a9 /components/script/dom/webglrenderingcontext.rs | |
parent | d3875f6ec52fdb6bbe49719af6bff299c792ae0b (diff) | |
parent | 6a14349eb1611166220640c874eca389c93a5c40 (diff) | |
download | servo-b06f4aec67ff93b1d667a5817084b0952e56664e.tar.gz servo-b06f4aec67ff93b1d667a5817084b0952e56664e.zip |
Auto merge of #14794 - mrnayak:hsts-refactor, r=emilio
Refactor HSTSList to use HashMap
Refactored HSTSList to use HashMap, where the key of HashMap is the base domain. Every time when we check if a host is secure, we find the base domain of the host and get a vector of HSTS entries associated with the base domain.
While this will not give O(1) look up time, we would have a smaller list to iterate for every lookup. I have added one unit test to validate `HashMap` changes.
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14756
<!-- Either: -->
- [X] There are tests for these changes OR
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14794)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
0 files changed, 0 insertions, 0 deletions