Bug 857102 part 2 - Make NS_NewTextNode and nsIDocument::CreateTextNode infallible; r=bz
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "mozilla/Selection.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsTextNode.h"
|
||||
|
||||
#define DEFAULT_COLUMN_WIDTH 20
|
||||
|
||||
@@ -1324,10 +1325,8 @@ nsTextControlFrame::UpdateValueDisplay(bool aNotify,
|
||||
nsIContent *textContent = rootNode->GetChildAt(0);
|
||||
if (!textContent) {
|
||||
// Set up a textnode with our value
|
||||
nsCOMPtr<nsIContent> textNode;
|
||||
nsresult rv = NS_NewTextNode(getter_AddRefs(textNode),
|
||||
mContent->NodeInfo()->NodeInfoManager());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsRefPtr<nsTextNode> textNode =
|
||||
new nsTextNode(mContent->NodeInfo()->NodeInfoManager());
|
||||
|
||||
NS_ASSERTION(textNode, "Must have textcontent!\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user