зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 67acd8531789 (bug 1665486) for causing hazard bustages in FunctionBroker.h
CLOSED TREE
This commit is contained in:
Родитель
51ef39e1d8
Коммит
fc508522d9
|
@ -275,7 +275,7 @@ static void GrantFileAccess(base::ProcessId aClientId, LPOPENFILENAME& aLpofn,
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
BROKER_DISABLE_CFGUARD BOOL GetSaveFileNameWFB::RunFunction(
|
BOOL GetSaveFileNameWFB::RunFunction(
|
||||||
GetSaveFileNameWFB::FunctionType* aOrigFunction, base::ProcessId aClientId,
|
GetSaveFileNameWFB::FunctionType* aOrigFunction, base::ProcessId aClientId,
|
||||||
LPOPENFILENAMEW& aLpofn) const {
|
LPOPENFILENAMEW& aLpofn) const {
|
||||||
BOOL result = aOrigFunction(aLpofn);
|
BOOL result = aOrigFunction(aLpofn);
|
||||||
|
@ -299,7 +299,7 @@ typedef FileDlgFunctionBroker<ID_GetOpenFileNameW, decltype(GetOpenFileNameW)>
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
BROKER_DISABLE_CFGUARD BOOL GetOpenFileNameWFB::RunFunction(
|
BOOL GetOpenFileNameWFB::RunFunction(
|
||||||
GetOpenFileNameWFB::FunctionType* aOrigFunction, base::ProcessId aClientId,
|
GetOpenFileNameWFB::FunctionType* aOrigFunction, base::ProcessId aClientId,
|
||||||
LPOPENFILENAMEW& aLpofn) const {
|
LPOPENFILENAMEW& aLpofn) const {
|
||||||
BOOL result = aOrigFunction(aLpofn);
|
BOOL result = aOrigFunction(aLpofn);
|
||||||
|
@ -1332,9 +1332,10 @@ struct CMWReqInfo::ShouldMarshal<2> {
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
template <>
|
template <>
|
||||||
BROKER_DISABLE_CFGUARD HANDLE CreateMutexWFB::RunFunction(
|
HANDLE CreateMutexWFB::RunFunction(CreateMutexWFB::FunctionType* aOrigFunction,
|
||||||
CreateMutexWFB::FunctionType* aOrigFunction, base::ProcessId aClientId,
|
base::ProcessId aClientId,
|
||||||
LPSECURITY_ATTRIBUTES& aAttribs, BOOL& aOwner, LPCWSTR& aName) const {
|
LPSECURITY_ATTRIBUTES& aAttribs,
|
||||||
|
BOOL& aOwner, LPCWSTR& aName) const {
|
||||||
// Use CreateMutexW to get the camera mutex and DuplicateHandle to open it
|
// Use CreateMutexW to get the camera mutex and DuplicateHandle to open it
|
||||||
// for use in the child process.
|
// for use in the child process.
|
||||||
// Recall that aAttribs, aOwner and aName are all unmarshaled so they are
|
// Recall that aAttribs, aOwner and aName are all unmarshaled so they are
|
||||||
|
|
|
@ -153,16 +153,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(XP_WIN) && defined(__clang__) && __has_declspec_attribute(guard)
|
|
||||||
// Workaround for https://bugs.llvm.org/show_bug.cgi?id=47617
|
|
||||||
// Some of the brokered function thunks don't get properly marked as call
|
|
||||||
// targets, so we have to disable CFG when returning to the original function.
|
|
||||||
// Unlike `INTERCEPTOR_DISABLE_CFGUARD`, this happens in 64-bit builds too.
|
|
||||||
# define BROKER_DISABLE_CFGUARD __declspec(guard(nocf))
|
|
||||||
#else
|
|
||||||
# define BROKER_DISABLE_CFGUARD /* nothing */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace plugins {
|
namespace plugins {
|
||||||
|
|
||||||
|
@ -1246,9 +1236,8 @@ class FunctionBroker<functionId, ResultType HOOK_CALL(ParamTypes...),
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename... VarParams>
|
template <typename... VarParams>
|
||||||
BROKER_DISABLE_CFGUARD ResultType RunFunction(FunctionType* aFunction,
|
ResultType RunFunction(FunctionType* aFunction, base::ProcessId aClientId,
|
||||||
base::ProcessId aClientId,
|
VarParams&... aParams) const {
|
||||||
VarParams&... aParams) const {
|
|
||||||
return aFunction(aParams...);
|
return aFunction(aParams...);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче