Bug 1405353 - stop using nsAutoPtr in nsGlobalWindow; r=mystor

UniquePtr is better.
This commit is contained in:
Nathan Froyd 2017-10-03 15:56:26 -04:00
Родитель bdb22da472
Коммит 6f44b5bf3e
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -9893,7 +9893,7 @@ nsGlobalWindow::CacheXBLPrototypeHandler(nsXBLPrototypeHandler* aKey,
JS::Handle<JSObject*> aHandler)
{
if (!mCachedXBLPrototypeHandlers) {
mCachedXBLPrototypeHandlers = new XBLPrototypeHandlerTable();
mCachedXBLPrototypeHandlers = MakeUnique<XBLPrototypeHandlerTable>();
PreserveWrapper(ToSupports(this));
}
@ -13526,7 +13526,7 @@ nsGlobalWindow::EnableOrientationChangeListener()
if (!nsContentUtils::ShouldResistFingerprinting(mDocShell) &&
!mOrientationChangeObserver) {
mOrientationChangeObserver =
new WindowOrientationObserver(this);
MakeUnique<WindowOrientationObserver>(this);
}
}

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

@ -1982,7 +1982,7 @@ protected:
nsCOMPtr<nsIDOMOfflineResourceList> mApplicationCache;
using XBLPrototypeHandlerTable = nsJSThingHashtable<nsPtrHashKey<nsXBLPrototypeHandler>, JSObject*>;
nsAutoPtr<XBLPrototypeHandlerTable> mCachedXBLPrototypeHandlers;
mozilla::UniquePtr<XBLPrototypeHandlerTable> mCachedXBLPrototypeHandlers;
// mSuspendedDoc is only set on outer windows. It's useful when we get matched
// EnterModalState/LeaveModalState calls, in which case the outer window is
@ -2015,7 +2015,7 @@ protected:
nsTArray<uint32_t> mEnabledSensors;
#if defined(MOZ_WIDGET_ANDROID)
nsAutoPtr<mozilla::dom::WindowOrientationObserver> mOrientationChangeObserver;
mozilla::UniquePtr<mozilla::dom::WindowOrientationObserver> mOrientationChangeObserver;
#endif
#ifdef MOZ_WEBSPEECH