[freewrl] three args! arg arg arg!

Tom Callaway spot at fedoraproject.org
Fri Feb 1 15:24:51 UTC 2013


commit 1545275dea37ae2af42f7e8e294b8d535c6754c0
Author: Tom Callaway <spot at fedoraproject.org>
Date:   Fri Feb 1 16:27:19 2013 +0100

    three args! arg arg arg!

 freewrl-1.22.13-JS_GetPrototype-three-args.patch |   66 ++++++++++++++++++++++
 freewrl.spec                                     |    6 +-
 2 files changed, 69 insertions(+), 3 deletions(-)
---
diff --git a/freewrl-1.22.13-JS_GetPrototype-three-args.patch b/freewrl-1.22.13-JS_GetPrototype-three-args.patch
new file mode 100644
index 0000000..bf5a360
--- /dev/null
+++ b/freewrl-1.22.13-JS_GetPrototype-three-args.patch
@@ -0,0 +1,66 @@
+diff -upa freewrl-1.22.13/src/lib/world_script/jsVRML_SFClasses.c.jsgp freewrl-1.22.13/src/lib/world_script/jsVRML_SFClasses.c
+--- freewrl-1.22.13/src/lib/world_script/jsVRML_SFClasses.c.jsgp	2013-02-01 16:20:36.343487008 +0100
++++ freewrl-1.22.13/src/lib/world_script/jsVRML_SFClasses.c	2013-02-01 16:26:00.776475411 +0100
+@@ -1905,7 +1905,7 @@ SFRotationInverse(JSContext *cx, uint32_
+ 	printf ("start of SFRotationInverse\n");
+ 	#endif
+ 
+-	if ((_proto = JS_GetPrototype(obj)) == NULL) {
++	if ((JS_GetPrototype(cx, obj, &_proto)) == NULL) {
+ 		printf( "JS_GetPrototype failed in SFRotationInverse.\n");
+ 		return JS_FALSE;
+ 	}
+@@ -1974,7 +1974,7 @@ SFRotationMultiply(JSContext *cx, uint32
+ 	}
+ 	CHECK_CLASS(cx,_multObj,argv,__FUNCTION__,SFRotationClass)
+ 
+-	if ((_proto = JS_GetPrototype(_multObj)) == NULL) {
++	if ((JS_GetPrototype(cx, _multObj, &_proto)) == NULL) {
+ 		printf( "JS_GetPrototype failed in SFRotationMultiply.\n");
+ 		return JS_FALSE;
+ 	}
+@@ -2055,7 +2055,7 @@ SFRotationMultVec(JSContext *cx, uint32_
+ 
+ 	CHECK_CLASS(cx,_multObj,argv,__FUNCTION__,SFVec3fClass)
+ 
+-	if ((_proto = JS_GetPrototype(_multObj)) == NULL) {
++	if ((JS_GetPrototype(cx, _multObj, &_proto)) == NULL) {
+ 		printf( "JS_GetPrototype failed in SFRotationMultVec.\n");
+ 		return JS_FALSE;
+ 	}
+@@ -2198,7 +2198,7 @@ SFRotationSlerp(JSContext *cx, uint32_t
+ 	} else if (APPROX(t, 1)) {
+ 		*rval = OBJECT_TO_JSVAL(_destObj);
+ 	} else {
+-		if ((_proto = JS_GetPrototype(_destObj)) == NULL) {
++		if ((JS_GetPrototype(cx, _destObj, &_proto)) == NULL) {
+ 			printf( "JS_GetPrototype failed in SFRotationSlerp.\n");
+ 			return JS_FALSE;
+ 		}
+@@ -2770,7 +2770,7 @@ JSBool SFVec2fGeneric( JSContext *cx, JS
+ 
+ 	/* set the return object */
+ 	if (retSFVec2f) {
+-		if ((_proto = JS_GetPrototype(obj)) == NULL) {
++		if ((JS_GetPrototype(cx, obj, &_proto)) == NULL) {
+ 			printf( "JS_GetPrototype failed in SFVec2f.\n");
+ 			return JS_FALSE;
+ 		}
+@@ -3331,7 +3331,7 @@ JSBool SFVec3fGeneric( JSContext *cx, JS
+ 		#ifdef JSVRMLCLASSESVERBOSE
+ 		printf ("returning SFVec3f\n");
+ 		#endif
+-		if ((_proto = JS_GetPrototype(obj)) == NULL) {
++		if ((JS_GetPrototype(cx, obj, &_proto)) == NULL) {
+ 			printf( "JS_GetPrototype failed in SFVec3f.\n");
+ 			return JS_FALSE;
+ 		}
+@@ -3983,7 +3983,7 @@ JSBool SFVec3dGeneric( JSContext *cx, JS
+ 		#ifdef JSVRMLCLASSESVERBOSE
+ 		printf ("returning SFVec3d\n");
+ 		#endif
+-		if ((_proto = JS_GetPrototype(obj)) == NULL) {
++		if ((JS_GetPrototype(cx, obj, &_proto)) == NULL) {
+ 			printf( "JS_GetPrototype failed in SFVec3d.\n");
+ 			return JS_FALSE;
+ 		}
diff --git a/freewrl.spec b/freewrl.spec
index eaefae0..4e19113 100644
--- a/freewrl.spec
+++ b/freewrl.spec
@@ -13,9 +13,9 @@ Patch0:		freewrl-1.22.13.1-xul13.patch
 Patch1:		freewrl-1.22.13-noJS_FinalizeStub.patch
 Patch2:		freewrl-1.22.13.1-noMaybeGC.patch
 Patch3:		freewrl-1.22.13-use-JS_NewGlobalObject.patch
-# Sometimes JS_GetPrototype has one arg, sometimes two.
+# Sometimes JS_GetPrototype has one arg, sometimes two, now three.
 # What day is it today?
-Patch4:		freewrl-1.22.1-JS_GetPrototype-two-args.patch
+Patch4:		freewrl-1.22.13-JS_GetPrototype-three-args.patch
 BuildRequires:	zlib-devel, freetype-devel, fontconfig-devel 
 BuildRequires:	imlib2-devel, nspr-devel, xulrunner-devel
 BuildRequires:	expat-devel, libXxf86vm-devel, libX11-devel, libXext-devel
@@ -155,7 +155,7 @@ chrpath --delete %{buildroot}%{_libdir}/libFreeWRLEAI.so.*
 
 %changelog
 * Fri Feb  1 2013 Tom Callaway <spot at fedoraproject.org> - 1.22.13.1-7
-- two args for JS_GetPrototype today
+- three args for JS_GetPrototype today
 
 * Wed Jan  9 2013 Tom Callaway <spot at fedoraproject.org> - 1.22.13.1-6
 - use JS_NewGlobalObject instead of JS_NewCompartmentAndGlobalObject


More information about the scm-commits mailing list