mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 607292 - followup to address comments 16 and 20 from the bug
This commit is contained in:
parent
a9ae1a03f4
commit
238c877cc8
@ -296,7 +296,6 @@ JS_ConvertArgumentsVA(JSContext *cx, uintN argc, jsval *argv, const char *format
|
||||
return JS_FALSE;
|
||||
*va_arg(ap, jsdouble *) = js_DoubleToInteger(d);
|
||||
break;
|
||||
case 's':
|
||||
case 'S':
|
||||
case 'W':
|
||||
str = js_ValueToString(cx, Valueify(*sp));
|
||||
|
@ -556,7 +556,6 @@ JS_GetEmptyStringValue(JSContext *cx);
|
||||
* j int32 Rounded int32 (coordinate)
|
||||
* d jsdouble IEEE double
|
||||
* I jsdouble Integral IEEE double
|
||||
* s char * C string
|
||||
* S JSString * Unicode string, accessed by a JSString pointer
|
||||
* W jschar * Unicode character vector, 0-terminated (W for wide)
|
||||
* o JSObject * Object reference
|
||||
|
@ -1000,7 +1000,12 @@ XPCConvert::JSData2Native(XPCCallContext& ccx, void* d, jsval s,
|
||||
{
|
||||
rs = *((nsACString**)d);
|
||||
}
|
||||
|
||||
rs->SetLength(PRUint32(length));
|
||||
if(rs->Length() != PRUint32(length))
|
||||
{
|
||||
return JS_FALSE;
|
||||
}
|
||||
JS_EncodeStringToBuffer(str, rs->BeginWriting(), length);
|
||||
|
||||
return JS_TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user