зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1710473 - Remove hal::SetProcessPrioritySupported(). r=gsvelto,geckoview-reviewers,aklotz
As far as I can see, all this does is protect the user from running some useless code if they manually enable the priority manager using a pref on an OS that doesn't support it. The upside of allowing this is that it makes it possible to debug the priority manager on OSX and Linux with just a pref flip. Differential Revision: https://phabricator.services.mozilla.com/D114767
This commit is contained in:
Родитель
9d3986274c
Коммит
9c9c36a9fa
|
@ -725,7 +725,6 @@ NS_CycleCollectorSuspect3
|
|||
?RegisterGhostWindowsDistinguishedAmount@mozilla@@YA?AW4nsresult@@P6A_JXZ@Z
|
||||
?Init@SVGElementFactory@dom@mozilla@@SAXXZ
|
||||
?FromMessagesToSharedParent@SharedMessageBody@dom@mozilla@@SA_NAAV?$nsTArray@VMessageData@dom@mozilla@@@@AAV?$FallibleTArray@V?$RefPtr@VSharedMessageBody@dom@mozilla@@@@@@W4TransferringSupport@StructuredCloneHolder@23@@Z
|
||||
?SetProcessPrioritySupported@hal@mozilla@@YA_NXZ
|
||||
?Get@LogModule@mozilla@@SAPAV12@PBD@Z
|
||||
?SetProcessPriority@hal_impl@mozilla@@YAXHW4ProcessPriority@hal@2@@Z
|
||||
?GetHalLog@hal@mozilla@@YAPAVLogModule@2@XZ
|
||||
|
|
|
@ -731,7 +731,6 @@ NS_CycleCollectorSuspect3
|
|||
?RegisterGhostWindowsDistinguishedAmount@mozilla@@YA?AW4nsresult@@P6A_JXZ@Z
|
||||
?Init@SVGElementFactory@dom@mozilla@@SAXXZ
|
||||
?FromMessagesToSharedParent@SharedMessageBody@dom@mozilla@@SA_NAEAV?$nsTArray@VMessageData@dom@mozilla@@@@AEAV?$FallibleTArray@V?$RefPtr@VSharedMessageBody@dom@mozilla@@@@@@W4TransferringSupport@StructuredCloneHolder@23@@Z
|
||||
?SetProcessPrioritySupported@hal@mozilla@@YA_NXZ
|
||||
?Get@LogModule@mozilla@@SAPEAV12@PEBD@Z
|
||||
?SetProcessPriority@hal_impl@mozilla@@YAXHW4ProcessPriority@hal@2@@Z
|
||||
?GetHalLog@hal@mozilla@@YAPEAVLogModule@2@XZ
|
||||
|
|
|
@ -307,7 +307,6 @@ void ProcessPriorityManagerImpl::PrefChangedCallback(const char* aPref,
|
|||
/* static */
|
||||
bool ProcessPriorityManagerImpl::PrefsEnabled() {
|
||||
return StaticPrefs::dom_ipc_processPriorityManager_enabled() &&
|
||||
hal::SetProcessPrioritySupported() &&
|
||||
!StaticPrefs::dom_ipc_tabs_disabled();
|
||||
}
|
||||
|
||||
|
|
|
@ -417,10 +417,6 @@ void UnlockScreenOrientation() {
|
|||
PROXY_IF_SANDBOXED(UnlockScreenOrientation());
|
||||
}
|
||||
|
||||
bool SetProcessPrioritySupported() {
|
||||
RETURN_PROXY_IF_SANDBOXED(SetProcessPrioritySupported(), false);
|
||||
}
|
||||
|
||||
void SetProcessPriority(int aPid, ProcessPriority aPriority) {
|
||||
// n.b. The sandboxed implementation crashes; SetProcessPriority works only
|
||||
// from the main process.
|
||||
|
|
|
@ -242,12 +242,6 @@ void NotifyScreenConfigurationChange(
|
|||
*/
|
||||
void UnlockScreenOrientation();
|
||||
|
||||
/**
|
||||
* Return true if the current platform supports the setting of process
|
||||
* priority.
|
||||
*/
|
||||
bool SetProcessPrioritySupported();
|
||||
|
||||
/**
|
||||
* Set the priority of the given process.
|
||||
*
|
||||
|
|
|
@ -29,8 +29,6 @@ ToJavaPriorityLevel(const ProcessPriority aPriority) {
|
|||
namespace mozilla {
|
||||
namespace hal_impl {
|
||||
|
||||
bool SetProcessPrioritySupported() { return true; }
|
||||
|
||||
void SetProcessPriority(int aPid, ProcessPriority aPriority) {
|
||||
if (aPriority == PROCESS_PRIORITY_PARENT_PROCESS) {
|
||||
// This is the parent process itself, which we do not control.
|
||||
|
|
|
@ -10,8 +10,6 @@ using namespace mozilla::hal;
|
|||
namespace mozilla {
|
||||
namespace hal_impl {
|
||||
|
||||
bool SetProcessPrioritySupported() { return false; }
|
||||
|
||||
void SetProcessPriority(int aPid, ProcessPriority aPriority) {
|
||||
HAL_LOG("FallbackProcessPriority - SetProcessPriority(%d, %s)\n", aPid,
|
||||
ProcessPriorityToString(aPriority));
|
||||
|
|
|
@ -132,10 +132,6 @@ void SetProcessPriority(int aPid, ProcessPriority aPriority) {
|
|||
MOZ_CRASH("Only the main process may set processes' priorities.");
|
||||
}
|
||||
|
||||
bool SetProcessPrioritySupported() {
|
||||
MOZ_CRASH("Only the main process may call SetProcessPrioritySupported().");
|
||||
}
|
||||
|
||||
class HalParent : public PHalParent,
|
||||
public BatteryObserver,
|
||||
public NetworkObserver,
|
||||
|
|
|
@ -12,8 +12,6 @@ using namespace mozilla::hal;
|
|||
namespace mozilla {
|
||||
namespace hal_impl {
|
||||
|
||||
bool SetProcessPrioritySupported() { return true; }
|
||||
|
||||
void SetProcessPriority(int aPid, ProcessPriority aPriority) {
|
||||
HAL_LOG("WindowsProcessPriority - SetProcessPriority(%d, %s)\n", aPid,
|
||||
ProcessPriorityToString(aPriority));
|
||||
|
|
Загрузка…
Ссылка в новой задаче