mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1019191 part 8. Stop using xpc_qsACString in XPConnect. r=bholley
This commit is contained in:
parent
e093c2bd4b
commit
6b807f9396
@ -1199,12 +1199,10 @@ Base64Encode(JSContext *cx, HandleValue val, MutableHandleValue out)
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(cx);
|
MOZ_ASSERT(cx);
|
||||||
|
|
||||||
JS::RootedValue root(cx, val);
|
nsAutoCString encodedString;
|
||||||
xpc_qsACString encodedString(cx, root, &root, false,
|
if (!ConvertJSValueToByteString(cx, val, false, encodedString)) {
|
||||||
xpc_qsACString::eStringify,
|
|
||||||
xpc_qsACString::eStringify);
|
|
||||||
if (!encodedString.IsValid())
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
nsAutoCString result;
|
nsAutoCString result;
|
||||||
if (NS_FAILED(mozilla::Base64Encode(encodedString, result))) {
|
if (NS_FAILED(mozilla::Base64Encode(encodedString, result))) {
|
||||||
@ -1225,12 +1223,10 @@ Base64Decode(JSContext *cx, HandleValue val, MutableHandleValue out)
|
|||||||
{
|
{
|
||||||
MOZ_ASSERT(cx);
|
MOZ_ASSERT(cx);
|
||||||
|
|
||||||
JS::RootedValue root(cx, val);
|
nsAutoCString encodedString;
|
||||||
xpc_qsACString encodedString(cx, root, &root, false,
|
if (!ConvertJSValueToByteString(cx, val, false, encodedString)) {
|
||||||
xpc_qsACString::eStringify,
|
|
||||||
xpc_qsACString::eStringify);
|
|
||||||
if (!encodedString.IsValid())
|
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
nsAutoCString result;
|
nsAutoCString result;
|
||||||
if (NS_FAILED(mozilla::Base64Decode(encodedString, result))) {
|
if (NS_FAILED(mozilla::Base64Decode(encodedString, result))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user