зеркало из https://github.com/mozilla/gecko-dev.git
Release the correct pointer in implementations of SetOutputErrorBehavior. Bug 295145, patch by Frank Wein <bugzilla@mcsmurf.de>, r=jshin, sr=dbaron
This commit is contained in:
Родитель
303c683415
Коммит
b21942d686
|
@ -53,9 +53,9 @@ nsUnicodeToSunIndic::SetOutputErrorBehavior(PRInt32 aBehavior,
|
||||||
{
|
{
|
||||||
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
NS_IF_RELEASE(aEncoder);
|
NS_IF_RELEASE(mErrEncoder);
|
||||||
mErrEncoder = aEncoder;
|
mErrEncoder = aEncoder;
|
||||||
NS_IF_ADDREF(aEncoder);
|
NS_IF_ADDREF(mErrEncoder);
|
||||||
|
|
||||||
mErrBehavior = aBehavior;
|
mErrBehavior = aBehavior;
|
||||||
mErrChar = aChar;
|
mErrChar = aChar;
|
||||||
|
|
|
@ -148,9 +148,9 @@ nsUnicodeToThaiTTF::SetOutputErrorBehavior(PRInt32 aBehavior,
|
||||||
{
|
{
|
||||||
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
NS_IF_RELEASE(aEncoder);
|
NS_IF_RELEASE(mErrEncoder);
|
||||||
mErrEncoder = aEncoder;
|
mErrEncoder = aEncoder;
|
||||||
NS_IF_ADDREF(aEncoder);
|
NS_IF_ADDREF(mErrEncoder);
|
||||||
|
|
||||||
mErrBehavior = aBehavior;
|
mErrBehavior = aBehavior;
|
||||||
mErrChar = aChar;
|
mErrChar = aChar;
|
||||||
|
|
|
@ -168,9 +168,9 @@ nsUnicodeToJamoTTF::SetOutputErrorBehavior(PRInt32 aBehavior,
|
||||||
{
|
{
|
||||||
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
NS_IF_RELEASE(aEncoder);
|
NS_IF_RELEASE(mErrEncoder);
|
||||||
mErrEncoder = aEncoder;
|
mErrEncoder = aEncoder;
|
||||||
NS_IF_ADDREF(aEncoder);
|
NS_IF_ADDREF(mErrEncoder);
|
||||||
|
|
||||||
mErrBehavior = aBehavior;
|
mErrBehavior = aBehavior;
|
||||||
mErrChar = aChar;
|
mErrChar = aChar;
|
||||||
|
|
|
@ -524,9 +524,9 @@ nsUnicodeToTamilTTF::SetOutputErrorBehavior(PRInt32 aBehavior,
|
||||||
{
|
{
|
||||||
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
NS_IF_RELEASE(aEncoder);
|
NS_IF_RELEASE(mErrEncoder);
|
||||||
mErrEncoder = aEncoder;
|
mErrEncoder = aEncoder;
|
||||||
NS_IF_ADDREF(aEncoder);
|
NS_IF_ADDREF(mErrEncoder);
|
||||||
|
|
||||||
mErrBehavior = aBehavior;
|
mErrBehavior = aBehavior;
|
||||||
mErrChar = aChar;
|
mErrChar = aChar;
|
||||||
|
|
|
@ -571,12 +571,12 @@ NS_IMETHODIMP nsEncoderSupport::SetOutputErrorBehavior(
|
||||||
nsIUnicharEncoder * aEncoder,
|
nsIUnicharEncoder * aEncoder,
|
||||||
PRUnichar aChar)
|
PRUnichar aChar)
|
||||||
{
|
{
|
||||||
if ((aBehavior == kOnError_CallBack) && (aEncoder == NULL))
|
if (aBehavior == kOnError_CallBack && aEncoder == nsnull)
|
||||||
return NS_ERROR_NULL_POINTER;
|
return NS_ERROR_NULL_POINTER;
|
||||||
|
|
||||||
NS_IF_RELEASE(aEncoder);
|
NS_IF_RELEASE(mErrEncoder);
|
||||||
mErrEncoder = aEncoder;
|
mErrEncoder = aEncoder;
|
||||||
NS_IF_ADDREF(aEncoder);
|
NS_IF_ADDREF(mErrEncoder);
|
||||||
|
|
||||||
mErrBehavior = aBehavior;
|
mErrBehavior = aBehavior;
|
||||||
mErrChar = aChar;
|
mErrChar = aChar;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче