зеркало из https://github.com/mozilla/pjs.git
Cast away const when freeing JSClass names.
This commit is contained in:
Родитель
8f81f8e74b
Коммит
ecc00cac9a
|
@ -1283,7 +1283,7 @@ nsXBLBinding::InitClass(const nsCString& aClassName, nsIScriptContext* aContext,
|
|||
(nsXBLService::gClassTable)->Remove(&oldKey);
|
||||
|
||||
// Change the class name and we're done.
|
||||
nsMemory::Free(c->name);
|
||||
nsMemory::Free((void*) c->name);
|
||||
c->name = nsXPIDLCString::Copy(aClassName);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ private:
|
|||
|
||||
public:
|
||||
nsXBLJSClass(const nsCString& aClassName);
|
||||
~nsXBLJSClass() { nsMemory::Free(name); }
|
||||
~nsXBLJSClass() { nsMemory::Free((void*) name); }
|
||||
|
||||
nsrefcnt Hold() { return ++mRefCnt; }
|
||||
nsrefcnt Drop() { return --mRefCnt ? mRefCnt : Destroy(); }
|
||||
|
|
|
@ -1283,7 +1283,7 @@ nsXBLBinding::InitClass(const nsCString& aClassName, nsIScriptContext* aContext,
|
|||
(nsXBLService::gClassTable)->Remove(&oldKey);
|
||||
|
||||
// Change the class name and we're done.
|
||||
nsMemory::Free(c->name);
|
||||
nsMemory::Free((void*) c->name);
|
||||
c->name = nsXPIDLCString::Copy(aClassName);
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ private:
|
|||
|
||||
public:
|
||||
nsXBLJSClass(const nsCString& aClassName);
|
||||
~nsXBLJSClass() { nsMemory::Free(name); }
|
||||
~nsXBLJSClass() { nsMemory::Free((void*) name); }
|
||||
|
||||
nsrefcnt Hold() { return ++mRefCnt; }
|
||||
nsrefcnt Drop() { return --mRefCnt ? mRefCnt : Destroy(); }
|
||||
|
|
Загрузка…
Ссылка в новой задаче