[mw-devel] MW3 r1129 - trunk/src
welshbyte at sucs.org
welshbyte at sucs.org
Fri Dec 11 00:10:29 GMT 2009
Author: welshbyte
Date: 2009-12-11 00:10:29 +0000 (Fri, 11 Dec 2009)
New Revision: 1129
Modified:
trunk/src/js.c
Log:
Cope with another spidermonkey API change between libmozjs-dev 1.9.0 (lenny) and 1.9.1 (squeeze)
Modified: trunk/src/js.c
===================================================================
--- trunk/src/js.c 2009-12-10 15:54:55 UTC (rev 1128)
+++ trunk/src/js.c 2009-12-11 00:10:29 UTC (rev 1129)
@@ -1262,8 +1262,13 @@
/* create a callback function that is run when javascript branches backwards */
/* allows us to interupt looping scripts */
+#ifdef JS_OPERATION_WEIGHT_BASE
+ /* libmozjs-dev 1.9.0.15 */
JS_SetOperationCallback(jscx, js_operation_callback, 100 * JS_OPERATION_WEIGHT_BASE);
-
+#else
+ /* libmozjs-dev 1.9.1.5 */
+ JS_SetOperationCallback(jscx, js_operation_callback);
+#endif
/* initiate local stuff */
JS_DefineFunction(jscx, jsroot, "print", js_print, 1, JSPROP_READONLY|JSPROP_PERMANENT);
More information about the mw-devel
mailing list