forked from mirrors/gecko-dev
Backed out 3 changesets (bug 1602832) for assertion failing on IOInterposer.cpp CLOSED TREE
Backed out changeset 9123faab0d42 (bug 1602832) Backed out changeset 4c3764b3d7bc (bug 1602832) Backed out changeset 9c955a99c95d (bug 1602832)
This commit is contained in:
parent
44749f084b
commit
a3db8af185
14 changed files with 36 additions and 58 deletions
|
|
@ -7,6 +7,4 @@ support-files =
|
|||
[test_DNSLookup.js]
|
||||
skip-if = debug # Bug 1617845
|
||||
[test_LookupAggregator.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_TRRRacer.js]
|
||||
skip-if = socketprocess_networking
|
||||
|
|
|
|||
|
|
@ -7349,7 +7349,7 @@
|
|||
# ("network.http.network_access_on_socket_process.enabled").
|
||||
# Changing these prefs requires a restart.
|
||||
- name: network.process.enabled
|
||||
type: RelaxedAtomicBool
|
||||
type: bool
|
||||
mirror: always
|
||||
#ifdef ANDROID
|
||||
value: false
|
||||
|
|
@ -7361,14 +7361,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
# Perform all network access on the socket process.
|
||||
# The pref requires "network.process.enabled" to be true.
|
||||
# Changing these prefs requires a restart.
|
||||
- name: network.http.network_access_on_socket_process.enabled
|
||||
type: RelaxedAtomicBool
|
||||
mirror: always
|
||||
value: false
|
||||
|
||||
# Telemetry of traffic categories. Whether or not to enable HttpTrafficAnalyzer.
|
||||
- name: network.traffic_analyzer.enabled
|
||||
type: RelaxedAtomicBool
|
||||
|
|
|
|||
|
|
@ -1579,6 +1579,11 @@ pref("network.sts.max_time_for_pr_close_during_shutdown", 5000);
|
|||
// The value is expected in seconds.
|
||||
pref("network.sts.pollable_event_timeout", 6);
|
||||
|
||||
// Perform all network access on the socket process.
|
||||
// The pref requires "network.sts.socket_process.enable" to be true.
|
||||
// Changing these prefs requires a restart.
|
||||
pref("network.http.network_access_on_socket_process.enabled", false);
|
||||
|
||||
// Enable/disable sni encryption.
|
||||
pref("network.security.esni.enabled", false);
|
||||
|
||||
|
|
|
|||
|
|
@ -278,6 +278,7 @@ nsresult nsIOService::Init() {
|
|||
observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, true);
|
||||
observerService->AddObserver(this, NS_NETWORK_ID_CHANGED_TOPIC, true);
|
||||
observerService->AddObserver(this, NS_WIDGET_WAKE_OBSERVER_TOPIC, true);
|
||||
observerService->AddObserver(this, NS_PREFSERVICE_READ_TOPIC_ID, true);
|
||||
} else
|
||||
NS_WARNING("failed to get observer service");
|
||||
|
||||
|
|
@ -451,6 +452,11 @@ nsresult nsIOService::LaunchSocketProcess() {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!XRE_IsE10sParentProcess()) {
|
||||
LOG(("nsIOService skipping LaunchSocketProcess because e10s is disabled"));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!Preferences::GetBool("network.process.enabled", true)) {
|
||||
LOG(("nsIOService skipping LaunchSocketProcess because of the pref"));
|
||||
return NS_OK;
|
||||
|
|
@ -496,15 +502,15 @@ static bool sUseSocketProcess = false;
|
|||
static bool sUseSocketProcessChecked = false;
|
||||
|
||||
// static
|
||||
bool nsIOService::UseSocketProcess(bool aCheckAgain) {
|
||||
if (sUseSocketProcessChecked && !aCheckAgain) {
|
||||
bool nsIOService::UseSocketProcess() {
|
||||
if (sUseSocketProcessChecked) {
|
||||
return sUseSocketProcess;
|
||||
}
|
||||
|
||||
sUseSocketProcessChecked = true;
|
||||
if (StaticPrefs::network_process_enabled()) {
|
||||
sUseSocketProcess =
|
||||
StaticPrefs::network_http_network_access_on_socket_process_enabled();
|
||||
if (Preferences::GetBool("network.process.enabled")) {
|
||||
sUseSocketProcess = Preferences::GetBool(
|
||||
"network.http.network_access_on_socket_process.enabled", true);
|
||||
}
|
||||
return sUseSocketProcess;
|
||||
}
|
||||
|
|
@ -1534,7 +1540,10 @@ nsIOService::Observe(nsISupports* subject, const char* topic,
|
|||
SetOffline(false);
|
||||
}
|
||||
} else if (!strcmp(topic, kProfileDoChange)) {
|
||||
if (data && NS_LITERAL_STRING("startup").Equals(data)) {
|
||||
if (!data) {
|
||||
return NS_OK;
|
||||
}
|
||||
if (NS_LITERAL_STRING("startup").Equals(data)) {
|
||||
// Lazy initialization of network link service (see bug 620472)
|
||||
InitializeNetworkLinkService();
|
||||
// Set up the initilization flag regardless the actuall result.
|
||||
|
|
@ -1549,6 +1558,9 @@ nsIOService::Observe(nsISupports* subject, const char* topic,
|
|||
// before something calls into the cookie service.
|
||||
nsCOMPtr<nsISupports> cookieServ =
|
||||
do_GetService(NS_COOKIESERVICE_CONTRACTID);
|
||||
} else if (NS_LITERAL_STRING("xpcshell-do-get-profile").Equals(data)) {
|
||||
// xpcshell doesn't read user profile.
|
||||
LaunchSocketProcess();
|
||||
}
|
||||
} else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||
// Remember we passed XPCOM shutdown notification to prevent any
|
||||
|
|
@ -1587,6 +1599,10 @@ nsIOService::Observe(nsISupports* subject, const char* topic,
|
|||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1152048#c19
|
||||
nsCOMPtr<nsIRunnable> wakeupNotifier = new nsWakeupNotifier(this);
|
||||
NS_DispatchToMainThread(wakeupNotifier);
|
||||
} else if (!strcmp(topic, NS_PREFSERVICE_READ_TOPIC_ID)) {
|
||||
// Launch socket process after we load user's pref. This is to make sure
|
||||
// that socket process can get the latest prefs.
|
||||
LaunchSocketProcess();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class nsIOService final : public nsIIOService,
|
|||
bool SocketProcessReady();
|
||||
static void NotifySocketProcessPrefsChanged(const char* aName, void* aSelf);
|
||||
void NotifySocketProcessPrefsChanged(const char* aName);
|
||||
static bool UseSocketProcess(bool aCheckAgain = false);
|
||||
static bool UseSocketProcess();
|
||||
|
||||
bool IsSocketProcessLaunchComplete();
|
||||
|
||||
|
|
@ -141,8 +141,6 @@ class nsIOService final : public nsIIOService,
|
|||
|
||||
static void OnTLSPrefChange(const char* aPref, void* aSelf);
|
||||
|
||||
nsresult LaunchSocketProcess();
|
||||
|
||||
private:
|
||||
// These shouldn't be called directly:
|
||||
// - construct using GetInstance
|
||||
|
|
@ -193,6 +191,7 @@ class nsIOService final : public nsIIOService,
|
|||
nsIInterfaceRequestor* aCallbacks,
|
||||
bool aAnonymous);
|
||||
|
||||
nsresult LaunchSocketProcess();
|
||||
void DestroySocketProcess();
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -445,8 +445,6 @@ nsresult nsHttpHandler::Init() {
|
|||
mIOService = new nsMainThreadPtrHolder<nsIIOService>(
|
||||
"nsHttpHandler::mIOService", service);
|
||||
|
||||
gIOService->LaunchSocketProcess();
|
||||
|
||||
if (IsNeckoChild()) NeckoChild::InitNeckoChild();
|
||||
|
||||
InitUserAgentComponents();
|
||||
|
|
@ -596,7 +594,7 @@ nsresult nsHttpHandler::InitConnectionMgr() {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
if (nsIOService::UseSocketProcess(true) && XRE_IsParentProcess()) {
|
||||
if (nsIOService::UseSocketProcess() && XRE_IsParentProcess()) {
|
||||
if (!gIOService->SocketProcessReady()) {
|
||||
gIOService->CallOrWaitForSocketProcess(
|
||||
[]() { Unused << gHttpHandler->InitConnectionMgr(); });
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ skip-if = bits != 32
|
|||
[test_compressappend.js]
|
||||
[test_content_encoding_gzip.js]
|
||||
[test_content_sniffer.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_cookie_header.js]
|
||||
[test_cookiejars.js]
|
||||
[test_cookiejars_safebrowsing.js]
|
||||
|
|
@ -258,7 +257,6 @@ skip-if = os == "win"
|
|||
[test_nojsredir.js]
|
||||
[test_offline_status.js]
|
||||
[test_origin.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_anonymous-coalescing.js]
|
||||
[test_original_sent_received_head.js]
|
||||
[test_parse_content_type.js]
|
||||
|
|
@ -306,12 +304,9 @@ fail-if = os == "android"
|
|||
# http2 unit tests require us to have node available to run the spdy and http2 server
|
||||
[test_http2.js]
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
skip-if = socketprocess_networking
|
||||
[test_altsvc.js]
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
skip-if = socketprocess_networking
|
||||
[test_speculative_connect.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_standardurl.js]
|
||||
[test_standardurl_default_port.js]
|
||||
[test_standardurl_port.js]
|
||||
|
|
@ -333,14 +328,12 @@ run-sequentially = Hardcoded hash value includes port 4444.
|
|||
[test_unix_domain.js]
|
||||
[test_addr_in_use_error.js]
|
||||
[test_about_networking.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_ping_aboutnetworking.js]
|
||||
skip-if = (verify && (os == 'mac'))
|
||||
[test_referrer.js]
|
||||
[test_referrer_cross_origin.js]
|
||||
[test_referrer_policy.js]
|
||||
[test_predictor.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_signature_extraction.js]
|
||||
skip-if = os != "win"
|
||||
[test_synthesized_response.js]
|
||||
|
|
@ -352,7 +345,6 @@ skip-if = os != "win"
|
|||
firefox-appdir = browser
|
||||
[test_be_conservative_error_handling.js]
|
||||
firefox-appdir = browser
|
||||
skip-if = socketprocess_networking
|
||||
[test_tls_server.js]
|
||||
firefox-appdir = browser
|
||||
[test_tls_server_multiple_clients.js]
|
||||
|
|
@ -381,7 +373,6 @@ skip-if = appname == "thunderbird"
|
|||
[test_throttlequeue.js]
|
||||
[test_throttlechannel.js]
|
||||
[test_throttling.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_separate_connections.js]
|
||||
[test_trackingProtection_annotateChannels.js]
|
||||
[test_race_cache_with_network.js]
|
||||
|
|
@ -400,16 +391,14 @@ skip-if = (verify && (os == 'linux')) || (os == "android" && processor == "x86_6
|
|||
run-sequentially = node server exceptions dont replay well
|
||||
[test_trr.js]
|
||||
# test_trr.js is not working in Thunderbird due to bug 1608066.
|
||||
skip-if = appname == "thunderbird" || socketprocess_networking
|
||||
skip-if = appname == "thunderbird"
|
||||
[test_ioservice.js]
|
||||
[test_substituting_protocol_handler.js]
|
||||
[test_proxyconnect.js]
|
||||
skip-if = tsan || socketprocess_networking # Bug 1614708
|
||||
skip-if = tsan # Bug 1614708
|
||||
[test_captive_portal_service.js]
|
||||
run-sequentially = node server exceptions dont replay well
|
||||
skip-if = socketprocess_networking
|
||||
[test_esni_dns_fetch.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_network_connectivity_service.js]
|
||||
[test_suspend_channel_on_authRetry.js]
|
||||
[test_suspend_channel_on_examine_merged_response.js]
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ treeherder:
|
|||
'X': 'Xpcshell tests'
|
||||
'X-1proc': 'Xpcshell tests, without e10s'
|
||||
'X-fis': 'Xpcshell tests with fission enabled'
|
||||
'X-spi-nw': 'Xpcshell tests with networking on socket process'
|
||||
'L10n': 'Localised Repacks'
|
||||
'L10n-Rpk': 'Localized Repackaged Repacks'
|
||||
'BM': 'Beetmover'
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ job-defaults:
|
|||
suite: xpcshell
|
||||
variants:
|
||||
by-test-platform:
|
||||
linux1804-64/debug: ['fission', 'socketprocess_networking']
|
||||
linux1804-64/debug: ['fission']
|
||||
default: ['fission']
|
||||
target:
|
||||
by-test-platform:
|
||||
|
|
|
|||
|
|
@ -184,19 +184,6 @@ TEST_VARIANTS = {
|
|||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
'socketprocess_networking': {
|
||||
'description': "{description} with networking on socket process enabled",
|
||||
'suffix': 'spi-nw',
|
||||
'merge': {
|
||||
'mozharness': {
|
||||
'extra-options': [
|
||||
'--setpref=network.process.enabled=true',
|
||||
'--setpref=network.http.network_access_on_socket_process.enabled=true',
|
||||
'--setpref=network.ssl_tokens_cache_enabled=true',
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1239,7 +1226,7 @@ def ensure_spi_disabled_on_all_but_spi(config, tests):
|
|||
'junit' not in test['suite'] and
|
||||
'raptor' not in test['suite'])
|
||||
|
||||
if has_setpref and variant != 'socketprocess' and variant != 'socketprocess_networking':
|
||||
if has_setpref and variant != 'socketprocess':
|
||||
test['mozharness']['extra-options'].append(
|
||||
'--setpref=media.peerconnection.mtransport_process=false')
|
||||
test['mozharness']['extra-options'].append(
|
||||
|
|
|
|||
|
|
@ -1235,9 +1235,6 @@ class XPCShellTests(object):
|
|||
self.mozInfo['verify'] = options.get('verify', False)
|
||||
self.mozInfo['webrender'] = self.enable_webrender
|
||||
|
||||
self.mozInfo['socketprocess_networking'] = prefs.get(
|
||||
'network.http.network_access_on_socket_process.enabled', False)
|
||||
|
||||
mozinfo.update(self.mozInfo)
|
||||
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -179,7 +179,6 @@ skip-if = os == "android" && debug
|
|||
[test_ext_webRequest_permission.js]
|
||||
skip-if = os == "android" && debug
|
||||
[test_ext_webRequest_requestSize.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_ext_webRequest_responseBody.js]
|
||||
skip-if = os == "android" && debug
|
||||
[test_ext_webRequest_set_cookie.js]
|
||||
|
|
|
|||
|
|
@ -15,5 +15,4 @@ support-files =
|
|||
data/notags.mp3
|
||||
|
||||
[test_mediasniffer.js]
|
||||
skip-if = socketprocess_networking
|
||||
[test_mediasniffer_ext.js]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
head = head.js
|
||||
support-files =
|
||||
../shared-head.js
|
||||
skip-if = toolkit == 'android' || socketprocess_networking
|
||||
skip-if = toolkit == 'android'
|
||||
|
||||
[test_active_configuration.js]
|
||||
[test_start.js]
|
||||
|
|
|
|||
Loading…
Reference in a new issue