Bug 1034191 - Make nsDependentJSString users work with Latin1 strings and nursery-allocated strings. r=bz

This commit is contained in:
Jan de Mooij
2014-07-05 17:30:54 +02:00
parent 38e8224746
commit 1d6a780efe
45 changed files with 157 additions and 169 deletions

View File

@@ -254,10 +254,10 @@ JavaScriptShared::toVariant(JSContext *cx, JS::HandleValue from, JSVariant *to)
case JSTYPE_STRING:
{
nsDependentJSString dep;
if (!dep.init(cx, from))
nsAutoJSString autoStr;
if (!autoStr.init(cx, from))
return false;
*to = dep;
*to = autoStr;
return true;
}