Bug 934817 - Part 2: Remove 0-length check in XPCStringConvert::ReadableToJSVal and XPCConvert::NativeData2JS. r=bz

This commit is contained in:
Michael Shuen 2014-02-14 11:15:42 -05:00
parent a094223027
commit c0179b2588
2 changed files with 0 additions and 9 deletions

View File

@ -291,11 +291,6 @@ XPCConvert::NativeData2JS(MutableHandleValue d, const void* s,
if (!cString || cString->IsVoid())
break;
if (cString->IsEmpty()) {
d.set(JS_GetEmptyStringValue(cx));
break;
}
// c-strings (binary blobs) are deliberately not converted from
// UTF-8 to UTF-16. T_UTF8Sting is for UTF-8 encoded strings
// with automatic conversion.

View File

@ -78,10 +78,6 @@ XPCStringConvert::ReadableToJSVal(JSContext *cx,
*sharedBuffer = nullptr;
uint32_t length = readable.Length();
if (length == 0) {
vp.set(JS_GetEmptyStringValue(cx));
return true;
}
if (readable.IsLiteral()) {
JSString *str = JS_NewExternalString(cx,