зеркало из https://github.com/mozilla/pjs.git
XBL changes.
This commit is contained in:
Родитель
f9f60f84de
Коммит
b05a016994
|
@ -115,8 +115,10 @@ nsBindingManager::SetBinding(nsIContent* aContent, nsIXBLBinding* aBinding )
|
|||
mBindingTable = new nsSupportsHashtable;
|
||||
|
||||
nsISupportsKey key(aContent);
|
||||
if (aBinding)
|
||||
mBindingTable->Put(&key, aBinding);
|
||||
if (aBinding) {
|
||||
nsIXBLBinding* oldBinding = NS_STATIC_CAST(nsIXBLBinding*, mBindingTable->Put(&key, aBinding));
|
||||
NS_IF_RELEASE(oldBinding);
|
||||
}
|
||||
else
|
||||
mBindingTable->Remove(&key);
|
||||
|
||||
|
|
|
@ -854,7 +854,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
|
|||
// destruction of any initial value that might be set.
|
||||
// This means we only have to worry about defining the getter
|
||||
// or setter.
|
||||
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
name.Length(), JSVAL_VOID,
|
||||
(JSPropertyOp) getFunc,
|
||||
(JSPropertyOp) setFunc,
|
||||
|
@ -887,7 +887,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
|
|||
|
||||
if (!undefined) {
|
||||
// Define that value as a property
|
||||
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
name.Length(), result,
|
||||
nsnull, nsnull,
|
||||
attrs);
|
||||
|
|
|
@ -115,8 +115,10 @@ nsBindingManager::SetBinding(nsIContent* aContent, nsIXBLBinding* aBinding )
|
|||
mBindingTable = new nsSupportsHashtable;
|
||||
|
||||
nsISupportsKey key(aContent);
|
||||
if (aBinding)
|
||||
mBindingTable->Put(&key, aBinding);
|
||||
if (aBinding) {
|
||||
nsIXBLBinding* oldBinding = NS_STATIC_CAST(nsIXBLBinding*, mBindingTable->Put(&key, aBinding));
|
||||
NS_IF_RELEASE(oldBinding);
|
||||
}
|
||||
else
|
||||
mBindingTable->Remove(&key);
|
||||
|
||||
|
|
|
@ -854,7 +854,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
|
|||
// destruction of any initial value that might be set.
|
||||
// This means we only have to worry about defining the getter
|
||||
// or setter.
|
||||
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
name.Length(), JSVAL_VOID,
|
||||
(JSPropertyOp) getFunc,
|
||||
(JSPropertyOp) setFunc,
|
||||
|
@ -887,7 +887,7 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
|
|||
|
||||
if (!undefined) {
|
||||
// Define that value as a property
|
||||
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
name.Length(), result,
|
||||
nsnull, nsnull,
|
||||
attrs);
|
||||
|
|
Загрузка…
Ссылка в новой задаче