зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1779562 - Always perform parent process assertion in IOUtils methods r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D151820
This commit is contained in:
Родитель
ef2a63d6b6
Коммит
ddeadecee4
|
@ -268,8 +268,6 @@ static void RejectShuttingDown(Promise* aPromise) {
|
|||
IOUtils::IOError(NS_ERROR_ABORT).WithMessage(SHUTDOWN_ERROR));
|
||||
}
|
||||
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
|
||||
static bool AssertParentProcessWithCallerLocationImpl(GlobalObject& aGlobal,
|
||||
nsCString& reason) {
|
||||
if (MOZ_LIKELY(XRE_IsParentProcess())) {
|
||||
|
@ -303,7 +301,6 @@ static void AssertParentProcessWithCallerLocation(GlobalObject& aGlobal) {
|
|||
MOZ_CRASH_UNSAFE_PRINTF("%s", reason.get());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// IOUtils implementation
|
||||
/* static */
|
||||
|
@ -314,9 +311,7 @@ template <typename Fn>
|
|||
already_AddRefed<Promise> IOUtils::WithPromiseAndState(GlobalObject& aGlobal,
|
||||
ErrorResult& aError,
|
||||
Fn aFn) {
|
||||
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
||||
AssertParentProcessWithCallerLocation(aGlobal);
|
||||
#endif
|
||||
|
||||
RefPtr<Promise> promise = CreateJSPromise(aGlobal, aError);
|
||||
if (!promise) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче