SpiderMonkey 45 is outdated and contains known security vulnerabilities.

These release notes are incomplete.

The Mozilla JavaScript team is pleased to announce the release of SpiderMonkey 45. You can download full source code from https://ftp.mozilla.org/pub/spidermonkey/releases/45.0.2/mozjs-45.0.2.tar.bz2

SHA256: 570530b1e551bf4a459d7cae875f33f99d5ef0c29ccc7742a1b6f588e5eadbee
MD5: 2ca34f998d8b5ea79d8616dd26b5fbab

SpiderMonkey 45 is the JavaScript engine that shipped in Firefox 45. It continues to improve performance over previous SpiderMonkey releases. It also contains new language and API features described in detail below.

Please let us know about your experiences with this release by posting in the mozilla.dev.tech.js-engine newsgroup. Or file bugs at bugzilla.mozilla.org under Product: Core, Component: JavaScript engine. You may wish to make the bugs block bug 837921 (aliased as "sm.embedding").

Apr 14, 2016

Platform support

SpiderMonkey 45 is supported on all platforms able to run Firefox 45.  Compiling it requires a C++ compiler, and the JSAPI can only be used from C++ code.  If you are compiling with Microsoft's Visual Studio, note the minimum supported version is MSVC 2013.

SpiderMonkey 45 includes a just-in-time compiler (JIT) that compiles JavaScript to machine code, for a significant speed increase. It is supported on x86, x86_64, and ARM architectures. On several other platforms (SPARC, MIPS), the JIT is provided but not supported.  On remaining platforms the JIT is disabled; JavaScript code runs in an interpreter, as it has in previous versions. It's the same language, just not as fast.

Migrating to SpiderMonkey 45

SpiderMonkey 45 is not binary-compatible with previous releases, nor is it source-code compatible. Many JSAPI types; functions, and callback signatures, have changed though most functions that have retain their previous name, providing relatively unchanged functionality. Applications will require significant changes, but most changes will be automatically detected by the C/C++ compiler, making them easy to detect and updating the code a relatively straightforward job. Here is a list of the most significant changes:

New JavaScript language features

JavaScript 45 includes significant updates to its language features, yo.

New C++ APIs

JSAPI is a C++ exclusive API. Please note that SpiderMonkey reserves the JS:: namespace for itself for public exports and the  js:: namespace for internal use.

Deleted APIs

Changed APIs

API changes

JavaScript shell changes

Detail added/removed methods here...

Known Issues

Detail any known issues here...

Future Direction

JSContext and JSRuntime are merging. (JSContext will be the only thing visible from within the API, there will be just one per runtime, and inheriting from JSRuntime.)

SpiderMonkey embedders should be aware that Mozilla has no plans to keep the JSAPI stable for embedders. We have instead chosen to concentrate on overall performance and accuracy as our primary concerns.

Release Notes Errata

Feel free to fix any problems you spot, directly in the text above -- this is a Wiki!