mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Export js_NaN.
This commit is contained in:
parent
efeb3bebb5
commit
a3eaf36b9e
@ -557,7 +557,7 @@ static JSConstDoubleSpec number_constants[] = {
|
||||
{0,0,0,{0,0,0}}
|
||||
};
|
||||
|
||||
static jsdouble NaN;
|
||||
jsdouble js_NaN;
|
||||
|
||||
#if (defined XP_WIN || defined XP_OS2) && \
|
||||
!defined WINCE && \
|
||||
@ -592,8 +592,8 @@ js_InitRuntimeNumberState(JSContext *cx)
|
||||
|
||||
u.s.hi = JSDOUBLE_HI32_EXPMASK | JSDOUBLE_HI32_MANTMASK;
|
||||
u.s.lo = 0xffffffff;
|
||||
number_constants[NC_NaN].dval = NaN = u.d;
|
||||
rt->jsNaN = js_NewWeaklyRootedDouble(cx, NaN);
|
||||
number_constants[NC_NaN].dval = js_NaN = u.d;
|
||||
rt->jsNaN = js_NewWeaklyRootedDouble(cx, js_NaN);
|
||||
if (!rt->jsNaN)
|
||||
return JS_FALSE;
|
||||
|
||||
|
@ -143,6 +143,8 @@ typedef union jsdpun {
|
||||
#define JSDOUBLE_COMPARE(LVAL, OP, RVAL, IFNAN) ((LVAL) OP (RVAL))
|
||||
#endif
|
||||
|
||||
extern jsdouble js_NaN;
|
||||
|
||||
/* Initialize number constants and runtime state for the first context. */
|
||||
extern JSBool
|
||||
js_InitRuntimeNumberState(JSContext *cx);
|
||||
|
Loading…
Reference in New Issue
Block a user