mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809533, patch 2: Don't null-check inside NS_New*Frame. r=roc
This commit is contained in:
parent
cbecfc83f0
commit
0f4a543158
@ -3659,9 +3659,6 @@ nsresult
|
||||
PresShell::PostReflowCallback(nsIReflowCallback* aCallback)
|
||||
{
|
||||
void* result = AllocateMisc(sizeof(nsCallbackEventRequest));
|
||||
if (MOZ_UNLIKELY(!result)) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCallbackEventRequest* request = (nsCallbackEventRequest*)result;
|
||||
|
||||
request->callback = aCallback;
|
||||
|
@ -260,9 +260,7 @@ nsIFrame*
|
||||
NS_NewBlockFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, uint32_t aFlags)
|
||||
{
|
||||
nsBlockFrame* it = new (aPresShell) nsBlockFrame(aContext);
|
||||
if (it) {
|
||||
it->SetFlags(aFlags);
|
||||
}
|
||||
it->SetFlags(aFlags);
|
||||
return it;
|
||||
}
|
||||
|
||||
|
@ -160,10 +160,7 @@ nsIFrame*
|
||||
NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, uint32_t aStateFlags)
|
||||
{
|
||||
nsColumnSetFrame* it = new (aPresShell) nsColumnSetFrame(aContext);
|
||||
if (it) {
|
||||
it->AddStateBits(aStateFlags | NS_BLOCK_MARGIN_ROOT);
|
||||
}
|
||||
|
||||
it->AddStateBits(aStateFlags | NS_BLOCK_MARGIN_ROOT);
|
||||
return it;
|
||||
}
|
||||
|
||||
|
@ -423,8 +423,6 @@ nsHTMLFramesetFrame::Init(nsIContent* aContent,
|
||||
// XXX the blank frame is using the content of its parent - at some point it
|
||||
// should just have null content, if we support that
|
||||
nsHTMLFramesetBlankFrame* blankFrame = new (shell) nsHTMLFramesetBlankFrame(pseudoStyleContext);
|
||||
if (!blankFrame)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
result = blankFrame->Init(mContent, this, nullptr);
|
||||
if (NS_FAILED(result)) {
|
||||
|
@ -71,9 +71,7 @@ NS_NewLineBox(nsIPresShell* aPresShell, nsLineBox* aFromLine,
|
||||
nsIFrame* aFrame, int32_t aCount)
|
||||
{
|
||||
nsLineBox* newLine = new (aPresShell) nsLineBox(aFrame, aCount, false);
|
||||
if (newLine) {
|
||||
newLine->NoteFramesMovedFrom(aFromLine);
|
||||
}
|
||||
newLine->NoteFramesMovedFrom(aFromLine);
|
||||
return newLine;
|
||||
}
|
||||
|
||||
|
@ -153,10 +153,7 @@ nsIFrame*
|
||||
NS_NewMenuFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
nsMenuFrame* it = new (aPresShell) nsMenuFrame (aPresShell, aContext);
|
||||
|
||||
if (it)
|
||||
it->SetIsMenu(true);
|
||||
|
||||
it->SetIsMenu(true);
|
||||
return it;
|
||||
}
|
||||
|
||||
@ -164,10 +161,7 @@ nsIFrame*
|
||||
NS_NewMenuItemFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
nsMenuFrame* it = new (aPresShell) nsMenuFrame (aPresShell, aContext);
|
||||
|
||||
if (it)
|
||||
it->SetIsMenu(false);
|
||||
|
||||
it->SetIsMenu(false);
|
||||
return it;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user