-// Copyright 2006 Ben Hutchings <ben@decadentplace.org.uk>.
+// Copyright 2006 Ben Hutchings <ben@decadent.org.uk>.
// See the file "COPYING" for licence details.
+#include <new>
#include <string>
#include <langinfo.h>
#include <nsIUnicodeEncoder.h>
#include "null_prompt_service.hpp"
-#include "webdvd.hpp"
+#include "videolink.hpp"
#include "xpcom_support.hpp"
using xpcom_support::check;
if (!iid.Equals(prompt_service_iid))
return NS_ERROR_NO_INTERFACE;
- try
+ if (null_prompt_service * service =
+ new (std::nothrow) null_prompt_service)
{
- *result = new null_prompt_service;
+ service->AddRef();
+ *result = service;
return NS_OK;
}
- catch (std::bad_alloc &)
+ else
{
return NS_ERROR_OUT_OF_MEMORY;
}