зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1302758 Part 3 - Remove nullptr check of operator new in CreateFloatManager. r=dholbert
The operator new is infallable. Also change the return value to void accordingly. The only caller doesn't even check the return value. MozReview-Commit-ID: 3whf7s1d35q --HG-- extra : rebase_source : 6c3a7010f77dad0ee5f50408205fc3a5418dacc9
This commit is contained in:
Родитель
b66ea190f5
Коммит
52503527a3
|
@ -581,7 +581,7 @@ nsAutoFloatManager::~nsAutoFloatManager()
|
|||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
void
|
||||
nsAutoFloatManager::CreateFloatManager(nsPresContext *aPresContext)
|
||||
{
|
||||
// Create a new float manager and install it in the reflow
|
||||
|
@ -589,8 +589,6 @@ nsAutoFloatManager::CreateFloatManager(nsPresContext *aPresContext)
|
|||
// later.
|
||||
mNew = new nsFloatManager(aPresContext->PresShell(),
|
||||
mReflowInput.GetWritingMode());
|
||||
if (! mNew)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (nsBlockFrame::gNoisyFloatManager) {
|
||||
|
@ -602,5 +600,4 @@ nsAutoFloatManager::CreateFloatManager(nsPresContext *aPresContext)
|
|||
// Set the float manager in the existing reflow input.
|
||||
mOld = mReflowInput.mFloatManager;
|
||||
mReflowInput.mFloatManager = mNew;
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -388,7 +388,7 @@ public:
|
|||
* `remember' the old float manager, and install the new float
|
||||
* manager in the reflow input.
|
||||
*/
|
||||
nsresult
|
||||
void
|
||||
CreateFloatManager(nsPresContext *aPresContext);
|
||||
|
||||
protected:
|
||||
|
|
Загрузка…
Ссылка в новой задаче