Bug 1776895 - [1/6] Cleanup: use UniquePtr rather than manual allocation r=cmartin

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D153407
This commit is contained in:
Ray Kraesig
2022-08-17 18:51:30 +00:00
parent 7a7215b7a6
commit edd52e5ee9
2 changed files with 2 additions and 5 deletions

View File

@@ -141,7 +141,6 @@ nsBaseWidget::nsBaseWidget(nsBorderStyle aBorderStyle)
mCompositorVsyncDispatcher(nullptr),
mBorderStyle(aBorderStyle),
mBounds(0, 0, 0, 0),
mOriginalBounds(nullptr),
mIsTiled(false),
mPopupLevel(ePopupLevelTop),
mPopupType(ePopupTypeAny),
@@ -403,8 +402,6 @@ nsBaseWidget::~nsBaseWidget() {
gNumWidgets--;
printf("WIDGETS- = %d\n", gNumWidgets);
#endif
delete mOriginalBounds;
}
//-------------------------------------------------------------------------
@@ -723,7 +720,7 @@ void nsBaseWidget::InfallibleMakeFullScreen(bool aFullScreen) {
if (aFullScreen) {
if (!mOriginalBounds) {
mOriginalBounds = new LayoutDeviceIntRect();
mOriginalBounds = mozilla::MakeUnique<LayoutDeviceIntRect>();
}
*mOriginalBounds = GetScreenBounds();