Skip to content

Commit

Permalink
Backed out changeset 79c0748ff2ac.
Browse files Browse the repository at this point in the history
Assertion failure: !JSDOUBLE_IS_INT(d, i) || !INT_FITS_IN_JSVAL(i), at /builds/moz2_slave/mozilla-central-macosx-debug/build/js/src/jsapi.cpp:1839
  • Loading branch information
Jason Orendorff committed Jun 24, 2008
1 parent 4f34d4b commit 0a6388d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 1 addition & 10 deletions js/src/jsapi.cpp
Expand Up @@ -345,7 +345,7 @@ JS_PushArgumentsVA(JSContext *cx, void **markp, const char *format, va_list ap)
break;
case 'd':
case 'I':
if (!JS_NewNumberValue(cx, va_arg(ap, jsdouble), sp))
if (!JS_NewDoubleValue(cx, va_arg(ap, jsdouble), sp))
goto bad;
break;
case 's':
Expand Down Expand Up @@ -1831,25 +1831,16 @@ JS_strdup(JSContext *cx, const char *s)
JS_PUBLIC_API(jsdouble *)
JS_NewDouble(JSContext *cx, jsdouble d)
{
#ifdef DEBUG
jsint i;
#endif

CHECK_REQUEST(cx);
JS_ASSERT(!JSDOUBLE_IS_INT(d, i) || !INT_FITS_IN_JSVAL(i));
return js_NewWeaklyRootedDouble(cx, d);
}

JS_PUBLIC_API(JSBool)
JS_NewDoubleValue(JSContext *cx, jsdouble d, jsval *rval)
{
#ifdef DEBUG
jsint i;
#endif
jsdouble *dp;

CHECK_REQUEST(cx);
JS_ASSERT(!JSDOUBLE_IS_INT(d, i) || !INT_FITS_IN_JSVAL(i));
dp = js_NewWeaklyRootedDouble(cx, d);
if (!dp)
return JS_FALSE;
Expand Down
2 changes: 0 additions & 2 deletions js/src/jsapi.h
Expand Up @@ -699,11 +699,9 @@ JS_free(JSContext *cx, void *p);
extern JS_PUBLIC_API(char *)
JS_strdup(JSContext *cx, const char *s);

/* Deprecated -- use JS_NewNumberValue instead. */
extern JS_PUBLIC_API(jsdouble *)
JS_NewDouble(JSContext *cx, jsdouble d);

/* Deprecated -- use JS_NewNumberValue instead. */
extern JS_PUBLIC_API(JSBool)
JS_NewDoubleValue(JSContext *cx, jsdouble d, jsval *rval);

Expand Down

0 comments on commit 0a6388d

Please sign in to comment.