зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
f9d8db28af
Коммит
44f8c639ab
|
@ -2982,12 +2982,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) {
|
||||
|
|
|
@ -387,9 +387,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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче