mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 15:15:23 +00:00
merging backout
This commit is contained in:
commit
39fc6f9e57
3332
js/src/dtoa.c
3332
js/src/dtoa.c
File diff suppressed because it is too large
Load Diff
@ -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))
|
||||
|
2839
js/src/jsdtoa.cpp
2839
js/src/jsdtoa.cpp
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
||||
|
@ -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) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user