X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=null_prompt_service.cpp;h=901c5880ce7ebc6affc9a90c65f6a8ab17133cee;hb=5746a18015788678b85907421f91adf249ea71d3;hp=dca78103dbdb020e6cdaca48b2142e18b1395849;hpb=91d1e3608e3bb97adcd7bb9259f8771c22becd0f;p=videolink.git diff --git a/null_prompt_service.cpp b/null_prompt_service.cpp index dca7810..901c588 100644 --- a/null_prompt_service.cpp +++ b/null_prompt_service.cpp @@ -1,6 +1,7 @@ -// Copyright 2006 Ben Hutchings . +// Copyright 2006 Ben Hutchings . // See the file "COPYING" for licence details. +#include #include #include @@ -13,7 +14,7 @@ #include #include "null_prompt_service.hpp" -#include "webdvd.hpp" +#include "videolink.hpp" #include "xpcom_support.hpp" using xpcom_support::check; @@ -36,18 +37,20 @@ namespace 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; } } - NS_IMETHODIMP null_prompt_service_factory::LockFactory(PRBool lock) + NS_IMETHODIMP null_prompt_service_factory::LockFactory(PRBool /*lock*/) { return NS_ERROR_NOT_IMPLEMENTED; }