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:
Jonathan Kingston 2019-10-18 16:05:28 +00:00
Родитель a130dd01d5
Коммит 06801e64f6
4 изменённых файлов: 2 добавлений и 11 удалений

Просмотреть файл

@ -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();