|RenderFrameHost*| shouldn't be used as a key by BlinkTestController.
Addresses can be reused and therefore pointers shouldn't be used as container keys (unless the code maintaining the container can guarantee that the old entry will be destroyed before the pointer gets freed). In particular, using |RenderFrameHost*| as a key of BlinkTestController's layout_test_control_map_ was incorrect and led to timeouts described in more details in https://crbug.com/834185#c13 - #c14. This CL replaces std::map<RenderFrameHost*, ...> with std::map<std::pair<int, int>, ...> and uses (process id, frame routing id) as a key. After this CL around ~200 flaky timeouts from FlagExpectations/site-per-process seem to avoided. Before this CL, I could reliably repro a timeout in - http/tests/fetch/window/thorough/redirect-nocors-base-https-other-https.html - http/tests/fetch/serviceworker-proxied/thorough/scheme-data-base-https-other-https.html when running it 20 iterations. After this CL, I cannot repro any timeouts when running all ~200 tests 20 times: $ DISPLAY=:20 third_party/WebKit/Tools/Scripts/run-webkit-tests \ -t rel --no-retry --additional-driver-flag=--site-per-process \ --iterations=20 \ --exit-after-n-failures=1 --exit-after-n-crashes-or-timeouts=1 \ --additional-driver-flag=--no-sandbox \ --additional-driver-flag=--isolate-origins=http://www.web-platform.test:8001/,http://www1.web-platform.test:8001/,http://www2.web-platform.test:8001/,http://xn--n8j6ds53lwwkrqhv28a.web-platform.test:8001/,http://xn--lve-6lad.web-platform.test:8001/,http://www.web-platform.test:8081/,http://www1.web-platform.test:8081/,http://www2.web-platform.test:8081/,http://xn--n8j6ds53lwwkrqhv28a.web-platform.test:8081/,http://xn--lve-6lad.web-platform.test:8081/,https://www.web-platform.test:8444/,https://www1.web-platform.test:8444/,https://www2.web-platform.test:8444/,https://xn--n8j6ds53lwwkrqhv28a.web-platform.test:8444/,https://xn--lve-6lad.web-platform.test:8444/ \ --test-list=$HOME/scratch/test-list ... Found 206 tests; running 206 (20 times each: --repeat-each=1 --iterations=20), skipping 0. ... All 4120 tests ran as expected. Bug: 801992, 834185, 711468, 859988 Change-Id: I9f2c1abf87027fcb3824c54e597e561ac72babb9 Reviewed-on: https://chromium-review.googlesource.com/1182316 Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org> Reviewed-by:Nasko Oskov <nasko@chromium.org> Cr-Commit-Position: refs/heads/master@{#584841}
Showing
This diff is collapsed.
Please register or sign in to comment