зеркало из https://github.com/mozilla/gecko-dev.git
Bug 934817 - Part 2: Remove 0-length check in XPCStringConvert::ReadableToJSVal and XPCConvert::NativeData2JS. r=bz
This commit is contained in:
Родитель
a094223027
Коммит
c0179b2588
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче