From ca345e9b995323e443c7c341942166f7675cddc4 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 22 May 2013 20:42:37 +0100 Subject: fix version range when teh callback API changed --- javascript/jsapi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'javascript') diff --git a/javascript/jsapi.c b/javascript/jsapi.c index a2bc90fc7..f8e3889e9 100644 --- a/javascript/jsapi.c +++ b/javascript/jsapi.c @@ -138,7 +138,7 @@ static JSBool heartbeat_callback(JSContext *cx) return ret; } -#if JS_VERSION >= 185 +#if JS_VERSION >= 180 struct heartbeat { JSContext *cx; @@ -259,7 +259,7 @@ static JSBool branch_callback(JSContext *cx, JSScript *script) if (priv->branch_count == 0) { priv->branch_count = priv->branch_reset; /* reset branch count */ - ret = heartbeat(cx); + ret = heartbeat_callback(cx); } return ret; } @@ -288,6 +288,8 @@ setup_heartbeat(JSContext *cx, int timeout, jscallback *cb, void *cbctx) JS_SetContextPrivate(cx, priv); JS_SetBranchCallback(cx, branch_callback); + + return true; } static struct heartbeat *enable_heartbeat(JSContext *cx) -- cgit v1.2.3