mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 8f50bc05d337 (bug 1034627) for debug build failures
This commit is contained in:
parent
d6d6dd55ba
commit
9d72dd53ad
@ -422,9 +422,15 @@ xpc_qsDOMString::xpc_qsDOMString(JSContext *cx, HandleValue v,
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
nsAutoString *str = new(mBuf) implementation_type();
|
||||
size_t len;
|
||||
const jschar *chars = JS_GetStringCharsZAndLength(cx, s, &len);
|
||||
if (!chars) {
|
||||
mValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
mValid = AssignJSString(cx, *str, s);
|
||||
new(mBuf) implementation_type(chars, len);
|
||||
mValid = true;
|
||||
}
|
||||
|
||||
xpc_qsACString::xpc_qsACString(JSContext *cx, HandleValue v,
|
||||
@ -465,13 +471,14 @@ xpc_qsAUTF8String::xpc_qsAUTF8String(JSContext *cx, HandleValue v, MutableHandle
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
nsAutoJSString str;
|
||||
if (!str.init(cx, s)) {
|
||||
size_t len;
|
||||
const char16_t *chars = JS_GetStringCharsZAndLength(cx, s, &len);
|
||||
if (!chars) {
|
||||
mValid = false;
|
||||
return;
|
||||
}
|
||||
|
||||
new(mBuf) implementation_type(str);
|
||||
new(mBuf) implementation_type(chars, len);
|
||||
mValid = true;
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,7 @@ protected:
|
||||
* the string from garbage collection. The caller must leave the jsval alone
|
||||
* for the lifetime of the xpc_qsDOMString.
|
||||
*/
|
||||
class xpc_qsDOMString : public xpc_qsBasicString<nsAString, nsAutoString>
|
||||
class xpc_qsDOMString : public xpc_qsBasicString<nsAString, nsDependentString>
|
||||
{
|
||||
public:
|
||||
xpc_qsDOMString(JSContext *cx, JS::HandleValue v,
|
||||
|
Loading…
Reference in New Issue
Block a user