зеркало из https://github.com/mozilla/gecko-dev.git
502d68439f
This was causing issues in socket-process xpcshell tests for the gecko-based pingsender. The spi-nw configuration [1] passes `--setpref=network.http.network_access_on_socket_process.enabled=true` to xpcshell tests. The xpcshell harness reads this pref [2] to set self.mozInfo["socketprocess_networking"], and then later uses it to set MOZ_FORCE_USE_SOCKET_PROCESS in the enviroment [3]. However, the backgroundtask machinery also disables the socket process pref on startup [4]. This activates a mismatch between nsIOService::UseSocketProcess, which checks MOZ_FORCE_USE_SOCKET_PROCESS [5], and nsIOService::LaunchSocketProcess, which doesn't [6]. The net result is that necko is inoperable, because part of the system thinks there should be a socket process and part of the system thinks the converse. We could solve this mismatch by making LaunchSocketProcess check MOZ_FORCE_USE_SOCKET_PROCESS, but that would simply override the attempt to disable the socket process in backgroundtasks.js. According to Nick, disabling the socket process for background tasks was just done to avoid a crash, and that crash appears to be gone. So we just remove that special-casing. [1] https://searchfox.org/mozilla-central/rev/b847c844adf49013067281d3237e7ada24325a34/taskcluster/gecko_taskgraph/transforms/tests.py#329 [2] https://searchfox.org/mozilla-central/rev/b847c844adf49013067281d3237e7ada24325a34/testing/xpcshell/runxpcshelltests.py#1526 [3] https://searchfox.org/mozilla-central/rev/b847c844adf49013067281d3237e7ada24325a34/testing/xpcshell/runxpcshelltests.py#1198 [4] https://searchfox.org/mozilla-central/rev/b847c844adf49013067281d3237e7ada24325a34/toolkit/components/backgroundtasks/defaults/backgroundtasks.js#8 [5] https://searchfox.org/mozilla-central/rev/b847c844adf49013067281d3237e7ada24325a34/netwerk/base/nsIOService.cpp#583 [6] https://searchfox.org/mozilla-central/rev/b847c844adf49013067281d3237e7ada24325a34/netwerk/base/nsIOService.cpp#505 Differential Revision: https://phabricator.services.mozilla.com/D127906 |
||
---|---|---|
.. | ||
defaults | ||
docs | ||
tests | ||
BackgroundTask_exception.jsm | ||
BackgroundTask_failure.jsm | ||
BackgroundTask_success.jsm | ||
BackgroundTasks.cpp | ||
BackgroundTasks.h | ||
BackgroundTasksManager.jsm | ||
BackgroundTasksTestUtils.jsm | ||
BackgroundTasksUtils.jsm | ||
components.conf | ||
moz.build | ||
nsIBackgroundTasks.idl | ||
nsIBackgroundTasksManager.idl |