[mw-devel] MW3 r1261 - branches/wheezy/src

psycodom at sucs.org psycodom at sucs.org
Fri Sep 7 21:19:48 BST 2012


Author: psycodom
Date: 2012-09-07 21:19:48 +0100 (Fri, 07 Sep 2012)
New Revision: 1261

Modified:
   branches/wheezy/src/js.c
Log:
Should run on wheezy now although with the stability of the js engine just hacking this about each time is not the way to go



Modified: branches/wheezy/src/js.c
===================================================================
--- branches/wheezy/src/js.c	2012-09-07 12:58:47 UTC (rev 1260)
+++ branches/wheezy/src/js.c	2012-09-07 20:19:48 UTC (rev 1261)
@@ -58,7 +58,7 @@
 #define K_BROADCAST 1
 
 JSClass globclass = {
-	"milliways", JSCLASS_HAS_PRIVATE,
+	"milliways", JSCLASS_GLOBAL_FLAGS,
 	JS_PropertyStub,JS_PropertyStub,JS_PropertyStub,JS_StrictPropertyStub,
 	JS_EnumerateStub,JS_ResolveStub,JS_ConvertStub,JS_FinalizeStub,
 	JSCLASS_NO_OPTIONAL_MEMBERS
@@ -1256,10 +1256,14 @@
 		return -1;
 	}
 	/* register an error handler */
+	JS_SetOptions(jscx, JSOPTION_VAROBJFIX | JSOPTION_JIT | JSOPTION_METHODJIT);
+	JS_SetVersion(jscx, JSVERSION_LATEST);
 	JS_SetErrorReporter(jscx, js_error_handler);
 
-	/* create the root object */
-	jsroot = JS_NewGlobalObject(jscx, &globclass);
+	//printf("JSVER: %s\n", JS_GetImplementationVersion());
+	
+	/* create the root object */	
+	jsroot = JS_NewCompartmentAndGlobalObject(jscx, &globclass, NULL); // This is the wheezy way but is already obsolete in the latest spidermonkey!
 
 	/* initiate builtin classes */
 	JS_InitStandardClasses(jscx, jsroot);




More information about the mw-devel mailing list