mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 04:41:11 +00:00
Bug 1842451 - Remove dom.requestIdleCallback.enabled pref r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D183799
This commit is contained in:
parent
ef9c5f5e60
commit
6545f80cb1
@ -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");
|
||||
|
@ -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*);
|
||||
|
@ -7,8 +7,7 @@
|
||||
* https://w3c.github.io/requestidlecallback/
|
||||
*/
|
||||
|
||||
[Exposed=Window,
|
||||
Func="nsGlobalWindowInner::IsRequestIdleCallbackEnabled"]
|
||||
[Exposed=Window]
|
||||
interface IdleDeadline {
|
||||
DOMHighResTimeStamp timeRemaining();
|
||||
readonly attribute boolean didTimeout;
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user