diff --git a/content/html/document/src/VideoDocument.cpp b/content/html/document/src/VideoDocument.cpp index 1dd034b0b73a..cb4554579d78 100644 --- a/content/html/document/src/VideoDocument.cpp +++ b/content/html/document/src/VideoDocument.cpp @@ -84,8 +84,6 @@ VideoDocument::StartDocumentLoad(const char* aCommand, NS_ENSURE_SUCCESS(rv, rv); mStreamListener = new MediaDocumentStreamListener(this); - if (!mStreamListener) - return NS_ERROR_OUT_OF_MEMORY; // Create synthetic document rv = CreateSyntheticVideoDocument(aChannel, @@ -158,7 +156,6 @@ nsresult NS_NewVideoDocument(nsIDocument** aResult) { mozilla::dom::VideoDocument* doc = new mozilla::dom::VideoDocument(); - NS_ENSURE_TRUE(doc, NS_ERROR_OUT_OF_MEMORY); NS_ADDREF(doc); nsresult rv = doc->Init();