merging backout

This commit is contained in:
Brian Crowder 2008-07-24 14:07:05 -07:00
commit 39fc6f9e57
5 changed files with 2733 additions and 3459 deletions

File diff suppressed because it is too large Load Diff

View File

@ -741,8 +741,6 @@ JS_NewRuntime(uint32 maxbytes)
JS_INIT_CLIST(&rt->trapList);
JS_INIT_CLIST(&rt->watchPointList);
if (!js_InitDtoa())
goto bad;
if (!js_InitGC(rt, maxbytes))
goto bad;
if (!js_InitAtomState(rt))

File diff suppressed because it is too large Load Diff

View File

@ -123,8 +123,7 @@ JS_dtobasestr(int base, double d);
* Clean up any persistent RAM allocated during the execution of DtoA
* routines, and remove any locks that might have been created.
*/
JS_FRIEND_API(JSBool) js_InitDtoa(void);
JS_FRIEND_API(void) js_FinishDtoa(void);
extern void js_FinishDtoa(void);
JS_END_EXTERN_C

View File

@ -1015,10 +1015,18 @@ js_strtod(JSContext *cx, const jschar *s, const jschar *send,
} else {
int err;
d = JS_strtod(cstr, &estr, &err);
if (d == HUGE_VAL)
d = *cx->runtime->jsPositiveInfinity;
else if (d == -HUGE_VAL)
d = *cx->runtime->jsNegativeInfinity;
if (err == JS_DTOA_ENOMEM) {
JS_ReportOutOfMemory(cx);
if (cstr != cbuf)
JS_free(cx, cstr);
return JS_FALSE;
}
if (err == JS_DTOA_ERANGE) {
if (d == HUGE_VAL)
d = *cx->runtime->jsPositiveInfinity;
else if (d == -HUGE_VAL)
d = *cx->runtime->jsNegativeInfinity;
}
#ifdef HPUX
if (d == 0.0 && negative) {
/*