[mw-devel] MW3 r1125 - trunk/src

psycodom at sucs.org psycodom at sucs.org
Thu Dec 10 15:02:04 GMT 2009


Author: psycodom
Date: 2009-12-10 15:02:04 +0000 (Thu, 10 Dec 2009)
New Revision: 1125

Modified:
   trunk/src/js.c
Log:
Updates to use JS_SetOperationCallback instead of the deprecated JS_SetBranchCallback



Modified: trunk/src/js.c
===================================================================
--- trunk/src/js.c	2009-12-10 14:46:00 UTC (rev 1124)
+++ trunk/src/js.c	2009-12-10 15:02:04 UTC (rev 1125)
@@ -1183,7 +1183,7 @@
 	return 0;
 }
 
-JSBool js_branch_callback(JSContext *cx, JSScript *script) {
+JSBool js_operation_callback(JSContext *cx) {
 	JSObject *global = JS_GetGlobalObject(cx);
 	if (global) {
 		if (js_interrupted==1) {
@@ -1262,7 +1262,7 @@
 	
 	/* create a callback function that is run when javascript branches backwards */
 	/* allows us to interupt looping scripts */
-	JS_SetBranchCallback(jscx, js_branch_callback);
+	JS_SetOperationCallback(jscx, js_operation_callback, 100 * JS_OPERATION_WEIGHT_BASE);
 	
 	/* initiate local stuff */
 




More information about the mw-devel mailing list