зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1405353 - stop using nsAutoPtr in nsGlobalWindow; r=mystor
UniquePtr is better.
This commit is contained in:
Родитель
bdb22da472
Коммит
6f44b5bf3e
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче