Use WebProcessProxy::registrableDomain() to make process-swapping decisions, inside of passing a sourceURL around. This is safest and simplifies the code.
Created attachment 367816 [details] Patch
Created attachment 367855 [details] Patch
Comment on attachment 367855 [details] Patch Attachment 367855 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11937412 New failing tests: fast/history/page-cache-element-state-focused.html imported/blink/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-visibility-after-restore.html http/tests/navigation/go-back-to-error-page.html ietestcenter/css3/flexbox/flexbox-align-baseline-001.htm imported/blink/fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-visibility-after-restore.html
Created attachment 367862 [details] Archive of layout-test-results from ews107 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 367855 [details] Patch Attachment 367855 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11937126 New failing tests: imported/blink/svg/as-object/history-navigation.html imported/blink/fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-visibility-after-restore.html http/tests/navigation/go-back-to-error-page.html legacy-animation-engine/fast/animation/animation-mixed-transform-crash.html http/tests/misc/webtiming-cross-origin-redirect.php imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/window-name-after-cross-origin-sub-frame-navigation.sub.html imported/blink/fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-visibility-after-restore.html
Created attachment 367863 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 367870 [details] Patch
Comment on attachment 367870 [details] Patch Attachment 367870 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11938376 New failing tests: ietestcenter/css3/flexbox/flexbox-align-baseline-001.htm
Created attachment 367875 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 367875 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 Looks like a flaky test. This test does not process-swap.
Comment on attachment 367870 [details] Patch Attachment 367870 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11938422 New failing tests: http/tests/misc/webtiming-cross-origin-redirect.php
Created attachment 367880 [details] Archive of layout-test-results from ews126 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 367897 [details] Patch
Created attachment 367898 [details] Patch
Comment on attachment 367898 [details] Patch Attachment 367898 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11942526 New failing tests: http/tests/misc/webtiming-cross-origin-redirect.php
Created attachment 367900 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 367898 [details] Patch Attachment 367898 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11943565 New failing tests: http/tests/contentextensions/block-everything-unless-domain-redirect.php ietestcenter/css3/flexbox/flexbox-align-baseline-001.htm
Created attachment 367902 [details] Archive of layout-test-results from ews107 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Created attachment 367914 [details] Patch
Created attachment 367916 [details] Patch
Created attachment 367918 [details] Patch
Comment on attachment 367918 [details] Patch Attachment 367918 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/11947800 New failing tests: ietestcenter/css3/flexbox/flexbox-align-end-001.htm
Created attachment 367923 [details] Archive of layout-test-results from ews124 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews124 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 367918 [details] Patch Attachment 367918 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11967441 New failing tests: imported/w3c/web-platform-tests/2dcontext/transformations/canvas_transformations_reset_001.html
Created attachment 368003 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6