part of bug 109652, "Venkman needs to profile"

sr=brendan, r=peterv, a=shaver
add JS_Now to the jsapi, and JS_GetScriptVersion to jsdbgapi
This commit is contained in:
rginda%netscape.com 2002-02-27 09:17:21 +00:00
Родитель 4239313a01
Коммит 72469311ce
4 изменённых файлов: 23 добавлений и 0 удалений

Просмотреть файл

@ -69,6 +69,7 @@
#include "jsscope.h"
#include "jsscript.h"
#include "jsstr.h"
#include "prmjtime.h"
#if JS_HAS_FILE_OBJECT
#include "jsfile.h"
@ -86,6 +87,12 @@
#define CHECK_REQUEST(cx) ((void)0)
#endif
JS_PUBLIC_API(int64)
JS_Now()
{
return PRMJ_Now();
}
JS_PUBLIC_API(jsval)
JS_GetNaNValue(JSContext *cx)
{

Просмотреть файл

@ -140,6 +140,13 @@ JS_BEGIN_EXTERN_C
#define JSVAL_FALSE BOOLEAN_TO_JSVAL(JS_FALSE)
#define JSVAL_TRUE BOOLEAN_TO_JSVAL(JS_TRUE)
/*
* Microseconds since the epoch, midnight, January 1, 1970 UTC. See the
* comment in jstypes.h regarding safe int64 usage.
*/
extern JS_PUBLIC_API(int64)
JS_Now();
/* Don't want to export data, so provide accessors for non-inline jsvals. */
extern JS_PUBLIC_API(jsval)
JS_GetNaNValue(JSContext *cx);

Просмотреть файл

@ -714,6 +714,12 @@ JS_GetScriptLineExtent(JSContext *cx, JSScript *script)
return js_GetScriptLineExtent(script);
}
JS_PUBLIC_API(JSVersion)
JS_GetScriptVersion(JSContext *cx, JSScript *script)
{
return script->version;
}
/***************************************************************************/
JS_PUBLIC_API(void)

Просмотреть файл

@ -190,6 +190,9 @@ JS_GetScriptBaseLineNumber(JSContext *cx, JSScript *script);
extern JS_PUBLIC_API(uintN)
JS_GetScriptLineExtent(JSContext *cx, JSScript *script);
extern JS_PUBLIC_API(JSVersion)
JS_GetScriptVersion(JSContext *cx, JSScript *script);
/************************************************************************/
/*