mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-11 10:08:41 +00:00
Bug 868782 - Fix rooting hazards in txMozillaXSLTProcessor.cpp; r=till
This commit is contained in:
parent
75c12cc4b0
commit
7e9591c7c7
@ -1438,11 +1438,11 @@ txVariable::Convert(nsIVariant *aValue, txAExprResult** aResult)
|
||||
JSContext* cx = nsContentUtils::GetCurrentJSContext();
|
||||
NS_ENSURE_TRUE(cx, NS_ERROR_NOT_AVAILABLE);
|
||||
|
||||
JSObject *jsobj;
|
||||
rv = holder->GetJSObject(&jsobj);
|
||||
JS::RootedObject jsobj(cx);
|
||||
rv = holder->GetJSObject(jsobj.address());
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
JSString *str = JS_ValueToString(cx, OBJECT_TO_JSVAL(jsobj));
|
||||
JS::RootedString str(cx, JS_ValueToString(cx, OBJECT_TO_JSVAL(jsobj)));
|
||||
NS_ENSURE_TRUE(str, NS_ERROR_FAILURE);
|
||||
|
||||
nsDependentJSString value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user