Bug 1842451 - Remove dom.requestIdleCallback.enabled pref r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D183799
This commit is contained in:
Gregory Pappas 2023-07-18 08:00:26 +00:00
parent ef9c5f5e60
commit 6545f80cb1
5 changed files with 2 additions and 20 deletions

View File

@ -3296,14 +3296,6 @@ bool nsGlobalWindowInner::IsPrivilegedChromeWindow(JSContext*, JSObject* aObj) {
nsContentUtils::GetSystemPrincipal();
}
/* static */
bool nsGlobalWindowInner::IsRequestIdleCallbackEnabled(JSContext* aCx,
JSObject*) {
// The requestIdleCallback should always be enabled for system code.
return StaticPrefs::dom_requestIdleCallback_enabled() ||
nsContentUtils::IsSystemCaller(aCx);
}
/* static */
bool nsGlobalWindowInner::DeviceSensorsEnabled(JSContext*, JSObject*) {
return Preferences::GetBool("device.sensors.enabled");

View File

@ -403,8 +403,6 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget,
static bool IsPrivilegedChromeWindow(JSContext*, JSObject* aObj);
static bool IsRequestIdleCallbackEnabled(JSContext* aCx, JSObject*);
static bool DeviceSensorsEnabled(JSContext*, JSObject*);
static bool CachesEnabled(JSContext* aCx, JSObject*);

View File

@ -7,8 +7,7 @@
* https://w3c.github.io/requestidlecallback/
*/
[Exposed=Window,
Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"]
[Exposed=Window]
interface IdleDeadline {
DOMHighResTimeStamp timeRemaining();
readonly attribute boolean didTimeout;

View File

@ -746,10 +746,9 @@ partial interface Window {
Window includes WindowOrWorkerGlobalScope;
partial interface Window {
[Throws, Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"]
[Throws]
unsigned long requestIdleCallback(IdleRequestCallback callback,
optional IdleRequestOptions options = {});
[Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"]
undefined cancelIdleCallback(unsigned long handle);
};

View File

@ -3544,12 +3544,6 @@
value: 100
mirror: always
# Enable requestIdleCallback API
- name: dom.requestIdleCallback.enabled
type: bool
value: true
mirror: always
# Enable Screen Orientation lock
- name: dom.screenorientation.allow-lock
type: bool