mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Pass the address of the jsval instead of the value (which was null). This helps allow you to access xp-connect
objects from xbl. r=hyatt
This commit is contained in:
parent
1da98657a9
commit
128eb0578f
@ -829,17 +829,17 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
|
||||
|
||||
if (!answer.IsEmpty()) {
|
||||
// Evaluate our script and obtain a value.
|
||||
jsval* result = nsnull;
|
||||
jsval result = nsnull;
|
||||
PRBool undefined;
|
||||
rv = context->EvaluateStringWithValue(answer,
|
||||
mScriptObject,
|
||||
nsnull, nsnull, 0, nsnull,
|
||||
(void*)result, &undefined);
|
||||
(void*) &result, &undefined);
|
||||
|
||||
if (!undefined) {
|
||||
// Define that value as a property
|
||||
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
name.Length(), *result,
|
||||
name.Length(), result,
|
||||
nsnull, nsnull,
|
||||
attrs);
|
||||
}
|
||||
|
@ -829,17 +829,17 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
|
||||
|
||||
if (!answer.IsEmpty()) {
|
||||
// Evaluate our script and obtain a value.
|
||||
jsval* result = nsnull;
|
||||
jsval result = nsnull;
|
||||
PRBool undefined;
|
||||
rv = context->EvaluateStringWithValue(answer,
|
||||
mScriptObject,
|
||||
nsnull, nsnull, 0, nsnull,
|
||||
(void*)result, &undefined);
|
||||
(void*) &result, &undefined);
|
||||
|
||||
if (!undefined) {
|
||||
// Define that value as a property
|
||||
rv = ::JS_DefineUCProperty(cx, (JSObject*)mScriptObject, name.GetUnicode(),
|
||||
name.Length(), *result,
|
||||
name.Length(), result,
|
||||
nsnull, nsnull,
|
||||
attrs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user