Bug 933326 - Part a: Remove xpc_qsStringToJsstring; r=bholley

This commit is contained in:
Ms2ger 2013-11-11 08:56:03 +01:00
parent 5ff970779e
commit dd7127ccd4
2 changed files with 0 additions and 26 deletions

View File

@ -823,28 +823,6 @@ NonVoidStringToJsval(JSContext *cx, nsAString &str, MutableHandleValue rval)
} // namespace xpc
bool
xpc_qsStringToJsstring(JSContext *cx, nsString &str, JSString **rval)
{
// From the T_DOMSTRING case in XPCConvert::NativeData2JS.
if (str.IsVoid()) {
*rval = nullptr;
return true;
}
nsStringBuffer* sharedBuffer;
jsval jsstr = XPCStringConvert::ReadableToJSVal(cx, str, &sharedBuffer);
if (JSVAL_IS_NULL(jsstr))
return false;
*rval = JSVAL_TO_STRING(jsstr);
if (sharedBuffer) {
// The string was shared but ReadableToJSVal didn't addref it.
// Move the ownership from str to jsstr.
str.ForgetSharedBuffer();
}
return true;
}
bool
xpc_qsXPCOMObjectToJsval(JSContext *cx, qsObjectHelper &aHelper,
const nsIID *iid, XPCNativeInterface **iface,

View File

@ -362,10 +362,6 @@ bool
xpc_qsJsvalToWcharStr(JSContext *cx, jsval v, JS::MutableHandleValue pval, const PRUnichar **pstr);
/** Convert an nsString to JSString, returning true on success. This will sometimes modify |str| to be empty. */
bool
xpc_qsStringToJsstring(JSContext *cx, nsString &str, JSString **rval);
nsresult
getWrapper(JSContext *cx,
JSObject *obj,