From ce0fe06349753b2ad1cfa7b0b1cfcaa77c4e47ab Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 19 May 2013 23:48:55 +0100 Subject: create javascript heartbeat and hook a script timeout to it --- javascript/jsapi.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'javascript/jsapi.h') diff --git a/javascript/jsapi.h b/javascript/jsapi.h index e38188ab4..8f9affd02 100644 --- a/javascript/jsapi.h +++ b/javascript/jsapi.h @@ -23,12 +23,21 @@ #ifndef _NETSURF_JAVASCRIPT_JSAPI_H_ #define _NETSURF_JAVASCRIPT_JSAPI_H_ +/* include teh correct header */ #ifdef WITH_MOZJS #include "js/jsapi.h" #else #include "mozjs/jsapi.h" #endif +/* logging macros */ +#define JSLOG(args...) LOG((args)) +#ifdef ENABLE_VERBOSE_JS_DEBUG +#define JSDBG(args...) LOG((args)) +#else +#define JSDBG(args...) +#endif + #if JS_VERSION < 180 /************************** Spidermonkey 1.7.0 **************************/ @@ -375,11 +384,6 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx, #endif -#define JSLOG(args...) LOG((args)) -#ifdef ENABLE_VERBOSE_JS_DEBUG -#define JSDBG(args...) LOG((args)) -#else -#define JSDBG(args...) -#endif +/************************** **************************/ #endif -- cgit v1.2.3