-
Notifications
You must be signed in to change notification settings - Fork 156
Migrating to v25
Changes needed to migrate to SpiderMonkey v25 from v23
SpiderMonkey uses static_assert
in some header files. So projects that use SpiderMonkey like JS Bindings needs to update its compiler to a C++11 compiler.
JS_Init()
needs to be called at the very beginning.
JS_SetProperty
and JS_GetProperty
no longer work with jsval
objects. Instead now receives JS::RootedValue
objects.
// Old Way
jsval someJSval = OBJECT_TO_JSVAL(someObject);
JS_SetProperty(cx, object, "cp", &someJSval);
JS_GetProperty(cx, object, "cp", &someJSval);
// New Way
JS::RootedValue someJSval(_cx);
someJSval = OBJECT_TO_JSVAL(someObject);
JS_SetProperty(cx, object, "cp", someJSval);
JS_GetProperty(cx, object, "cp", &someJSval);
// Old Way
JS_NewGlobalObject(cx, &global_class, NULL);
// New Way
JS_NewGlobalObject(cx, &global_class, NULL, JS::DontFireOnNewGlobalHook /* or JS::FireOnNewGlobalHook */);
// Old Way
JS_SetVersion(_cx, JSVERSION_LATEST);
// New Way
JS_SetVersionForCompartment(js::GetContextCompartment(_cx), JSVERSION_LATEST);
Adds build-ios, build-osx, build-android and build-win32 scripts
- Build scripts: https://github.com/ricardoquesada/Spidermonkey/commit/5db23ae289282ba06371e7108a8a4791074c7045
Adds iOS options
-
configure.in, aclocal.m4, ios.m4: https://github.com/ricardoquesada/Spidermonkey/commit/2659a53f386b387bca6e56ba61606fbf3c81bb82
-
configure https://github.com/ricardoquesada/Spidermonkey/commit/4823e237abead7ff83d6af4d29393c814c2131ff
Needed to compile Android
- Android.mk: https://github.com/ricardoquesada/Spidermonkey/commit/047d305ceddc22938dbe446826fc8cbd869c6a31
https://github.com/ricardoquesada/Spidermonkey/commit/0e492ed44a628df4688d642b06244807b159eaec
https://github.com/ricardoquesada/Spidermonkey/commit/729cde6171ad84c7679b28f29ed4d2957e215e2f https://github.com/ricardoquesada/Spidermonkey/commit/33a2f81c7f3ab35cce10435063161b84890b663c
Disables ARM assembly optimizations when using clang
- NumericConversions.h: https://github.com/ricardoquesada/Spidermonkey/commit/b31d6a15d3cc15e504504d6e34f667a6fea75175
Disables "DEBUG" class id in order to have ABI compatibility between DEBUG and RELEASE builds
- jspubtd.h: https://github.com/ricardoquesada/Spidermonkey/commit/0316846baedce757f5c4f54d8930ee24aa1ffdfd
https://github.com/ricardoquesada/Spidermonkey/commit/333f7ffd9674b9c114a0724f97a8567cc7c4eb07
https://github.com/ricardoquesada/Spidermonkey/commit/35f74c893133cd674a425e2ebbd204ee63c64824