зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1518344 - P4. Don't attempt to use the RDD process if we failed to start it earlier. r=mjf,bryce,padenot
Now that launching the RDD process is fully asynchronous and no longer block the parent main thread, we can enable it on all platforms. If we did fail to start it, we will not attempt again unless on Nightly. Re-enable the RDD on Windows for ARM seeing that even if it did fail, it won't inconvenience the user anymore (other than the first video/audio element will take longer than usual to start) Differential Revision: https://phabricator.services.mozilla.com/D96669
This commit is contained in:
Родитель
5318ef7bab
Коммит
0e897d1e55
|
@ -126,6 +126,12 @@ auto RDDProcessManager::EnsureRDDProcessAndCreateBridge(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mNumProcessAttempts &&
|
||||||
|
!StaticPrefs::media_rdd_retryonfailure_enabled()) {
|
||||||
|
// We failed to start the RDD process earlier, abort now.
|
||||||
|
return EnsureRDDPromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE,
|
||||||
|
__func__);
|
||||||
|
}
|
||||||
// Launch the RDD process.
|
// Launch the RDD process.
|
||||||
std::vector<std::string> extraArgs;
|
std::vector<std::string> extraArgs;
|
||||||
nsCString parentBuildID(mozilla::PlatformBuildID());
|
nsCString parentBuildID(mozilla::PlatformBuildID());
|
||||||
|
@ -161,13 +167,16 @@ auto RDDProcessManager::EnsureRDDProcessAndCreateBridge(
|
||||||
|
|
||||||
if (!CreateVideoBridge() ||
|
if (!CreateVideoBridge() ||
|
||||||
!CreateContentBridge(aOtherProcess, &endpoint)) {
|
!CreateContentBridge(aOtherProcess, &endpoint)) {
|
||||||
|
mNumProcessAttempts++;
|
||||||
return EnsureRDDPromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE,
|
return EnsureRDDPromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE,
|
||||||
__func__);
|
__func__);
|
||||||
}
|
}
|
||||||
|
mNumProcessAttempts = 0;
|
||||||
return EnsureRDDPromise::CreateAndResolve(std::move(endpoint),
|
return EnsureRDDPromise::CreateAndResolve(std::move(endpoint),
|
||||||
__func__);
|
__func__);
|
||||||
},
|
},
|
||||||
[this](nsresult aError) {
|
[this](nsresult aError) {
|
||||||
|
mNumProcessAttempts++;
|
||||||
DestroyProcess();
|
DestroyProcess();
|
||||||
return EnsureRDDPromise::CreateAndReject(aError, __func__);
|
return EnsureRDDPromise::CreateAndReject(aError, __func__);
|
||||||
});
|
});
|
||||||
|
|
|
@ -7171,11 +7171,7 @@
|
||||||
- name: media.rdd-process.enabled
|
- name: media.rdd-process.enabled
|
||||||
type: RelaxedAtomicBool
|
type: RelaxedAtomicBool
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
#if defined(_ARM64_)
|
|
||||||
value: false
|
|
||||||
#else
|
|
||||||
value: true
|
value: true
|
||||||
#endif
|
|
||||||
#elif defined(XP_MACOSX)
|
#elif defined(XP_MACOSX)
|
||||||
value: true
|
value: true
|
||||||
#elif defined(XP_LINUX) && !defined(ANDROID)
|
#elif defined(XP_LINUX) && !defined(ANDROID)
|
||||||
|
@ -7185,6 +7181,11 @@
|
||||||
#endif
|
#endif
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
||||||
|
- name: media.rdd-retryonfailure.enabled
|
||||||
|
type: RelaxedAtomicBool
|
||||||
|
value: @IS_NIGHTLY_BUILD@
|
||||||
|
mirror: always
|
||||||
|
|
||||||
- name: media.rdd-process.startup_timeout_ms
|
- name: media.rdd-process.startup_timeout_ms
|
||||||
type: RelaxedAtomicInt32
|
type: RelaxedAtomicInt32
|
||||||
value: 5000
|
value: 5000
|
||||||
|
|
Загрузка…
Ссылка в новой задаче