mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 933326 - Part a: Remove xpc_qsStringToJsstring; r=bholley
This commit is contained in:
parent
5ff970779e
commit
dd7127ccd4
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user