Fix various issues with httpResponseProcessSelection pref

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P2
normal
RESOLVED FIXED
6 months ago
18 days ago

People

(Reporter: Nika, Assigned: Nika)

Tracking

(Blocks 3 bugs)

unspecified
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Fission Milestone:M1, firefox67+ fixed)

Details

Attachments

(8 attachments, 1 obsolete attachment)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

In bug 1467223, the pref "browser.tabs.remote.useHTTPResponseProcessSelection" was added. When enabled this allows for toplevel loads to change their process mid-http load in basic cases.

This bug tracks enabling that pref by default.

Priority: -- → P2
Blocks: 1522639
Duplicate of this bug: 1523361
Fission Milestone: --- → M1
Assignee: nobody → nika
Status: NEW → ASSIGNED
Depends on: 1525062
Duplicate of this bug: 1525062
Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f82ba91f5ea2
Part 1: Disable in tests for allowLinkedWebInFileUriProcess, r=bobowen
https://hg.mozilla.org/integration/autoland/rev/5f49cd87b1bd
Part 2: Include BrowsingContextID in LoadInfo for subdocument loads, r=valentin
https://hg.mozilla.org/integration/autoland/rev/5a8067fd848c
Part 3: Send history index when resuming redirected loads, r=qdot
https://hg.mozilla.org/integration/autoland/rev/f1191be4243a
Part 4: Support browsers in globals without gMultiProcessBrowser, r=qdot
https://hg.mozilla.org/integration/autoland/rev/9e9fd362dd8f
Part 5: Add tests for history navigations between http and file URIs with new pref, r=qdot
https://hg.mozilla.org/integration/autoland/rev/18a809d53298
Part 6: Enable httpResponseProcessSelection by default, r=qdot
Backout by shindli@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3433b7761096
Backed out 6 changesets for en-US failures in testing/firefox-ui/tests/functional/safebrowsing/test_notification.py TestSafeBrowsingNotificationBar.test_notification_bar CLOSED TREE

Ading another bc log for browser_aboutnewtab_process_selection.js failures:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=227333243&repo=autoland&lineNumber=3808

Issues were occuring where a process swap would be decided upon during
on-examine-response, but before the swap could be handled by the
channel, the channel was redirected.

This new code takes the mildly hacky approach of simply using a separate
observer notification which is fired at the correct time. A better
solution may be to use a dedicated service for responding to these
events, however that was not implemented for this initial patch.

Depends on D18607

For HTTP loads from the preloaded document, no process swap was occuring
if the preloaded document was loaded in a 'web' process. This caused
test failures, and has potentially undesireable behaviour.

This patch just moves the check for preloaded document swaps to before
the check for http parent process interception, forcing a swap like
normal.

Depends on D19691

Whiteboard: [2/14] two new patches - got r+
Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5988b8e7d17c
Part 1: Disable in tests for allowLinkedWebInFileUriProcess, r=bobowen
https://hg.mozilla.org/integration/autoland/rev/5eeda2ba8e79
Part 2: Include BrowsingContextID in LoadInfo for subdocument loads, r=valentin
https://hg.mozilla.org/integration/autoland/rev/6b4d010964ec
Part 3: Send history index when resuming redirected loads, r=qdot
https://hg.mozilla.org/integration/autoland/rev/8f494271ec06
Part 4: Support browsers in globals without gMultiProcessBrowser, r=qdot
https://hg.mozilla.org/integration/autoland/rev/6e0d4b6b1c93
Part 5: Add tests for history navigations between http and file URIs with new pref, r=qdot
https://hg.mozilla.org/integration/autoland/rev/41ca0b87537e
Part 6: Enable httpResponseProcessSelection by default, r=qdot
https://hg.mozilla.org/integration/autoland/rev/3d24e8e81c02
Part 7: Perform process switches separtely from on-examine-response, r=valentin
https://hg.mozilla.org/integration/autoland/rev/f7ab0e6e739b
Part 8: Perform the preloaded document swap before checking for HTTP loads, r=mconley

Backed out 8 changesets (Bug 1522637) for browser_all_files_referenced.js failures.

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=linux%2Cx64%2Copt%2Cmochitests%2Cwith%2Ce10s%2Ctest-linux64%2Fopt-mochitest-browser-chrome-e10s-7%2Cm-e10s%28bc7%29&fromchange=39bb681343d6f429ced7ea706649e48890d27c28&tochange=ff5227d3d1fd4f517bb5ceb696fcf8790c28fdaa&selectedJob=228430683

Backout link: https://hg.mozilla.org/integration/autoland/rev/ff5227d3d1fd4f517bb5ceb696fcf8790c28fdaa

ps: this also seems to have introduced a Tier 2 failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=linux%2Cx64%2Copt%2Cfirefox%2Cfunctional%2Ctests%2C%28remote%29%2Cwith%2Ce10s%2Ctest-linux64%2Fopt-firefox-ui-functional-remote-e10s%2Cfxfn-r-e10s%28en-us%29&tochange=f7ab0e6e739bd54b66b8aaa6219c7dba78f37eb1&fromchange=39bb681343d6f429ced7ea706649e48890d27c28&selectedJob=228430680

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=228430683&repo=autoland&lineNumber=2510

[task 2019-02-14T16:43:45.422Z] 16:43:45 INFO - TEST-START | browser/base/content/test/static/browser_all_files_referenced.js
[task 2019-02-14T16:43:56.647Z] 16:43:56 INFO - TEST-INFO | started process screentopng
[task 2019-02-14T16:43:57.154Z] 16:43:57 INFO - TEST-INFO | screentopng: exit 0
[task 2019-02-14T16:43:57.154Z] 16:43:57 INFO - Buffered messages logged at 16:43:45
[task 2019-02-14T16:43:57.155Z] 16:43:57 INFO - Entering test bound checkAllTheFiles
[task 2019-02-14T16:43:57.155Z] 16:43:57 INFO - Buffered messages logged at 16:43:56
[task 2019-02-14T16:43:57.155Z] 16:43:57 INFO - indirectly whitelisted file: chrome://marionette/content/test_dialog.dtd used from chrome://marionette/content/test_dialog.xul
...
[task 2019-02-14T16:43:57.227Z] 16:43:57 INFO - Buffered messages finished
[task 2019-02-14T16:43:57.228Z] 16:43:57 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/static/browser_all_files_referenced.js | there should be no unreferenced files - Got 1, expected 0
[task 2019-02-14T16:43:57.230Z] 16:43:57 INFO - Stack trace:
[task 2019-02-14T16:43:57.231Z] 16:43:57 INFO - chrome://mochikit/content/browser-test.js:test_is:1315
[task 2019-02-14T16:43:57.235Z] 16:43:57 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_all_files_referenced.js:checkAllTheFiles:782
[task 2019-02-14T16:43:57.237Z] 16:43:57 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1106
[task 2019-02-14T16:43:57.238Z] 16:43:57 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1134
[task 2019-02-14T16:43:57.239Z] 16:43:57 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:995
[task 2019-02-14T16:43:57.240Z] 16:43:57 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
[task 2019-02-14T16:43:57.242Z] 16:43:57 INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-02-14T16:43:57.243Z] 16:43:57 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/static/browser_all_files_referenced.js | unreferenced file: resource://gre/modules/FluentSyntax.jsm -
[task 2019-02-14T16:43:57.245Z] 16:43:57 INFO - Stack trace:
[task 2019-02-14T16:43:57.247Z] 16:43:57 INFO - chrome://mochikit/content/browser-test.js:test_ok:1304
[task 2019-02-14T16:43:57.249Z] 16:43:57 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_all_files_referenced.js:checkAllTheFiles:786
[task 2019-02-14T16:43:57.250Z] 16:43:57 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1106
[task 2019-02-14T16:43:57.251Z] 16:43:57 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1134
[task 2019-02-14T16:43:57.253Z] 16:43:57 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:995
[task 2019-02-14T16:43:57.254Z] 16:43:57 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
[task 2019-02-14T16:43:57.256Z] 16:43:57 INFO - ignored unused whitelist entry: resource://app/blocklist.xml

Sorry, wrong backout. Test has shifted between chunks.

Relanding in a few minutes.

Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0f759e91eca8
Part 1: Disable in tests for allowLinkedWebInFileUriProcess, r=bobowen
https://hg.mozilla.org/integration/autoland/rev/e6ca9ad18d15
Part 2: Include BrowsingContextID in LoadInfo for subdocument loads, r=valentin
https://hg.mozilla.org/integration/autoland/rev/7e38890c72fa
Part 3: Send history index when resuming redirected loads, r=qdot
https://hg.mozilla.org/integration/autoland/rev/67e838f49f4b
Part 4: Support browsers in globals without gMultiProcessBrowser, r=qdot
https://hg.mozilla.org/integration/autoland/rev/d7eb272688be
Part 5: Add tests for history navigations between http and file URIs with new pref, r=qdot
https://hg.mozilla.org/integration/autoland/rev/4c7c512a262d
Part 6: Enable httpResponseProcessSelection by default, r=qdot
https://hg.mozilla.org/integration/autoland/rev/0886a317a108
Part 7: Perform process switches separtely from on-examine-response, r=valentin
https://hg.mozilla.org/integration/autoland/rev/540e5f318768
Part 8: Perform the preloaded document swap before checking for HTTP loads, r=mconley

The element has never existed in the new process, so it gets a missing
error rather than a stale error in that case.

Depends on D19692

Pushed by dluca@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e4ca191d62a5
Part 9: Allow 'element_stale' to work after process swap, r=ato
Depends on: 1528188
Status: RESOLVED → REOPENED
Flags: needinfo?(pascalc)
Resolution: FIXED → ---
Fission Milestone: M1 → ---

Thanks Razvan

Flags: needinfo?(pascalc)

Fission Milestone got accidentally removed. Nika, can you put that back to M1, please?

Fission Milestone: --- → ?
Target Milestone: mozilla67 → ---
Fission Milestone: ? → M1

Renaming the bug, as I'm going to move the actual enabling of the pref into a separate bug, so we can land this now.

Flags: needinfo?(nika)
Summary: Enable "useHTTPResponseProcessSelection" by default → Fix various issues with httpResponseProcessSelection pref
Attachment #9043679 - Attachment description: Bug 1522637 - Part 7: Perform process switches separtely from on-examine-response, → Bug 1522637 - Part 6: Perform process switches separtely from on-examine-response,
Attachment #9043680 - Attachment description: Bug 1522637 - Part 8: Perform the preloaded document swap before checking for HTTP loads, → Bug 1522637 - Part 7: Perform the preloaded document swap before checking for HTTP loads,
Attachment #9043969 - Attachment description: Bug 1522637 - Part 9: Allow 'element_stale' to work after process swap, → Bug 1522637 - Part 8: Allow 'element_stale' to work after process swap,
Pushed by nlayzell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/663ed0c62558
Part 1: Disable in tests for allowLinkedWebInFileUriProcess, r=bobowen
https://hg.mozilla.org/integration/autoland/rev/7eca000f53a6
Part 2: Include BrowsingContextID in LoadInfo for subdocument loads, r=valentin
https://hg.mozilla.org/integration/autoland/rev/f3f386e5ae07
Part 3: Send history index when resuming redirected loads, r=qdot
https://hg.mozilla.org/integration/autoland/rev/ca6808f60f9b
Part 4: Support browsers in globals without gMultiProcessBrowser, r=qdot
https://hg.mozilla.org/integration/autoland/rev/bfbc4f8775fc
Part 5: Add tests for history navigations between http and file URIs with new pref, r=qdot
https://hg.mozilla.org/integration/autoland/rev/28d4b904c004
Part 6: Perform process switches separtely from on-examine-response, r=valentin
https://hg.mozilla.org/integration/autoland/rev/f71650099143
Part 7: Perform the preloaded document swap before checking for HTTP loads, r=mconley
https://hg.mozilla.org/integration/autoland/rev/a92bdbd9b982
Part 8: Allow 'element_stale' to work after process swap, r=ato
Blocks: 1528360

Comment on attachment 9041297 [details]
Bug 1522637 - Part 6: Enable httpResponseProcessSelection by default,

Revision D18607 was moved to bug 1528360. Setting attachment 9041297 [details] to obsolete.

Attachment #9041297 - Attachment is obsolete: true
Depends on: 1528563
Whiteboard: [2/14] two new patches - got r+
Regressions: 1535800
Blocks: 1562223
You need to log in before you can comment on or make changes to this bug.