38 static PRLogModuleInfo* gMediacoreError = nsnull;
39 #define TRACE(args) PR_LOG(gMediacoreError, PR_LOG_DEBUG, args)
40 #define LOG(args) PR_LOG(gMediacoreError, PR_LOG_WARN, args)
57 gMediacoreError= PR_NewLogModule(
"sbMediacoreError");
60 TRACE((
"sbMediacoreError[0x%x] - Created",
this));
65 TRACE((
"sbMediacoreError[0x%x] - Destroyed",
this));
69 nsAutoLock::DestroyLock(
mLock);
75 const nsAString &aMessage)
77 TRACE((
"sbMediacoreError[0x%x] - Init",
this));
79 mLock = nsAutoLock::NewLock(
"sbMediacoreError::mLock");
80 NS_ENSURE_TRUE(
mLock, NS_ERROR_OUT_OF_MEMORY);
89 sbMediacoreError::GetCode(PRUint32 *aCode)
91 TRACE((
"sbMediacoreError[0x%x] - GetCode",
this));
93 NS_ENSURE_TRUE(
mLock, NS_ERROR_NOT_INITIALIZED);
94 NS_ENSURE_ARG_POINTER(aCode);
96 nsAutoLock lock(
mLock);
103 sbMediacoreError::GetMessage(nsAString & aMessage)
105 TRACE((
"sbMediacoreError[0x%x] - GetMessage",
this));
107 NS_ENSURE_TRUE(
mLock, NS_ERROR_NOT_INITIALIZED);
109 nsAutoLock lock(
mLock);