-
Notifications
You must be signed in to change notification settings - Fork 156
Migrating to v25
Changes needed to migrate to SpiderMonkey v25 from v23
JS_Init()
needs to be called at the very beginning.
JS_SetProperty
no longer works with jsval
objects. Instead now receives JS::RootedValue
objects.
// Old Way
jsval someJSval = OBJECT_TO_JSVAL(someObject);
JS_SetProperty(cx, object, "cp", &someJSval);
// New Way
JS::RootedValue someJSval(_cx);
someJSval = OBJECT_TO_JSVAL(someObject);
JS_SetProperty(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/0b50c307fdf16ea2e9588ca01fe51c152acaa77a
Adds iOS options
-
configure.in, aclocal.m4, ios.m4: https://github.com/ricardoquesada/Spidermonkey/commit/efb51d712edd721a07bb9d36a83837659849fe83
-
configure https://github.com/ricardoquesada/Spidermonkey/commit/b413890073ae520c5104966d444f3367596e992c
Needed to compile Android
- Android.mk: https://github.com/ricardoquesada/Spidermonkey/commit/047d305ceddc22938dbe446826fc8cbd869c6a31
Disables JIT on debug.
- Logging.h
// old
#if defined(DEBUG) && !defined(JS_METHODJIT_SPEW)
#define JS_METHODJIT_SPEW
#endif
// new
#ifdef JS_METHODJIT_SPEW
Disables ARM assembly optimizations when using clang
- NumericConversions.h: https://github.com/ricardoquesada/Spidermonkey/commit/efb51d712edd721a07bb9d36a83837659849fe83
Disables "DEBUG" class id in order to have ABI compatibility between DEBUG and RELEASE builds
- jspubtd.h: https://github.com/ricardoquesada/Spidermonkey/commit/efb51d712edd721a07bb9d36a83837659849fe83
Empty implementation of AsmJSMachExceptionHandler for iOS
- AsmJS.h: https://github.com/ricardoquesada/Spidermonkey/commit/b3585af3650f22600e2b89a23136a7105b2496c9
The icu library will is too large to be included in spidermonkey. For instance, on win32, the size of the dynamic library 'mozjs.dll' will grow to 12M while 3M in v22. https://github.com/ricardoquesada/Spidermonkey/commit/5b9356315a9bffbf3faa4a5e87664b6e0909c6ff