зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1475065 part 12. Stop using nsIDOMOfflineResourceList in bindings. r=nika
This commit is contained in:
Родитель
88e231c391
Коммит
c360173249
|
@ -111,7 +111,6 @@
|
|||
#include "nsIDocShell.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "Crypto.h"
|
||||
#include "nsIDOMOfflineResourceList.h"
|
||||
#include "nsDOMString.h"
|
||||
#include "nsIEmbeddingSiteWindow.h"
|
||||
#include "nsThreadUtils.h"
|
||||
|
@ -3134,7 +3133,7 @@ nsGlobalWindowInner::DeviceSensorsEnabled(JSContext* aCx, JSObject* aObj)
|
|||
return Preferences::GetBool("device.sensors.enabled");
|
||||
}
|
||||
|
||||
nsIDOMOfflineResourceList*
|
||||
nsDOMOfflineResourceList*
|
||||
nsGlobalWindowInner::GetApplicationCache(ErrorResult& aError)
|
||||
{
|
||||
if (!mApplicationCache) {
|
||||
|
@ -3165,14 +3164,10 @@ nsGlobalWindowInner::GetApplicationCache(ErrorResult& aError)
|
|||
return mApplicationCache;
|
||||
}
|
||||
|
||||
already_AddRefed<nsIDOMOfflineResourceList>
|
||||
nsDOMOfflineResourceList*
|
||||
nsGlobalWindowInner::GetApplicationCache()
|
||||
{
|
||||
ErrorResult dummy;
|
||||
nsCOMPtr<nsIDOMOfflineResourceList> applicationCache =
|
||||
GetApplicationCache(dummy);
|
||||
dummy.SuppressException();
|
||||
return applicationCache.forget();
|
||||
return GetApplicationCache(IgnoreErrors());
|
||||
}
|
||||
|
||||
Crypto*
|
||||
|
@ -5886,8 +5881,7 @@ nsGlobalWindowInner::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
// Instantiate the application object now. It observes update belonging to
|
||||
// this window's document and correctly updates the applicationCache object
|
||||
// state.
|
||||
nsCOMPtr<nsIDOMOfflineResourceList> applicationCache = GetApplicationCache();
|
||||
nsCOMPtr<nsIObserver> observer = do_QueryInterface(applicationCache);
|
||||
nsCOMPtr<nsIObserver> observer = GetApplicationCache();
|
||||
if (observer)
|
||||
observer->Observe(aSubject, aTopic, aData);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ class nsIBaseWindow;
|
|||
class nsIContent;
|
||||
class nsICSSDeclaration;
|
||||
class nsIDocShellTreeOwner;
|
||||
class nsIDOMOfflineResourceList;
|
||||
class nsDOMOfflineResourceList;
|
||||
class nsIScrollableFrame;
|
||||
class nsIControllers;
|
||||
class nsIJSID;
|
||||
|
@ -684,8 +684,8 @@ public:
|
|||
const nsAString& aName,
|
||||
const nsAString& aOptions,
|
||||
mozilla::ErrorResult& aError);
|
||||
nsIDOMOfflineResourceList* GetApplicationCache(mozilla::ErrorResult& aError);
|
||||
already_AddRefed<nsIDOMOfflineResourceList> GetApplicationCache() override;
|
||||
nsDOMOfflineResourceList* GetApplicationCache(mozilla::ErrorResult& aError);
|
||||
nsDOMOfflineResourceList* GetApplicationCache() override;
|
||||
|
||||
#if defined(MOZ_WIDGET_ANDROID)
|
||||
int16_t Orientation(mozilla::dom::CallerType aCallerType) const;
|
||||
|
@ -1420,7 +1420,7 @@ protected:
|
|||
nsCOMPtr<nsIURI> mLastOpenedURI;
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIDOMOfflineResourceList> mApplicationCache;
|
||||
RefPtr<nsDOMOfflineResourceList> mApplicationCache;
|
||||
|
||||
using XBLPrototypeHandlerTable = nsJSThingHashtable<nsPtrHashKey<nsXBLPrototypeHandler>, JSObject*>;
|
||||
mozilla::UniquePtr<XBLPrototypeHandlerTable> mCachedXBLPrototypeHandlers;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define DOM_WINDOW_FROZEN_TOPIC "dom-window-frozen"
|
||||
#define DOM_WINDOW_THAWED_TOPIC "dom-window-thawed"
|
||||
|
||||
class nsDOMOfflineResourceList;
|
||||
class nsDOMWindowList;
|
||||
class nsGlobalWindowInner;
|
||||
class nsGlobalWindowOuter;
|
||||
|
@ -614,7 +615,7 @@ public:
|
|||
|
||||
virtual mozilla::dom::Element* GetFrameElement() = 0;
|
||||
|
||||
virtual already_AddRefed<nsIDOMOfflineResourceList> GetApplicationCache() = 0;
|
||||
virtual nsDOMOfflineResourceList* GetApplicationCache() = 0;
|
||||
|
||||
virtual bool GetFullScreen() = 0;
|
||||
|
||||
|
|
|
@ -1817,7 +1817,6 @@ def addExternalIface(iface, nativeType=None, headerFile=None,
|
|||
domInterface['notflattened'] = notflattened
|
||||
DOMInterfaces[iface] = domInterface
|
||||
|
||||
addExternalIface('ApplicationCache', nativeType='nsIDOMOfflineResourceList')
|
||||
addExternalIface('Cookie', nativeType='nsICookie2',
|
||||
headerFile='nsICookie2.h', notflattened=True)
|
||||
addExternalIface('HitRegionOptions', nativeType='nsISupports')
|
||||
|
|
|
@ -18,11 +18,12 @@
|
|||
* https://drafts.css-houdini.org/css-paint-api-1/#dom-window-paintworklet
|
||||
*/
|
||||
|
||||
interface ApplicationCache;
|
||||
interface IID;
|
||||
interface nsIBrowserDOMWindow;
|
||||
interface XULControllers;
|
||||
|
||||
typedef OfflineResourceList ApplicationCache;
|
||||
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/
|
||||
[PrimaryGlobal, LegacyUnenumerableNamedProperties, NeedResolve]
|
||||
/*sealed*/ interface Window : EventTarget {
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "nsIDocShell.h"
|
||||
#include "nsIDocumentLoader.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDOMOfflineResourceList.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIURL.h"
|
||||
|
@ -503,11 +502,10 @@ nsOfflineCacheUpdateService::Schedule(nsIURI *aManifestURI,
|
|||
nsresult rv;
|
||||
|
||||
if (aWindow) {
|
||||
// Ensure there is window.applicationCache object that is
|
||||
// responsible for association of the new applicationCache
|
||||
// with the corresponding document. Just ignore the result.
|
||||
nsCOMPtr<nsIDOMOfflineResourceList> appCacheWindowObject =
|
||||
aWindow->GetApplicationCache();
|
||||
// Ensure there is window.applicationCache object that is
|
||||
// responsible for association of the new applicationCache
|
||||
// with the corresponding document. Just ignore the result.
|
||||
aWindow->GetApplicationCache();
|
||||
}
|
||||
|
||||
rv = update->Init(aManifestURI, aDocumentURI, aLoadingPrincipal, aDocument,
|
||||
|
|
Загрузка…
Ссылка в новой задаче