This commit is contained in:
hyatt%netscape.com 2000-05-13 23:02:12 +00:00
Родитель f9f60f84de
Коммит b05a016994
4 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -115,8 +115,10 @@ nsBindingManager::SetBinding(nsIContent* aContent, nsIXBLBinding* aBinding )
mBindingTable = new nsSupportsHashtable; mBindingTable = new nsSupportsHashtable;
nsISupportsKey key(aContent); nsISupportsKey key(aContent);
if (aBinding) if (aBinding) {
mBindingTable->Put(&key, aBinding); nsIXBLBinding* oldBinding = NS_STATIC_CAST(nsIXBLBinding*, mBindingTable->Put(&key, aBinding));
NS_IF_RELEASE(oldBinding);
}
else else
mBindingTable->Remove(&key); mBindingTable->Remove(&key);

Просмотреть файл

@ -854,7 +854,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
// destruction of any initial value that might be set. // destruction of any initial value that might be set.
// This means we only have to worry about defining the getter // This means we only have to worry about defining the getter
// or setter. // or setter.
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(), ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
name.Length(), JSVAL_VOID, name.Length(), JSVAL_VOID,
(JSPropertyOp) getFunc, (JSPropertyOp) getFunc,
(JSPropertyOp) setFunc, (JSPropertyOp) setFunc,
@ -887,7 +887,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
if (!undefined) { if (!undefined) {
// Define that value as a property // Define that value as a property
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(), ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
name.Length(), result, name.Length(), result,
nsnull, nsnull, nsnull, nsnull,
attrs); attrs);

Просмотреть файл

@ -115,8 +115,10 @@ nsBindingManager::SetBinding(nsIContent* aContent, nsIXBLBinding* aBinding )
mBindingTable = new nsSupportsHashtable; mBindingTable = new nsSupportsHashtable;
nsISupportsKey key(aContent); nsISupportsKey key(aContent);
if (aBinding) if (aBinding) {
mBindingTable->Put(&key, aBinding); nsIXBLBinding* oldBinding = NS_STATIC_CAST(nsIXBLBinding*, mBindingTable->Put(&key, aBinding));
NS_IF_RELEASE(oldBinding);
}
else else
mBindingTable->Remove(&key); mBindingTable->Remove(&key);

Просмотреть файл

@ -854,7 +854,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
// destruction of any initial value that might be set. // destruction of any initial value that might be set.
// This means we only have to worry about defining the getter // This means we only have to worry about defining the getter
// or setter. // or setter.
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(), ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
name.Length(), JSVAL_VOID, name.Length(), JSVAL_VOID,
(JSPropertyOp) getFunc, (JSPropertyOp) getFunc,
(JSPropertyOp) setFunc, (JSPropertyOp) setFunc,
@ -887,7 +887,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
if (!undefined) { if (!undefined) {
// Define that value as a property // Define that value as a property
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(), ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
name.Length(), result, name.Length(), result,
nsnull, nsnull, nsnull, nsnull,
attrs); attrs);