mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 1585582 - Simplify exposure of AppCache interface for SecureContext r=baku
Differential Revision: https://phabricator.services.mozilla.com/D47959 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
c034560cf3
commit
bbf5b145a3
@ -2987,12 +2987,6 @@ bool nsGlobalWindowInner::IsPrivilegedChromeWindow(JSContext* aCx,
|
||||
nsContentUtils::GetSystemPrincipal();
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool nsGlobalWindowInner::OfflineCacheAllowedForContext(JSContext* aCx,
|
||||
JSObject* aObj) {
|
||||
return IsSecureContextOrObjectIsFromSecureContext(aCx, aObj);
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool nsGlobalWindowInner::IsRequestIdleCallbackEnabled(JSContext* aCx,
|
||||
JSObject* aObj) {
|
||||
|
@ -389,9 +389,6 @@ class nsGlobalWindowInner final : public mozilla::dom::EventTarget,
|
||||
|
||||
static bool IsPrivilegedChromeWindow(JSContext* /* unused */, JSObject* aObj);
|
||||
|
||||
static bool OfflineCacheAllowedForContext(JSContext* /* unused */,
|
||||
JSObject* aObj);
|
||||
|
||||
static bool IsRequestIdleCallbackEnabled(JSContext* aCx,
|
||||
JSObject* /* unused */);
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
[Pref="browser.cache.offline.enable", Func="nsGlobalWindowInner::OfflineCacheAllowedForContext",
|
||||
[SecureContext, Pref="browser.cache.offline.enable",
|
||||
Exposed=Window]
|
||||
interface OfflineResourceList : EventTarget {
|
||||
/**
|
||||
|
@ -72,7 +72,7 @@ typedef OfflineResourceList ApplicationCache;
|
||||
#ifdef HAVE_SIDEBAR
|
||||
[Replaceable, Throws] readonly attribute External external;
|
||||
#endif
|
||||
[Throws, Pref="browser.cache.offline.enable", Func="nsGlobalWindowInner::OfflineCacheAllowedForContext"] readonly attribute ApplicationCache applicationCache;
|
||||
[Throws, SecureContext, Pref="browser.cache.offline.enable"] readonly attribute ApplicationCache applicationCache;
|
||||
|
||||
// user prompts
|
||||
[Throws, NeedsSubjectPrincipal] void alert();
|
||||
|
Loading…
Reference in New Issue
Block a user