Skip to content

Commit c2af345

Browse files
committed
Bug 586789 - Incubator embedding: MozApp & MozView don't care if InitEmbedding() fails. r=mark.finkle
1 parent d4a8935 commit c2af345

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

common/embed.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ static nsCOMPtr<WindowCreator> sWindowCreator;
8686

8787
MozApp::MozApp(const char* aProfilePath)
8888
{
89-
InitEmbedding(aProfilePath);
89+
nsresult rv = InitEmbedding(aProfilePath);
90+
if (NS_FAILED(rv)) {
91+
NS_RUNTIMEABORT("Embedding initialization failed!");
92+
}
9093
}
9194

9295
MozApp::~MozApp()
@@ -263,7 +266,11 @@ WindowCreator::CreateChromeWindow2(nsIWebBrowserChrome *aParent,
263266

264267
MozView::MozView()
265268
{
266-
InitEmbedding();
269+
nsresult rv = InitEmbedding();
270+
if (NS_FAILED(rv)) {
271+
NS_RUNTIMEABORT("Embedding initialization failed!");
272+
}
273+
267274
mPrivate = new Private();
268275

269276
// TODO: should probably deal with WindowCreator in InitEmbedding

0 commit comments

Comments
 (0)