Search completed in 1.15 seconds.
438 results for "SpiderMonkey":
Your results are loading. Please wait...
SpiderMonkey Build Documentation
building spidermonkey obsolete: the canonical documentation now lives at: https://firefox-source-docs.mozilla.org/js/build.html.
... use these instructions to build the latest spidermonkey source code.
... and of course, you'll need to get the spidermonkey source code.
...And 28 more matches
SpiderMonkey 1.8.5
the latest version of spidermonkey can always be found on the source download page.
... the mozilla javascript team is pleased to announce the release of spidermonkey 1.8.5.
... spidermonkey 1.8.5 is the javascript engine that shipped in firefox 4.0.
...And 26 more matches
SpiderMonkey 1.8.7
xxx needs updating the mozilla javascript team is pleased to announce the release of spidermonkey 1.8.5.
... spidermonkey 1.8.5 is the javascript engine that shipped in firefox 4.0.
... it is much faster than spidermonkey 1.8, implements es-5 (ecma 262, 5th edition), and contains many new language and api features, described in detail below.
...And 24 more matches
SpiderMonkey 1.8
the mozilla javascript team is pleased to announce the release of spidermonkey 1.8 release candidate 1.
... spidermonkey 1.8 is the javascript engine that shipped in firefox 3.0.
... it is much faster than spidermonkey 1.7 and contains a few new language features and api features, described in detail below.
...And 16 more matches
SpiderMonkey 31
the mozilla javascript team is pleased to announce the release of spidermonkey 31.
... spidermonkey 31 is the javascript engine that shipped in firefox 31.
... it continues to improve performance over previous spidermonkey releases, with a significantly improved garbage collector and other features.
...And 15 more matches
SpiderMonkey Internals
design walk-through at heart, spidermonkey is a fast interpreter that runs an untyped bytecode and operates on values of type js::value—type-tagged values that represent the full range of javascript values.
... in addition to the interpreter, spidermonkey contains a just-in-time (jit) compiler, a garbage collector, code implementing the basic behavior of javascript values, a standard library implementing ecma 262-5.1 §15 with various extensions, and a few public apis.
... interpreter like many portable interpreters, spidermonkey's interpreter is mainly a single, tremendously long function that steps through the bytecode one instruction at a time, using a switch statement (or faster alternative, depending on the compiler) to jump to the appropriate chunk of code for the current instruction.
...And 12 more matches
SpiderMonkey: The Mozilla JavaScript runtime
spidermonkey is mozilla's javascript engine written in c and c++.
... guides building spidermonkey build documentation how to get spidermonkey source code, build it, and run the test suite.
... using spidermonkey introduction to the javascript shell documentation of the command-line javascript shell, js.
...And 12 more matches
SpiderMonkey 24
these release notes are an incomplete draft and were initially seeded from the spidermonkey 17 release notes, so they're not necessarily complete or fully accurate.
... the mozilla javascript team is pleased to announce the release of spidermonkey 24.
... you can download full source code here: https://ftp.mozilla.org/pub/mozilla.org/js/mozjs-24.2.0.tar.bz2 (sha1: ce779081cc11bd0c871c6f303fc4a0091cf4fe66) spidermonkey 24 is the javascript engine that shipped in firefox 24.
...And 11 more matches
SpiderMonkey 38
spidermonkey 38 is outdated and contains known security vulnerabilities.
... the mozilla javascript team is pleased to announce the release of spidermonkey 38.
... spidermonkey 38 is the javascript engine that shipped in firefox 38.
...And 10 more matches
SpiderMonkey 1.8.8
these release notes are an incomplete draft and were initially seeded from the 1.8.5 release notes, so lots of the information here isn't actually new to spidermonkey 1.8.8 (nor is it even the case that the version number will be 1.8.8!).
... the mozilla javascript team is pleased to announce the release of spidermonkey 1.8.8.
... spidermonkey 1.8.8 is the javascript engine that shipped in firefox 10.0.
...And 8 more matches
SpiderMonkey 17
these release notes are an incomplete draft and were initially seeded from the (now-defunct) 1.8.8 release notes, which were themselves seeded from the 1.8.5 release notes, so lots of the information here isn't actually new to spidermonkey 17.
... the mozilla javascript team is pleased to announce the release of spidermonkey 17.
... spidermonkey 17 is the javascript engine that shipped in firefox 17.
...And 8 more matches
Getting SpiderMonkey source code
you can get the spidermonkey source code in gzipped form or directly from the mercurial repository.
... downloading gzipped spidermonkey source code you can download gzipped spidermonkey source code from the following urls: http://ftp.mozilla.org/pub/spidermonkey/releases/ http://ftp.mozilla.org/pub/spidermonkey/prereleases/ here is a command-line example of downloading and unzipping spidermonkey source code version 59.0: mkdir mozilla cd mozilla wget http://ftp.mozilla.org/pub/spidermonkey/prereleases/59/pre1/mozjs-59.0a1.0.tar.bz2 tar xvf mozjs-59.0a1.0.tar.bz2 these commands should work on most platforms including windows, as long as on windows you are using the mozillabuild bash shell.
... getting the latest spidermonkey source code from mercurial the mercurial repository at https://hg.mozilla.org/mozilla-central/ hosts the latest spidermonkey sources.
...And 6 more matches
SpiderMonkey 45
spidermonkey 45 is outdated and contains known security vulnerabilities.
... 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.
...And 6 more matches
SpiderMonkey compartments
a compartment is a new concept with spidermonkey 1.8.5.
... in previous versions of spidermonkey, the garbage collector would walk the entire heap of all javascript objects when garbage collection was needed.
... compartment example the firefox browser embeds spidermonkey.
...And 3 more matches
GCIntegration - SpiderMonkey Redirect 1
the spidermonkey garbage collector (gc) will be changing a lot in the future.
...spidermonkey uses a simple barrier commonly called a "snapshot at the beginning" barrier.
...spidermonkey implements the write barrier internally.
...And 3 more matches
Setting up CDT to work on SpiderMonkey
there is a guide for setting up cdt to work with the mozilla codebase, but it does not cover setting things up for just spidermonkey instead of the whole mozilla codebase.
... step 1 - preparing a spidermonkey build for cdt to index all code, spidermonkey has to be built with debug information.
... give the project a name that you like ("spidermonkey" has a nice ring to it) and use the "browser…" button to select your checkout's js/src folder for the "existing code location".
...And 3 more matches
SpiderMonkey Internals: Thread Safety
this page describes implementation details of the spidermonkey javascript engine.
... it is mainly of interest to people working on spidermonkey itself.
... see js_threadsafe for a gentler introduction to using spidermonkey in a multi-threaded application.
...And 2 more matches
Rebranding SpiderMonkey (1.8.5)
after installing the build pre-requisites and downloading the spidermonkey source tarball issue the following commands at the terminal: cd js/src autoconf-2.13 for the remainder of this document wherever you see the text $brand you will substitute that text with the name of your brand.
... for example the default brand for spidermonkey 1.8.5 is 'mozjs185'.
... mkdir build-$brand-release cd build-$brand-release configure this build of spidermonkey with the desired options.
...you may now perform the build and installation of your custom branded spidermonkey library: make note: depending on your system you may need administrative rights to perform the installation: make install the following information isn't technically needed for using your library but it will help other applications use your library.
SpiderMonkey 52
the mozilla javascript team is pleased to announce the release of spidermonkey 52.
... spidermonkey 52 is the javascript engine that shipped in firefox 52.
... it continues to improve performance over previous spidermonkey releases.
... platform support migrating to spidermonkey 52 new javascript language features new c++ apis deleted apis api changes known issues ...
SpiderMonkey releases
this page lists spidermonkey release notes.
... note: standalone spidermonkey is not an official product.
... past releases spidermonkey 52 spidermonkey 45 spidermonkey 38 spidermonkey 31 spidermonkey 24 spidermonkey 17 spidermonkey 1.8.8 spidermonkey 1.8.7 spidermonkey 1.8.5 spidermonkey 1.8 ...
SpiderMonkey coding conventions - Archive of obsolete content
use the spidermonkey c++ coding style page on wikimo which is more up to date and the canonical source.
... the spidermonkey project owners enforce coding conventions pretty strictly during code reviews.
Archived SpiderMonkey docs - Archive of obsolete content
this section contains old spidermonkey documentation.
...between resolving conflicts, finding a good time to land, watching the tree, and marking bugs as fixed, it takes around half a day.spidermonkey coding conventionsthe spidermonkey project owners enforce coding conventions pretty strictly during code reviews.
Building SpiderMonkey with UBSan
use the script to compile spidermonkey.
... this enables all the cheap undefined behavior checks other than: alignment, which hits known bugs in spidermonkey, and is more implementation-defined (slow on x86 / crash on arm) than undefined behavior float-cast-overflow, which hits known bugs in spidermonkey, and isn't exploited by today's compilers float-divide-by-zero, which jesse doesn't think is actually undefined behavior (aside from the question of whether cpu overflow flags are set) vptr, a check that requires rtti, which is disabled by default in spidermonkey 4.
Self-hosted builtins in SpiderMonkey
since firefox 17, spidermonkey has the ability to self-host built-in functions in javascript.
... the selfhostingdefines.h header contains adding self-hosted functions to host objects first, the code has to be embedded into spidermonkey.
Profiling SpiderMonkey
costs of thread safety currently, threadsafe spidermonkey costs us 10-15% on some benchmarks vs.
...if you're looking to investigate that, build a standalone copy of spidermonkey and compare it with xpcshell.
Index
found 550 pages: # page tags and summary 1 spidermonkey: the mozilla javascript runtime spidermonkey standalone source code releases can be found on the releases page.
... 2 creating javascript tests automated testing, build documentation, guide, qa, spidermonkey in which test suite does your new test belong?
... 4 foss guide, spidermonkey feel free to add your own spidermonkey-based open source projects (and if necessary add categories)!
...And 542 more matches
JSAPI reference
the jsapi is the c++ api for the spidermonkey javascript engine.
... note: the foss wiki page contains a few links to other libraries and programs that can make life easier when using spidermonkey and the jsapi.
... a note on versioning: up until the release of firefox 4, spidermonkey, and thus the jsapi, was versioned in an ad-hoc way, with releases happening at times that roughly, but not really, corresponded to firefox releases.
...And 54 more matches
JSAPI User Guide
this document explains how to embed spidermonkey, the mozilla javascript engine, in your c++ program.
...these programs can execute javascript code from c++ using the spidermonkey api.
... note: the foss wiki page contains a few links to other libraries and programs that can make life easier when using spidermonkey and jsapi.
...And 27 more matches
Parser API
recent builds of the standalone spidermonkey shell include a reflection of the spidermonkey parser, made available as a javascript api.
... note: this page describes spidermonkey-specific behavior and might be incomplete.
... visit estree spec for a community ast standard that includes latest ecmascript features and is backward-compatible with spidermonkey format.
...And 20 more matches
How to embed the JavaScript engine
a bare bones tutorial hello world sample embedding application the following code is a very simple application that shows how to embed spidermonkey and run a simple javascript script.
... the code differs for each spidermonkey version, please choose right version for your spidermonkey.
... spidermonkey 24 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
...And 17 more matches
Tracing JIT
the tracing jit in spidermonkey consists of a generic, low level component called nanojit which is co-maintained between adobe and mozilla, and a spidermonkey-specific high level component called jstracer.
... the nanojit component is language agnostic, and contains no knowledge about spidermonkey or any other part of the mozilla codebase.
...the monitor watches the executing spidermonkey interpreter.
...And 14 more matches
Debugger.Memory - Firefox Developer Tools
debugger.memory handler functions similar to debugger’s handler functions, debugger.memory inherits accessor properties that store handler functions for spidermonkey to call when given events occur in debuggee code.
...because spidermonkey’s collector is incremental, a full collection cycle may consist of multiple discrete collection slices with the js mutator running interleaved.
...mponent_utils” “mem_pressure” “cc_waiting” “cc_forced” “load_end” “page_hide” “nsjscontext_destroy” “set_new_document” “set_doc_shell” “dom_utils” “dom_ipc” “dom_worker” “inter_slice_gc” “refresh_frame” “full_gc_timer” “shutdown_cc” “user_inactive” nonincrementalreason if spidermonkey’s collector determined it could not incrementally collect garbage, and had to do a full gc all at once, this is a short string describing the reason it determined the full gc was necessary.
...And 12 more matches
List of Mozilla-Based Applications - Archive of obsolete content
abstract accounting tool adobe acrobat and adobe reader portable document format (pdf) software uses mozilla spidermonkey adobe flash player popular browser plug-in uses nss in linux version adwatch content management system uses xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map amarok xul remote remote control for amarok music player ample sdk javascript gui-framework ...
...ss through device conkeror keyboard-oriented browser convertigo enterprise mashup server server tool for transactional web scraping and for web clipping cometbird another firefox mod modified version of firefox correo email couac (fr) web-based email and jabber app couchdb document-oriented database uses spidermonkey courtanet benefit (fr) underwriting software for french insurance brokers crosscheck browserless testing framework uses mozilla rhino crowbar server tool cycloctopus screen scraping console cyclone3 content management system danger mobile platform uses gecko on the server side -- no longer active?
...eh clock clock frizione javascript development, testing and deployment environment uses mozilla rhino geckofx embeddable gecko gjs javascript bindings for gnome globalmojo browser that raises money for your favorite causes gluescript a javascript engine which can be used as a general purpose language uses mozilla spidermonkey and formerly called wxjavascript gnome operating system gnome 3 will use spidermonkey through gjs google adwords editor editor google gadgets for linux google’s desktop widget engine uses xulrunner according to the build instructions grani grain sizing assessment tool according to this wiki page grani is based on xul and xpcom daim ...
...And 11 more matches
JSClass
syntax struct jsclass { const char *name; uint32_t flags; /* optional since spidermonkey 37 */ jspropertyop addproperty; jsdeletepropertyop delproperty; jspropertyop getproperty; jsstrictpropertyop setproperty; jsenumerateop enumerate; jsresolveop resolve; jsconvertop convert; /* obsolete since spidermonkey 44 */ /* optional since spidermonkey 25 */ jsfinalizeop finalize; /* optional */ jsclassinternal reserved0; /* obsolete since spidermonkey 13 */ jsc...
...heckaccessop checkaccess; /* obsolete since spidermonkey 29 */ jsnative call; jshasinstanceop hasinstance; jsnative construct; jsxdrobjectop xdrobject; /* obsolete since spidermonkey 13 */ jstraceop trace; /* added in spidermonkey 17 */ jsclassinternal reserved1; /* obsolete since spidermonkey 13 */ void *reserved[n]; /* sizeof 'reserved' depends on version */ }; name type description name const char * class name flags uint32_t class flags.
... use null or js_propertystub (spidermonkey 31 or older) for default behavior.
...And 11 more matches
Garbage collection
design overview spidermonkey has a mark-sweep garbage collection (gc) with incremental marking mode, generational collection, and compaction.
... compartments are a fundamental cross-cutting concept in spidermonkey (see also compartments), though anything related to memory is now more concerned with zones, especially gc.
...mark bits are allocated based on the minimum cell size, thus an object comprised of larger cells consumes multiple bits in the bitmap (but only uses two of them.) exact stack rooting api note: the information here is about the implementation of gc roots and their use within spidermonkey.
...And 10 more matches
Exact Stack Rooting
this guide is intended for spidermonkey hackers!
... users of the spidermonkey api will want to read the gc rooting guide instead.
... introduction this guide explains the basics of interacting with the gc from spidermonkey.
...And 9 more matches
JS::PersistentRooted
this article covers features introduced in spidermonkey 31 a copyable, assignable global gc root type with arbitrary lifetime, an infallible constructor, and automatic unrooting on destruction.
... syntax js::persistentrooted<t> var; // added in spidermonkey 38 js::persistentrooted<t> var(cx); js::persistentrooted<t> var(cx, initial); js::persistentrooted<t> var(rt); js::persistentrooted<t> var(rt, initial); name type description cx jscontext * the context to get the runtime in which to add the root rt jsruntime * the runtime in which to add the root.
...added in spidermonkey 38 void init(jscontext* cx, t initial) void init(jsruntime* rt) void init(jsruntime* rt, t initial) void reset() reset the value to initial value of the type.
...And 9 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
there are currently two main javascript engines used server-side and both are from the minds at mozilla: mozilla rhino and mozilla spidermonkey.
...spidermonkey on the other hand is the javascript engine (written in c) in the highly popular mozilla firefox browser.
... spidermonkey is what will evolve to become tracemonkey.
...And 8 more matches
Property attributes
spidermonkey additionally defines several non-standard property attributes.
... mxr id search for jsprop_permanent jsprop_propop_accessors passed to js_define(uc)property* and js_defineelement if getters/setters are jspropertyop/jsstrictpropertyop added in spidermonkey 38.
...added in spidermonkey 38 mxr id search for jsprop_define_late jsfun_stub_gsops use js_propertystub getter/setter instead of defaulting to class gsops for property holding function.
...And 8 more matches
Debugger - Firefox Developer Tools
uncaughtexceptionhook either null or a function that spidermonkey calls when a call to a debug event handler, breakpoint handler, or similar function throws some exception, which we refer to asdebugger-exception here.
... exceptions thrown in the debugger are not propagated to debuggee code; instead, spidermonkey calls this function, passingdebugger-exception as its sole argument and the debugger instance as the this value.
... if the uncaught exception hook itself throws an exception,uncaught-hook-exception, spidermonkey throws a new error object,confess-to-debuggee-exception, to the debuggee whose message blames the debugger, and includes textual descriptions ofuncaught-hook-exception and the originaldebugger-exception.
...And 7 more matches
Split object
in spidermonkey, a split object is made up of two jsobjects: an inner object and an outer object.
...programs other than mozilla that embed spidermonkey should avoid using split objects.
...spidermonkey walks up the scope chain to the nearest object that has jsprincipals attached.
...And 6 more matches
Debugger.Frame - Firefox Developer Tools
for a given debugger instance, spidermonkey creates only one debugger.frame instance for a given visible frame.
...even though the debuggee and debugger share the same javascript stack, frames pushed for spidermonkey’s calls to handler methods to report events in the debuggee are never considered visible frames.) invocation functions and “debugger” frames aninvocation function is any function in this interface that allows the debugger to invoke code in the debuggee: debugger.object.prototype.call, debugger.frame.prototype.eval, and so on.
... handler methods of debugger.frame instances each debugger.frame instance inherits accessor properties holding handler functions for spidermonkey to call when given events occur in the frame.
...And 6 more matches
Debugger.Object - Firefox Developer Tools
spidermonkey creates exactly one debugger.object instance for each debuggee object it presents to a given debugger instance: if the debugger encounters the same object through two different routes (perhaps two functions are called on the same object), spidermonkey presents the same debugger.object instance to the debugger each time.
... while most debugger.object instances are created by spidermonkey in the process of exposing debuggee's behavior and state to the debugger, the debugger can use debugger.object.prototype.makedebuggeevalue to create debugger.object instances for given debuggee objects, or use debugger.object.prototype.copy and debugger.object.prototype.create to create new objects in debuggee compartments, allocated as if by particular debuggee globals.
... if a function has no name, spidermonkey attempts to infer an appropriate name for it given its context.
...And 6 more matches
Index - Archive of obsolete content
358 archived spidermonkey docs archive this section contains old spidermonkey documentation.
... 359 file object file, javascript, non-standard, spidermonkey non-standard server-side object 360 open opens the file, specifying file mode and type.
... 362 spidermonkey coding conventions javascript, spidermonkey the spidermonkey project owners enforce coding conventions pretty strictly during code reviews.
...And 5 more matches
Hacking Tips
this page list a few tips to help you investigate issues related to spidermonkey.
... all tips listed here are dealing with the javascript shell obtained at the end of the build documentation of spidermonkey.
... since spidermonkey 48, we have a gdb unwinder.
...And 5 more matches
Introduction to the JavaScript shell
the javascript shell (js) is a command-line program included in the spidermonkey source distribution.
... to get the spidermonkey javascript shell, see the spidermonkey build documentation or download a compiled binary for your platform from the nightly builds.
... note: starting with spidermonkey 44 (firefox 44 / thunderbird 44 / seamonkey 2.41), the standard, web-compatible javascript version is used by default (and not js1.7+ anymore).
...And 5 more matches
JS_SetOptions
this is only meaningful if spidermonkey is built with xpconnect.
... mxr id search for jsoption_xml jsoption_allow_xml added in spidermonkey 15 if this is off, e4x syntax isn't supported no matter what version number is set.
... mxr id search for jsoption_allow_xml jsoption_moar_xml added in spidermonkey 15 ecmascript for xml (e4x) support: parse <!-- --> as a token, not backward compatible with the comment-hiding hack used in html script tags.
...And 5 more matches
FOSS
feel free to add your own spidermonkey-based open source projects (and if necessary add categories)!
... wrappers / bindings c++ cocos2d-js - cocos2d-js is a cross-platform game engine which embeds spidermonkey, providing the same api for both web and native platforms.
... flusspferd - (newer) c++ bindings libjspp - c++ template based library for extending & embedding spidermonkey; works with spidermonkey 1.8.5 and above, has lots of goodies spiderape - the oldest c++ bindings for spidermonkey trixul - (trixul cvs) - trixul xml-based gui toolkit embeds spidermonkey, using javascript to implement logic behind its gui, supporting calls from javascript to c++ objects rust mozjs - rust bindings used by servo gnome gjs - javascript bindings to gnome (broadly, to any library using the gobject introspection mechanism) objective caml http://alain.frisch.fr/soft.html#spider - bindings to embed spidermonkey in ocaml applications perl http://jspl.msg.mx/ - bindings to cross-embed spidermonkey and perl.
...And 3 more matches
GC Rooting Guide
introduction this guide explains the basics of interacting with spidermonkey's gc as a spidermonkey api user.
... since spidermonkey has a moving gc, it is very important that it knows about each and every pointer to a gc thing in the system.
... spidermonkey's rooting api tries to make this task as simple as possible.
...And 3 more matches
JS::Value
js::value is subject to garbage collection a js::value can refer to a string or object located in spidermonkey's garbage-collected heap.
...the solution is to tell spidermonkey that you're using the object, then tell it again when you're done.
...in some places, spidermonkey provides already-rooted js::values which you can use for variables.
...And 3 more matches
JSClass.flags
this is only meaningful if spidermonkey is built with xpconnect and the jsclass_has_private flag is also set.
... mxr id search for jsclass_private_is_nsisupports jsclass_is_domjsclass added in spidermonkey 17 objects are dom.
... mxr id search for jsclass_is_domjsclass jsclass_emulates_undefined added in spidermonkey 24 causes objects which have this class to emulate undefined in certain circumstances.
...And 3 more matches
JSObjectOps.dropProperty
this documentation should be considered spidermonkey internals documentation, not api documentation.
... as a spidermonkey implementation detail, what is actually locked here (under the native implementation of jsobjectops) is not the property but some collection of objects including the object on which the property is defined.
... a single, built-in jsobjectops implementation is used for most spidermonkey objects that are exposed to scripts.
...And 3 more matches
JS_FS
// added in spidermonkey 38 #define js_fninfo(name,call,info,nargs,flags) ...
... // added in spidermonkey 17 #define js_self_hosted_fn(name,selfhostedname,nargs,flags) ...
... // added in spidermonkey 31 #define js_self_hosted_sym_fn(symbol, selfhostedname, nargs, flags) ...
...And 3 more matches
Shell global objects
these are the global objects that are set up automatically by the spidermonkey js command-line interpreter when you start the program.
... this page lists variables and functions available on spidermonkey 53.
... notes: spidermonkey may assert if the returned code isn't close enough to the script's real code, so this function is not fuzzer-safe.
...And 3 more matches
Debugger.Script - Firefox Developer Tools
for a given debugger instance, spidermonkey constructs exactly one debugger.script instance for each underlying script object; debugger code can add its own properties to a script object and expect to find them later, use == to decide whether two expressions refer to the same script, and so on.
... note that spidermonkey may use the same debugger.script instances for equivalent functions or evaluated code—that is, scripts representing the same source code, at the same position in the same source file, evaluated in the same lexical environment.
...spidermonkey constructs exactly one debugger.script for each underlying webassembly module per debugger instance.
...And 3 more matches
Future directions
this article documents future directions in functionality, design, and coding practices for spidermonkey.
... parallelism most machines that run spidermonkey have multiple cores, so parallelism is almost certainly part of our future.
... the api the spidermonkey api is c++.
...And 2 more matches
JSNewEnumerateOp
this callback overrides a portion of spidermonkey's default [[enumerate]] internal method.
... syntax typedef bool (* jsnewenumerateop)(jscontext *cx, js::handleobject obj, js::autoidvector &properties); // added in spidermonkeysidebar 38 typedef bool (* jsnewenumerateop)(jscontext *cx, js::handleobject obj, jsiterateop enum_op, js::mutablehandlevalue statep, js::mutablehandleid idp); // obsolete since jsapi 37 name type description cx jscontext * the context in which the enumeration is taking place.
... description from spidermonkey 38, jsnewenumerateop is the type of objectops::enumerate.
...And 2 more matches
Debugger.Object - Firefox Developer Tools
spidermonkey creates exactly one debugger.object instance for each debuggee object it presents to a given debugger instance: if the debugger encounters the same object through two different routes (perhaps two functions are called on the same object), spidermonkey presents the same debugger.object instance to the debugger each time.
... while most debugger.object instances are created by spidermonkey in the process of exposing debuggee’s behavior and state to the debugger, the debugger can use debugger.object.prototype.makedebuggeevalue to create debugger.object instances for given debuggee objects, or use debugger.object.prototype.copy and debugger.object.prototype.create to create new objects in debuggee compartments, allocated as if by particular debuggee globals.
... if a function has no name, spidermonkey attempts to infer an appropriate name for it given its context.
...And 2 more matches
Nanojit - Archive of obsolete content
both the tamarin jit and the spidermonkey jit (a.k.a.
... example the following code works with spidermonkey's hacked version of nanojit.
... figuring out how to compile it is left as an exercise for the reader; the following works when run in the object directory of an --enable-debug spidermonkey shell: g++ -ddebug -g3 -wno-invalid-offsetof -fno-rtti -include js-confdefs.h -i dist/include/ -i..
... -i ../nanojit -o jittest ../jittest.cpp libjs_static.a note: remove the -ddebug if you have not compiled spidermonkey with --enable-debug, and use whatever you called the sample source file in place of jittest.cpp.
2006-12-01 - Archive of obsolete content
server side spidermonkey juicescript is an open source version of a server side javascript.
...http://www.juicescript.org/ discussions deleting objects in spidermonkey a user asks if there's a method of manually deleting an object in spidermonkey before garbage collector deletes it.
... peter wilson's reply was to add a method that does the deleting with a native implementation that releases the resources held by the object as seen in this database interface: var mydbase = new pgsqlconnection; mydbase.connect("database"); mydbase.exec("select * from mytable where ..."); // use the result data - (native implementation function) mydbase.close() spidermonkey for server side inquiry about why javascript hasn't caught on for general server-side scripting.
... peter wilson lists some important comparisons between spidermonkey and php.
JS-Engine FAQ - Archive of obsolete content
spidermonkey how long are private pointers?
...check the jsval macros at the top of js/src/jsapi.h can an embedded spidermonkey js engine use domparser extension of mozilla?
... spidermonkey library loading mechanism?
... to write wrappers in pure javascript to interface with any c library on the system there are mechanisms such as xpcshell, wxjs, jsdb, jsni coding spidermonkey in c check out this tutorial how to compile tamarin on linux/x86 there is a patch that allows you to compile it.
Creating JavaScript jstest reftests
this directory contains tests of spidermonkey conformance to ecmascript as well as spidermonkey non-standard extenstions to ecmascript.
... non262 tests the directory js/src/tests/non262/ should contain all tests of the following type: regressions of spidermonkey non-standard spidermonkey extensions to the javascript language test of "implementation-defined" details of the ecmascript standard for example, the exact definition of pi or some details of array sorting.
... performance tests or stress tests tests of spidermonkey's comformance to the ecmascript standard a brief history: in 2017, spidermonkey started comsuming test262, a comprehensive tests suite for ecmascript implementations.
... before using test262, spidermonkey had a fair number of internal tests of conformance to ecmascript, and many of those tests remain in the js/src/non262 directory as regressions.
JSNative
full documentation of how to define a jsnative (or a jsfastnative, the equivalent typedef which preceded it) is available in the api header "js/callargs.h" added in spidermonkey 24.
... this header is new, but the semantics it describes are applicable to all recent spidermonkey releases.
... the behavior of a jsnative is implemented using a js::callargs structure added in spidermonkey 17.
... (this structure is now provided in "js/callargs.h" added in spidermonkey 24 as well as through "jsapi.h".) this structure encapsulates access to the callee function, this, the function call's arguments, and the eventual return value.
JSProtoKey
this article covers features introduced in spidermonkey 24 possible standard object prototype types.
...proto_uint8clampedarray jsproto_proxy proxy mxr search for jsproto_proxy jsproto_weakmap weakmap mxr search for jsproto_weakmap jsproto_map map mxr search for jsproto_map jsproto_set set mxr search for jsproto_set jsproto_dataview dataview mxr search for jsproto_dataview jsproto_symbol symbol added in spidermonkey 38 mxr search for jsproto_symbol jsproto_sharedarraybuffer sharedarraybuffer (nightly only) mxr search for jsproto_sharedarraybuffer jsproto_intl intl mxr search for jsproto_intl jsproto_typedobject typedobject (nightly only) mxr search for jsproto_typedobject jsproto_generatorfunction generatorfunction added in spidermonkey 31 ...
... mxr search for jsproto_generatorfunction jsproto_simd simd (nightly only) mxr search for jsproto_simd jsproto_weakset weakset added in spidermonkey 38 mxr search for jsproto_weakset jsproto_sharedint8array sharedint8array (nightly only) mxr search for jsproto_sharedint8array jsproto_shareduint8array shareduint8array (nightly only) mxr search for jsproto_shareduint8array jsproto_sharedint16array sharedint16array (nightly only) mxr search for jsproto_sharedint16array jsproto_shareduint16array shareduint16array (nightly only) mxr search for jsproto_shareduint16array jsproto_sharedint32array sharedint32array (nightly only) mxr search for jsproto_sharedint32array jsproto_share...
...at32array sharedfloat32array (nightly only) mxr search for jsproto_sharedfloat32array jsproto_sharedfloat64array sharedfloat64array (nightly only) mxr search for jsproto_sharedfloat64array jsproto_shareduint8clampedarray shareduint8clampedarray (nightly only) mxr search for jsproto_shareduint8clampedarray jsproto_typedarray typedarray added in spidermonkey 38 mxr search for jsproto_typedarray jsproto_atomics atomics (nightly only) mxr search for jsproto_atomics description each of these types corresponds to standard objects in javascript.
JS_AlreadyHasOwnProperty
this article covers features introduced in spidermonkey 1.8 determine whether a property is already physically present on a jsobject.
...ownproperty(jscontext *cx, js::handleobject obj, const char *name, bool *foundp); boo js_alreadyhasownucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *foundp); boo js_alreadyhasownpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 boo js_alreadyhasownelement(jscontext *cx, js::handleobject obj, uint32_t index, bool *foundp); name type description cx jscontext * pointer to a js context.
...for native objects—objects whose properties are stored in the default data structure provided by spidermonkey—these functions simply check that data structure to see if the specified field is present.
...(such properties are an implementation detail of spidermonkey.
JS_CStringsAreUTF8
these functions have been removed in spidermonkey 19.
... syntax jsbool js_cstringsareutf8(void); void js_setcstringsareutf8(void); // added in spidermonkey 1.8 description by default, all c/c++ strings passed into the jsapi are treated as iso/iec 8859-1, also known as iso-latin-1.
...however, spidermonkey can optionally interpret these strings as utf-8.
... there are two ways to enable this: at compile time, by building spidermonkey with js_c_strings_are_utf8 defined; or at run time, by calling js_setcstringsareutf8 before the first call to js_newruntime.
JS_SetNativeStackQuota
this article covers features introduced in spidermonkey 17 enable or disable checks to avoid overflowing the c stack.
...added in spidermonkey 31 untrustedscriptstacksize size_t the desired stack quota setting, in bytes for untrusted script.
...added in spidermonkey 31 description js_setnativestackquota sets the size of the native stack that should not be exceeded.
... spidermonkey allows for a distinction between system code (such as gcs, which may incidentally be triggered by script but are not strictly performed on behalf of such script), trusted script (as determined by js_settrustedprincipals), and untrusted script.
JS_THREADSAFE
the recommended technique in spidermonkey 1.8 and later is to periodically call js_yieldrequest from an operation callback.
... sharing native functions and private data among threads in a js_threadsafe build, spidermonkey's internal data structures that represent javascript values are single-thread-only.
... however, spidermonkey does not protect the application's data structures.
... further info note: spidermonkey internals: thread safety is mostly obsolete.
Waterfall - Firefox Developer Tools
garbage collection red markers in the waterfall represent garbage collection (gc) events, in which spidermonkey (the javascript engine in firefox) walks the heap looking for memory that's no longer reachable and subsequently releasing it.
... to help reduce the length of pauses, spidermonkey implements incremental gc: this means that it can perform garbage collection in fairly small increments, letting the program run in between.
...spidermonkey uses a complex set of heuristics to determine when gc is needed, and when non-incremental gc in particular is needed.
... in general, though: gc is needed when a lot of memory is being allocated non-incremental gc is usually needed when the memory allocation rate is high enough that spidermonkey may run out of memory during incremental gc when the waterfall records a gc marker it indicates: whether the gc was incremental or not the reason the gc was performed if the gc was non-incremental, the reason it was non-incremental starting in firefox 46, if the gc event was caused by allocation pressure, a link appears, labeled "show allocation triggers".
About JavaScript - JavaScript
this engine, code named spidermonkey, is implemented in c/c++.
...like spidermonkey, rhino is ecma-262 edition 5 compliant.
... several major runtime optimizations such as tracemonkey (firefox 3.5), jägermonkey (firefox 4) and ionmonkey were added to the spidermonkey javascript engine over time.
... javascript resources spidermonkey information specific to mozilla's implementation of javascript in c/c++ engine (aka spidermonkey), including how to embed it in applications.
Installing Dehydra - Archive of obsolete content
spidermonkey provides scripting capabilities for dehydra.
... building spidermonkey it is recommended that you use spidermonkey revision aurora_base_20110705 when building dehydra.
...mkdir gcc-objdir mkdir gcc-dist cd gcc-objdir ../gcc-4.5.3/configure --disable-bootstrap --enable-languages=c,c++ --prefix=$pwd/../gcc-dist make make install building dehydra and treehydra building dehydra requires spidermonkey development headers from the previous step.
File object - Archive of obsolete content
warning: this section describes the file component of the spidermonkey javascript interpreter.
... getting started in order to use the file object from your javascript programs, you must enable it by setting the make variable js_has_file_object during the compilation of your spidermonkey engine.
... if you are building a standalone version of spidermonkey (see: spidermonkey build documentation), this variable can be added on the make command line, like so: cd mozilla/js/src make -f makefile.ref js_has_file_object=1 alternatively, if you are building a larger product (such as a browser) and want to include the file object, you may need to perform minor makefile surgery.
2006-11-17 - Archive of obsolete content
special characters inquiry of how to use special characters in spidermonkey.
... recycle array objects a user trying to overcome the need of using huge number of arrays (as vectors) asks if its possible to reuse unreferenced array objects instead of create new ones in spidermonkey.
... mike shaver's response was that resurrecting objects is not possible and that objects in spidermonkey are not reference counted.
Server-Side JavaScript - Archive of obsolete content
today with computing cycles having increased more than 10-fold and mozilla's work on rhino (javascript interpreter in java) and spidermonkey (javascript interpreter in c) and javascript itself, we have very solid foundations for javascript to be extraordinarily useful and applicable on the server-side again -- with performance in the same range as popular server-side environments like php and ruby on rails.
...server-side javascript is another way in which, as this article quotes eich, "mozilla wants to 'get people thinking about javascript as a more general-purpose language' and show them that 'it really is a platform for writing full applications.'" many vendors today are embedding mozilla rhino or mozilla spidermonkey into web server environments.
... some, like aptana with the open source jaxer server actually embed the entire mozilla firefox browser engine (including spidermonkey) within a web server to enable server-side ajax and server-side dom access in addition to server-side execution of javascript.
Installing JSHydra
prerequisites for building spidermonkey spidermonkey is part of the build process, but since jshydra will get the code if required, you do not need to worry about obtaining the right version of spidermonkey.
... building jshydra jshydra requires, as part of its build process, spidermonkey.
... by default, the configure script will obtain a known working copy of spidermonkey; it is possible via the --moz-src and --moz-obj configure arguments to tell jshydra to use existing copies of the source and build.
Creating JavaScript tests
there are two large spidermonkey test suites: jstests (in js/src/tests) and jit-tests (in js/src/jit-test).
...instead, ask a spidermonkey peer how to proceed.
...ask a spidermonkey peer for details.
INT_TO_JSVAL
please use js::int32value instead in spidermonkey 45 or later.
... before spidermonkey 1.8.5, not all integers can be stored in a jsval; use int_fits_in_jsval to test.
... starting in spidermonkey 1.8.5, jsval can store a full 32-bit integer, so this check isn't needed any longer for 32-bit integers.") }} if i does not fit into a jsval (see int_fits_in_jsval), the behavior is undefined.
JS::CallArgs
this article covers features introduced in spidermonkey 17 helper class encapsulating access to the callee, this value, arguments, and argument count for a function call.
...(if you're compiling against a debug build of spidermonkey, these methods will assert to aid debugging.) if the method you're implementing succeeds by returning true, you *must* set this.
... (spidermonkey doesn't currently assert this, but it will do so eventually.) you don't need to use or change this if your method fails.
JS::Evaluate
this article covers features introduced in spidermonkey 17 compile and execute a script.
... syntax // added in spidermonkey 45 bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::autoobjectvector &scopechain, const readonlycompileoptions &opti...
...ons, const char16_t *chars, size_t length, js::mutablehandlevalue rval); // added in spidermonkey 17 bool js::evaluate(jscontext *cx, js::autoobjectvector &scopechain, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); // obsolete since jsapi 39 bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::readonlycom...
JS::SetLargeAllocationFailureCallback
this article covers features introduced in spidermonkey 31 specify a new callback function for large memory allocation failure.
...added in spidermonkey 38 callback syntax typedef void (* js::largeallocationfailurecallback)(void *data); name type description data void * data parameter passed to js::setlargeallocationfailurecallback.
... added in spidermonkey 38 description if a large allocation fails when calling pod_{calloc,realloc}cangc, the js engine may call the large-allocation- failure callback, if set, to allow the embedding to flush caches, possibly perform shrinking gcs, etc.
JS::SetOutOfMemoryCallback
this article covers features introduced in spidermonkey 31 specify a new callback function for out of memory error.
...added in spidermonkey 38 callback syntax typedef void (* outofmemorycallback)(jscontext *cx, void *data); name type description data void * data parameter passed to js::setoutofmemorycallback.
... added in spidermonkey 38 description unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
JSExtendedClass
syntax struct jsextendedclass { jsclass base; jsequalityop equality; jsobjectop outerobject; jsobjectop innerobject; jsiteratorop iteratorobject;// added in spidermonkey 1.8 jsobjectop wrappedobject; // added in spidermonkey 1.8 ...and additional reserved fields.
... iteratorobject jsiteratorop added in spidermonkey 1.8 optional.
... wrappedobject jsobjectop added in spidermonkey 1.8 optional.
JSFastNative
this article covers features introduced in spidermonkey 1.8 jsfastnative is the type of fast native functions in the jsapi.
... added in spidermonkey 1.8.1 jsfastnative has been renamed to jsnative.
...it also means that applications that use spidermonkey's security features, particularly those that implement jscheckaccessop or jscheckaccessidop in terms of apis such as js_frameiterator and js_stackframeprincipals, must take extra care, as the native function's principals will be missing from the stack.
JSMarkOp
jsmarkop is the type of the jsclass.mark callback in spidermonkey 1.7 and earlier.
... in spidermonkey 1.8, jsmarkop will be deprecated.
... all new code using spidermonkey 1.8 or later should use a jstraceop instead to ensure that the tracing apis work properly.
JSPropertyOp
syntax typedef bool (* jspropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); typedef bool (* jsstrictpropertyop)(jscontext *cx, js::handleobject obj, js::handleid id, bool strict, js::mutablehandlevalue vp); // added in spidermonkey 1.9.3 name type description cx jscontext * the context in which the property access is taking place.
... as of spidermonkey 1.7, the value of a property assignment expression, like (a.length = x), is the value of *vp after the setter is called.
...this incompatibility will be fixed in spidermonkey 1.8; see bug 312354.
JS_AddFinalizeCallback
this article covers features introduced in spidermonkey 17 add/remove callback function for finalization.
... syntax bool js_addfinalizecallback(jsruntime *rt, jsfinalizecallback cb, void *data); // added in spidermonkey 38 (jsapi 32) void js_removefinalizecallback(jsruntime *rt, jsfinalizecallback cb); // added in spidermonkey 38 (jsapi 32) void js_setfinalizecallback(jsruntime *rt, jsfinalizecallback cb); // obsolete since jsapi 32 name type description rt jsruntime * the jsruntime for which to set the finalization callback.
...added in spidermonkey 38 name description jsfinalize_group_start called when preparing to sweep a group of compartments, before anything has been swept.
JS_GET_CLASS
this macro was removed in spidermonkey 1.8.8 when the signature of js_getclass() was changed to take only an object pointer.
... note: in spidermonkey versions prior to spidermonkey 1.8.8, js_getclass took both a jscontext* and a jsobject* as arguments in thread-safe builds, and in non-thread-safe builds it took only a jsobject*.
... as of spidermonkey 1.8.8 it no longer exists, because js_getclass's signature is the same in all build environments.
JS_GetSecurityCallbacks
this article covers features introduced in spidermonkey 1.8.1 configure spidermonkey security hooks.
... syntax /* added in spidermonkey 17 */ void js_setsecuritycallbacks(jsruntime *rt, const jssecuritycallbacks *callbacks); const jssecuritycallbacks * js_getsecuritycallbacks(jsruntime *rt); /* obsolete since jsapi 13 */ jssecuritycallbacks * js_setcontextsecuritycallbacks(jscontext *cx, jssecuritycallbacks *callbacks); jssecuritycallbacks * js_getruntimesecuritycallbacks(jsruntime *rt); jssecuritycallbacks * js_setruntimesecuritycallbacks(jsruntime *rt, jssecuritycallbacks *callbacks); name type description rt jsruntime * a runtime to get/set the security callbacks.
... callback structure struct jssecuritycallbacks { jscspevalchecker contentsecuritypolicyallows; // added in spidermonkey 1.8.5 jssubsumesop subsumes; // added in spidermonkey 31 jscheckaccessop checkobjectaccess; // obsolete since jsapi 29 jsprincipalstranscoder principalstranscoder; // obsolete since jsapi 13 jsobjectprincipalsfinder findobjectprincipals; // obsolete since jsapi 13 }; name type description contentsecuritypolicyallows jscspevalchecker a pointer to the function which checks if a csp instance wants to disable eval() and friends.
JS_Init
this article covers features introduced in spidermonkey 31 initializes the js engine so that further operations can be performed.
... syntax #include "js/initialization.h" // previously "jsapi.h" bool js_init(void); description initialize spidermonkey, returning true only if initialization succeeded.
... it is currently not possible to initialize spidermonkey multiple times (that is, calling js_init, jsapi methods, then js_shutdown in that order, then doing so again).
JS_IsConstructing_PossiblyWithGivenThisObject
this article covers features introduced in spidermonkey 1.8.5 determine if a special this object was supplied to the constructor.
... vp const jsval * maybethis jsobject ** description in the case of a constructor called from js_constructobject and js_initclass where the class has the jsclass_construct_prototype flag set, spidermonkey passes the constructor a non-standard this object.
... jsbool foo_native(jscontext *cx, unsigned int argc, jsval *vp) { jsobject *maybethis; if (js_isconstructing_possiblywithgiventhisobject(cx, vp, &maybethis)) { // native called as a constructor if (maybethis) // native called as a constructor with maybethis as 'this' } else { // native called as function, maybethis is still uninitialized } } note: a spidermonkey embedding does not need to use this query unless the embedding uses js_constructobject(), js_initclass() and jsclass_construct_prototype as described above.
JS_LookupProperty
js::handleobject obj, const char *name, js::mutablehandlevalue vp); bool js_lookupucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::mutablehandlevalue vp); bool js_lookuppropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 bool js_lookupelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue vp); // ---- obsolete since spidermonkey 31 ---- bool js_lookuppropertywithflags(jscontext *cx, js::handleobject obj, const char *name, unsigned flags, js::mutablehandlevalue vp); bool js_lookuppropertywithflagsbyid(jscontext *cx, js::handleobject...
... obj, js::handleid id, unsigned flags, js::mutablehandleobject objp, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which to derive runtime information.
...when executing javascript code that uses properties, spidermonkey looks up properties using slightly different rules depending on the syntactic context in which the property name appears.
JS_NewGlobalObject
this article covers features introduced in spidermonkey 17 create a new javascript object for use as a global object.
... hookoption js::onnewglobalhookoption see debugger api hook added in spidermonkey 31 options const js::compartmentoptions &amp; the option for new compartment (passed to jscompartment constructor).
... added in spidermonkey 31 description js_newglobalobject creates a new global object based on the specified class.
JS_NewObject
syntax // added in spidermonkey 45 jsobject * js_newobject(jscontext *cx, const jsclass *clasp); bool js_newobjectwithgivenproto(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto); // obsolete since spidermonkey 38 jsobject * js_newobject(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto, js::handle<jsobject*> parent); jsobject * js_newobjectwithgivenproto(jscontext *cx, const jsclass *clasp, js::handle<jsobject*> proto, js::handle<jsobject*> parent); // added in spidermonkey 1.8 name type description cx jscontext * the context in which to create the new object.
... added in spidermonkey 1.8.1 clasp->flags must not have the jsclass_global_flags bits set (use js_newglobalobject instead).
... added in spidermonkey 1.8 js_newobjectwithgivenproto creates a new object with the specified prototype.
JS_PSGS
this article covers features introduced in spidermonkey 17 macros for describing properties, for use with js_defineproperties and js_initclass.
...// added in spidermonkey 31 #define js_self_hosted_getset(name, gettername, settername, flags) ...
... // added in spidermonkey 31 #define js_ps_end ...
JS_PreventExtensions
syntax // added in spidermonkey 45 bool js_preventextensions(jscontext *cx, js::handleobject obj, js::objectopresult &result); // obsolete since jsapi 39 bool js_preventextensions(jscontext *cx, js::handleobject obj, bool *succeeded); name type description cx jscontext * the context.
...added in spidermonkey 45 succeeded bool * outparam indicating, on jsapi success, whether the object is now non-extensible.
... the failure-mode information below is new as of spidermonkey 36.
JS_ShutDown
syntax void js_shutdown(void); description destroys all free-standing resources allocated by spidermonkey, not associated with any jsruntime, jscontext, or other structure.
...it is currently not possible to initialize spidermonkey multiple times (that is, calling js_init, then other jsapi methods, then js_shutdown in that order, then doing so again).
...exact details about what this method cleans up will vary depending upon the version of spidermonkey in use.
Allocations - Firefox Developer Tools
to reduce the impact on responsiveness, spidermonkey (the javascript engine in firefox) can perform gc in small increments, letting the program run in between.
...spidermonkey uses a complex set of heuristics to decide when to do what sort of garbage collection.
... in general, though: allocation pressure - allocating a lot of memory, or allocating memory at a high rate - makes spidermonkey more likely to run garbage collection, and more likely to run full, non-incremental garbage collection.
Tamarin - Archive of obsolete content
tamarin's jit-compiler, nanojit, is also used in tracemonkey ergo spidermonkey, which is mozilla’s javascript engine in firefox.
... log a bug against tamarin tamarin-devel mailing list #tamarin channel on irc.mozilla.org blogroll mason chang david mandelin related topics javascript spidermonkey actionmonkey tamarin on mozilla.org ...
Archived Mozilla and build documentation - Archive of obsolete content
ant script to assemble an extension this ant script helps to package an extension archived spidermonkey docs this section contains old spidermonkey documentation.
...both the tamarin jit and the spidermonkey jit (a.k.a.
Old Proxy API - Archive of obsolete content
warning: the spidermonkey proxy implementation is a prototype and the proxy api and semantics specifications are unstable.
... the spidermonkey implementation may not reflect the latest specification draft.
JSHydra
in its back-end, it uses the parse tree created by the spidermonkey engine.
... mailing list newsgroup rss feed #static on irc.mozilla.org blogs joshua cranmer related topics dehydra, treehydra, spidermonkey categories interwiki language links ...
Bytecodes
background spidermonkey bytecodes are the canonical form of code representation that is used in the javascript engine.
...bytecode listing was moved to spidermonkey internals: bytecode descriptions page.
Property cache
spidermonkey's property cache is an internal data structure used to speed up property accesses in the interpreter and to communicate between the interpreter and jit.
...spidermonkey mainly uses type inference to determine which properties are being accessed; in cases where type inference does not find the exact shape of the object being accessed, spidermonkey uses a pic (polymorphic inline caches) to store the result of the lookup.
JS::AutoVectorRooter
this article covers features introduced in spidermonkey 17 base class that roots an internal variable-size array of type t.
... there are derived classes for the main types: class parent class js::autovaluevector autovectorrooter<value> js::autoidvector autovectorrooter<jsid> js::autoobjectvector added in spidermonkey 24 autovectorrooter<jsobject *> js::autofunctionvector added in spidermonkey 31 autovectorrooter<jsfunction *> js::autoscriptvector autovectorrooter<jsscript *> see also mxr id search for js::autovectorrooter mxr id search for js::autovaluevector mxr id search for js::autoidvector mxr id search for js::autoobjectvector mxr id search for js::autofunctionvec...
JS::Compile
this article covers features introduced in spidermonkey 17 compile a script for execution.
... syntax // added in spidermonkey 45 bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::readonlycompileoptions &options, const char *filename, js:...
JS::CompileOptions
this article covers features introduced in spidermonkey 17 compile options classes.
... constructor js::readonlycompileoptions(); // added in spidermonkey 31 js::owningcompileoptions(jscontext *cx); // added in spidermonkey 31 js::compileoptions(jscontext *cx, jsversion version = jsversion_unknown); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS::CreateError
this article covers features introduced in spidermonkey 38 create an error object.
... syntax // added in spidermonkey 45 bool js::createerror(jscontext *cx, jsexntype type, handleobject stack, handlestring filename, uint32_t linenumber, uint32_t columnnumber, jserrorreport *report, handlestring message, mutablehandlevalue rval); // obsolete since jsapi 39 bool js::createerror(jscontext *cx, jsexntype type, handlestring stack, handlestring filename, uint32_t linenumber, uint32_t columnnumber, jserrorreport *report, handlestring message, mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS::DeflateStringToUTF8Buffer
this article covers features introduced in spidermonkey 38 encode the given string as utf8 into given buffer.
... syntax // new in jsapi 52 void deflatestringtoutf8buffer(jsflatstring* src, mozilla::rangedptr<char> dst, size_t* dstlenp = nullptr, size_t* numcharsp = nullptr); // obsolete in spidermonkey 49 void deflatestringtoutf8buffer(jsflatstring* src, mozilla::rangedptr<char> dst); name type description src jsflatstring * the pointer to the string to deflate.
JS::Handle
this article covers features introduced in spidermonkey 17 reference to a t that has been rooted elsewhere.
... there are typedefs available for the main types: namespace js { typedef handle<jsfunction*> handlefunction; typedef handle<jsid> handleid; typedef handle<jsobject*> handleobject; typedef handle<jsscript*> handlescript; typedef handle<jsstring*> handlestring; typedef handle<js::symbol*> handlesymbol; // added in spidermonkey 38 typedef handle<value> handlevalue; } see also mxr id search for js::handle mxr id search for js::handlefunction mxr id search for js::handleid mxr id search for js::handleobject mxr id search for js::handlescript mxr id search for js::handlestring mxr id search for js::handlesymbol mxr id search for js::handlevalue js::rooted js::mutablehandle gc rooting guide bug 714647 ...
JS::IdentifyStandardInstance
this article covers features introduced in spidermonkey 31 determine if the given object is an instance/prototype/constructor for a standard class.
... syntax jsprotokey js::identifystandardinstance(jsobject *obj); jsprotokey js::identifystandardprototype(jsobject *obj); jsprotokey js::identifystandardinstanceorprototype(jsobject *obj); jsprotokey js::identifystandardconstructor(jsobject *obj); // added in spidermonkey 38 name type description obj jsobject * pointer to the instance/prototype/constructor object to determine.
JS::Rooted
this article covers features introduced in spidermonkey 17 local variable of type t whose value is always rooted.
... there are typedefs available for the main types: namespace js { typedef rooted<jsobject*> rootedobject; typedef rooted<jsfunction*> rootedfunction; typedef rooted<jsscript*> rootedscript; typedef rooted<jsstring*> rootedstring; typedef rooted<js::symbol*> rootedsymbol; // added in spidermonkey 38 typedef rooted<jsid> rootedid; typedef rooted<js::value> rootedvalue; } see also mxr id search for js::rooted mxr id search for js::rootedobject mxr id search for js::rootedfunction mxr id search for js::rootedscript mxr id search for js::rootedstring mxr id search for js::rootedsymbol mxr id search for js::rootedid mxr id search for js::rootedvalue js::handle js...
JS::ToString
this article covers features introduced in spidermonkey 31 convert any javascript value to a string.
... syntax #include "js/conversions.h" // as of spidermonkey 38; previously in jsapi.h jsstring* js::tostring(jscontext *cx, js::handlevalue v) name type description cx jscontext * the context in which to perform the conversion.
JSConstDoubleSpec
this article covers features introduced in spidermonkey 17 describes a double and integer value and assigns it a name.
... syntax template<typename t> struct jsconstscalarspec { const char *name; t val; /* uint8_t flags; // obsolete from jsapi 35 uint8_t spare[3]; // obsolete from jsapi 35 */ }; typedef jsconstscalarspec<double> jsconstdoublespec; typedef jsconstscalarspec<int32_t> jsconstintegerspec; // added in spidermonkey 38 name type description val double or int32_t value for the double or integer.
JSObjectOps.defaultValue
this documentation should be considered spidermonkey internals documentation, not api documentation.
...on success, *vp must be a primitive value: per es5 §8.12.8, every object "must ensure that its [[defaultvalue]] internal method can return only primitive values." debug builds of spidermonkey will assert if a convert callback is successful but leaves *vp holding a primitive value.
JS_CallFunction
syntax /* added in spidermonkey 31 */ bool js_callfunction(jscontext *cx, js::handleobject obj, js::handlefunction fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js_callfunctionname(jscontext *cx, js::handleobject obj, const char *name, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js_callfunctionvalue(jscontext *cx, js::handleobject obj, js::handlevalue fval, const js::handlevaluearray& args, js::mutablehandlevalue rval); /* obsolete since jsapi 30 */ bool js_callfunction(jscontext *cx, jsobject *obj, jsfunction *fun, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionname(jscontext *cx, jsobject *obj, const char *...
...added in spidermonkey 31 argc unsigned number of arguments you are passing to the function.
JS_ConstructObject
as of spidermonkey 1.8.8, js_constructobject and js_constructobjectwitharguments have been removed from the jsapi.
... a less-preferred short-term solution might be to use this reimplementation of the method, but note that this reimplementation is not guaranteed to continue working across spidermonkey releases.
JS_ConvertArguments
syntax bool js_convertarguments(jscontext *cx, const js::callargs &args, const char *format, ...); // added in spidermonkey 31 bool js_convertarguments(jscontext *cx, unsigned argc, jsval *argv, const char *format, ...); // obsolete since jsapi 30 name type description cx jscontext * the context in which to perform any necessary conversions.
...added in spidermonkey 31 argc unsigned the number of arguments to convert.
JS_DefineFunction
nction * js_defineucfunction(jscontext *cx, js::handle<jsobject*> obj, const char16_t *name, size_t namelen, jsnative call, unsigned nargs, unsigned attrs); jsfunction * js_definefunctionbyid(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsid> id, jsnative call, unsigned nargs, unsigned attrs); // added in spidermonkey 17 name type description cx jscontext * the context in which to define the function.
...added in spidermonkey 17 call jsnative the native c/c++ function to be wrapped by the new function.
JS_DefineFunctions
syntax bool js_definefunctions(jscontext *cx, js::handle<jsobject*> obj, const jsfunctionspec *fs, propertydefinitionbehavior behavior = defineallproperties); in spidermonkey versions prior to spidermonkey 24, fs was not const.
...added in spidermonkey 38 enum propertydefinitionbehavior { defineallproperties, onlydefinelateproperties, dontdefinelateproperties }; name description defineallproperties define all properties regardless of their flags.
JS_DefineProperty
r16_t *name, size_t namelen, uint32_t value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, double value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); // ---- added in spidermonkey 45 ---- bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handle<jspropertydescriptor> desc, js::objectopresult &result); bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handle<jspropertydescriptor> desc); bool js_defineucproperty(jscontext *cx, js::handleob...
...ject obj, const char16_t *name, size_t namelen, js::handle<jspropertydescriptor> desc); // ---- added in spidermonkey 1.8.1 ---- bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_definepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr);...
JS_EncodeString
this article covers features introduced in spidermonkey 1.8 convert a javascript string to a c string.
... syntax char * js_encodestring(jscontext *cx, jsstring *str); char * js_encodestringtoutf8(jscontext *cx, js::handlestring str); // added in spidermonkey 24 name type description cx jscontext * a context.
JS_ExecuteScript
syntax bool js_executescript(jscontext *cx, js::handlescript script, js::mutablehandlevalue rval); // added in spidermonkey 45 bool js_executescript(jscontext *cx, js::handlescript script); // added in spidermonkey 45 bool js_executescript(jscontext *cx, js::autoobjectvector &scopechain, js::handlescript script, js::mutablehandlevalue rval); // added in spidermonkey 36 bool js_executescript(jscontext *cx, js::autoobjectvector &scopechain, js::handlescript script); // added in spidermonkey 36 bool js_executescript(jscontext *cx, js::handleobject obj, js::handlescript script, js::mutablehandlevalue rval); // obsolete since jsapi 39 bool js_executescript(jscontext *cx, js::handleobject obj, js::handle...
...script script); // obsolete since jsapi 39 bool js::cloneandexecutescript(jscontext *cx, js::handle<jsscript*> script); // added in spidermonkey 45 bool js::cloneandexecutescript(jscontext *cx, js::handle<jsobject*> obj, js::handle<jsscript*> script); // added in spidermonkey 31, obsoleted since jsapi 39 name type description cx jscontext * the context in which to execute the script.
JS_GC
syntax void js_gc(jscontext *cx); // added in spidermonkey 52 void js_gc(jsruntime *rt); // obsolete since jsapi 50 void js_gc(jscontext *cx); // obsolete since jsapi 14 name type description cx jscontext * the context to for which to perform garbage collection.
... added in spidermonkey 52 rt jsruntime * the runtime to for which to perform garbage collection.
JS_GetGlobalObject
the concept of a global object belonging to a context will likely be phased out in future versions of spidermonkey.
...spidermonkey supports applications that have multiple global objects, such as the various window objects in a web browser.
JS_GetParent
an object's parent serves two purposes in spidermonkey: for some functions, it is used to implement lexical scoping (but this is an implementation detail).
... applications that use spidermonkey's custom security features can use the parent during security checks, as a convenient way to determine the security domain of an object being accessed.
JS_InstanceOf
syntax bool js_instanceof(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, js::callargs *args); // added in spidermonkey 38 bool js_instanceof(jscontext *cx, js::handle<jsobject*> obj, const jsclass *clasp, jsval *argv); // obsolete since jsapi 32 name type description cx jscontext * pointer to a js context from which to derive runtime information.
...added in spidermonkey 38 argv jsval * optional argument vector.
JS_IsIdentifier
this article covers features introduced in spidermonkey 17 test whether the given string is a valid ecmascript identifier.
... syntax bool js_isidentifier(jscontext *cx, js::handlestring str, bool *isidentifier); bool js_isidentifier(const char16_t *chars, size_t length); // added in spidermonkey 38 name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_IsStopIteration
this article covers features introduced in spidermonkey 31 determine whether the value is a stopiteration exception or not.
... syntax // added in spidermonkey 42 bool js_isstopiteration(js::value v); // obsolete since spidermonkey 42 bool js_isstopiteration(jsval v); name type description v js::value the value to check.
JS_MaybeGC
calling js_maybegc periodically when the application is busy, from a jsbranchcallback or jsoperationcallback added in spidermonkey 1.8, can keep memory usage down and improve performance.
... implementation note: spidermonkey 1.8 and earlier determine whether garbage collection is appropriate by analyzing statistics about the gc heap and memory usage since the last garbage collection cycle.
JS_New
this article covers features introduced in spidermonkey 1.8 create an object as though by using the new keyword and a javascript function.
...added in spidermonkey 38 argc unsigned the number of arguments to pass to the constructor.
JS_NewArrayObject
syntax jsobject * js_newarrayobject(jscontext *cx, const js::handlevaluearray& contents); // added in spidermonkey 31 jsobject * js_newarrayobject(jscontext *cx, size_t length); // added in spidermonkey 31 jsobject * js_newarrayobject(jscontext *cx, int length, jsval *vector); // obsolete since jsapi 30 name type description cx jscontext * the context in which to create the new array.
...added in spidermonkey 31 length size_t or int the length of the new array.
JS_NewFunction
syntax // added in spidermonkey 45 jsfunction * js_newfunction(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, const char *name); // obsolete since jsapi 44 jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsid> id); // obsolete since jsapi 39 jsfunction * js_newfunction(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, const char *name); jsfunction * js_newfunctionbyid(jscontext *cx, jsnative call, unsigned nargs, unsigned flags, js::handle<jsobject*> parent, js::handle<jsid> id); // added in spidermonkey 17 name type de...
...added in spidermonkey 17 description js_newfunction creates a new javascript function implemented in c/c++.
JS_NewObjectForConstructor
added in spidermonkey 17 vp jsval * pointer to a constructor.
...added in spidermonkey 38 description js_newobjectforconstructor creates a new object exactly as the given constructor would if invoked with new.
JS_NewRuntime
added in spidermonkey 38 parentruntime jsruntime * the topmost parent or nullptr .
... added in spidermonkey 31 description js_newruntime initializes the javascript runtime environment.
JS_NumberValue
this article covers features introduced in spidermonkey 17 convert a c floating-point number of type double to a js::value.
... syntax // added in spidermonkey 42 js::value js_numbervalue(double d); // obsolete since spidermonkey 42 jsval js_numbervalue(double d); name type description d double the numeric value to convert.
JS_SameValue
this article covers features introduced in spidermonkey 1.8.1 determines if two jsvals are the same, as determined by the samevalue algorithm in ecmascript 262, 5th edition.
...the samevalue algorithm is equivalent to the following javascript: function samevalue(v1, v2) { if (v1 === 0 && v2 === 0) return 1 / v1 === 1 / v2; if (v1 !== v1 && v2 !== v2) return true; return v1 === v2; } syntax // added in spidermonkey 45 bool js_samevalue(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *same); // obsolete since jsapi 39 bool js_samevalue(jscontext *cx, jsval v1, jsval v2, bool *same); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SetContextCallback
added in spidermonkey 31 callback syntax typedef bool (* jscontextcallback)(jscontext *cx, unsigned contextop, void *data); name type description cx jscontext * pointer to a jscontext which the callback may use to call into jsapi functions.
...added in spidermonkey 31 typedef enum jscontextop { jscontext_new, jscontext_destroy } jscontextop; enumeration meaning jscontext_new js_newcontext successfully created a new jscontext instance.
JS_SetElement
syntax /* added in spidermonkey 31 */ bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlevalue v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handleobject v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlestring v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, int32_t v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, uint32_t v); bool js_setelement(jscontext *cx, js::handleobject obj, uint32_t index, double v); /* obsolete since jsapi 29 */ bool js_setelement(jscontext *cx, js::handleobject obj, ui...
...added in spidermonkey 31 vp js::mutablehandlevalue in/out parameter.
JS_SetGCZeal
this article covers features introduced in spidermonkey 1.8 enable gc zeal, a testing and debugging feature that helps find gc-related bugs in jsapi applications.
...to enable this function in an optimized build, define the macro js_gc_zeal building spidermonkey.
JS_SetOperationCallback
this article covers features introduced in spidermonkey 1.8.5 set a callback function that is automatically called periodically while javascript code runs.
... these methods/types are renamed to js_setinterruptcallback, js_getinterruptcallback, js_requestinterruptcallback and jsinterruptcallback in spidermonkey 30.
JS_StrictlyEqual
this article covers features introduced in spidermonkey 1.8.1 determine whether two javascript values are equal in the sense of the === operator.
... syntax // added in spidermonkey 45 bool js_strictlyequal(jscontext *cx, js::handle<js::value> v1, js::handle<js::value> v2, bool *equal); // obsolete since jsapi 39 bool js_strictlyequal(jscontext *cx, jsval v1, jsval v2, bool *equal); name type description cx jscontext * the context in which to perform the conversion.
JS_SuspendRequest
removed from spidermonkey at or prior to version 45.
...in spidermonkey 1.8 and later, these functions will be present, but will do nothing, in non-js_threadsafe builds.
JS_YieldRequest
this bug (bug 402898) will be fixed in spidermonkey 1.8.
...in spidermonkey 1.8 and later, this function will be present, but will do nothing, in non-js_threadsafe builds.
JSDBGAPI
the jsdbg api is obsolete and has been removed in spidermonkey 35.
...cehandler js_setexecutehook js_setcallhook js_setobjecthook js_setthrowhook js_setdebugerrorhook js_setnewscripthook js_setdestroyscripthook js_getglobaldebughooks js_setcontextdebughooks memory usage js_getobjecttotalsize js_getfunctiontotalsize js_getscripttotalsize system objects js_issystemobject js_newsystemobject profiling these functions can be used to profile a spidermonkey application using the mac profiler, shark.
Using Mozilla code in other projects
various components of the platform, such as the spidermonkey javascript engine, can be used in your own projects without the rest of the platform.
... using mozilla components spidermonkey spidermonkey is the javascript runtime engine used by mozilla projects.
WebIDL bindings
"spidermonkey" interfaces are used to represent objects that are implemented natively by the javascript engine (e.g., typed arrays).
... "spidermonkey" interfaces typed array, array buffer, and array buffer view arguments are represented by the objects in typedarray.h.
Debugger.Environment - Firefox Developer Tools
spidermonkey creates debugger.environment instances as needed as the debugger inspects stack frames and function objects; calling debugger.environment as a function or constructor raises a typeerror exception.
... spidermonkey creates exactly one debugger.environment instance for each environment it presents via a given debugger instance: if the debugger encounters the same environment through two different routes (perhaps two functions have closed over the same environment), spidermonkey presents the same debugger.environment instance to the debugger each time.
Modules - Archive of obsolete content
compartments are a fairly recent addition to spidermonkey, and can be seen as a separate memory space.
Private Properties - Archive of obsolete content
weakmaps were introduced to javascript in ecmascript 2015 and have recently been implemented in spidermonkey.
Index of archived content - Archive of obsolete content
in extension components using the stylesheet service bookmarks.export() bookmarks.import() adding preferences to an extension an interview with douglas bowman of wired news archived mozilla and build documentation activex control for hosting netscape plug-ins in ie archived spidermonkey docs file object open merging tracemonkey repo spidermonkey coding conventions autodial for windows nt automated testing tips and tricks automatic mozilla configurator enabling quicklaunch for ...
Dehydra Function Reference - Archive of obsolete content
gczeal is only enabled when spidermonkey and dehydra are compiled with debug macro defined.
Dehydra - Archive of obsolete content
mailing list newsgroup rss feed #static on irc.mozilla.org blogs taras glek david mandelin benjamin smedberg related topics pork c/c++ refactoring tools, mozilla 2, spidermonkey categories interwiki language links ...
PyDOM - Archive of obsolete content
related topics pyxpcom: create and use xpcom components with python python-spidermonkey pydom samples: sample applications that use pydom pythonext: a firefox/xulrunner extension that can be used to install pydom ...
open - Archive of obsolete content
warning: this section describes the file component of the spidermonkey javascript interpreter.
Treehydra - Archive of obsolete content
mailing list newsgroup rss feed #static on irc.mozilla.org blogs taras glek david mandelin related topics pork c/c++ refactoring tools, mozilla 2, spidermonkey categories interwiki language links ...
When To Use ifdefs - Archive of obsolete content
for instance, xpcom, the spidermonkey javascript engine, and the networking engine do not know anything about xul and should not have any ifdefs based on --disable-xul.
2006-11-10 - Archive of obsolete content
discussion spidermonkey for the server side a user frusturated by the difference in programming languages between client and server asks if there is a javascript server-side framework.
E4X - Archive of obsolete content
ArchiveWebE4X
e4x is implemented (at least partially) in spidermonkey (gecko's javascript engine) and in rhino (javascript engine written in java).
Iterator - Archive of obsolete content
the iterator function is a spidermonkey-specific feature, and will be removed at some point.
Legacy generator function expression - Archive of obsolete content
the legacy generator function expression was a spidermonkey-specific feature, which is removed in firefox 58+.
Legacy generator function - Archive of obsolete content
the legacy generator function was a spidermonkey-specific feature, which is removed in firefox 58+.
New in JavaScript 1.8.5 - Archive of obsolete content
some information about why: spidermonkey change du jour: the special __parent__ property has been removed bug 551529 & bug 552560.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
it defines the standard for the javascript implementation in spidermonkey, the engine used in firefox and other mozilla applications.
New in JavaScript - Archive of obsolete content
this chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.
Archived JavaScript Reference - Archive of obsolete content
gacy generator, the function body should contain at least one yield expression.microsoft javascript extensionsmicrosoft browsers (internet explorer, and in a few cases, microsoft edge) support a number of special microsoft extensions to the otherwise standard javascript apis.new in javascriptthis chapter contains information about javascript's version history and implementation status for mozilla/spidermonkey-based javascript applications, such as firefox.number.tointeger()the number.tointeger() method used to evaluate the passed value and convert it to an integer, but its implementation has been removed.object.getnotifier()the object.getnotifer() method was used to create an object that allows to synthetically trigger a change, but has been deprecated and removed in browsers.object.observe()the objec...
Sharp variables in JavaScript - Archive of obsolete content
warning: sharp variables was a non-standard syntax for creating or serializing cyclic data graphs that used to be supported only by mozilla's spidermonkey js engine.
StopIteration - Archive of obsolete content
the stopiteration object was a spidermonkey-specific feature and is removed in firefox 58+.
Gecko FAQ - Gecko Redirect 1
gecko includes the following components: document parser (handles html and xml) layout engine with content model style system (handles css, etc.) javascript runtime (spidermonkey) image library networking library (necko) platform-specific graphics rendering and widget sets for win32, x, and mac user preferences library mozilla plug-in api (npapi) to support the navigator plug-in interface open java interface (oji), with sun java 1.2 jvm rdf back end font library security library (nss) original document information author(s): angus other contributors: ekroc...
Compile - MDN Web Docs Glossary: Definitions of Web-related terms
for instance in the browser: firefox' spidermonkey javascript engine has a jit built-in that will compile javascript in a website to machine code while you're viewing it so it runs faster.
Choosing the right memory allocator
npn_memalloc npn_memfree npn_memflush javascript api memory allocators there are also routines intended for use within the javascript runtime engine (spidermonkey).
Contributing to the Mozilla code base
we'll be integrating some information from these pages soon, but until then you may find them interesting in their current form: a guide to learning the mozilla codebase a beginner's guide to spidermonkey, mozilla's javascript engine mozilla platform development cheatsheet (archive.org) ...
JS::PerfMeasurement
static bool perfmeasurement::canmeasuresomething() this class method returns true if and only if some -- not necessarily all -- events can be measured by the current build of spidermonkey, running on the current os.
Performance
the "leaks" tool is not recommended for use with spidermonkey or firefox, because it gets confused by tagged pointers and thinks objects have leaked when they have not (see bug 390944).
Pork
mailing list newsgroup rss feed #static on irc.mozilla.org related topics dehydra, treehydra, mozilla 2, spidermonkey ...
Statistics API
overview each time a garbage collection occurs, spidermonkey keeps track of how long each phase of the collection took, along with some related data.
Invariants
or, "the zen of spidermonkey".
JIT Optimization Outcomes
spidermonkey's optimizing jit, ionmonkey, uses different optimization strategies to speed up various operations.
JIT Optimization Strategies
spidermonkey's optimizing jit, ionmonkey, uses various strategies to optimize operations.
JSAPI Cookbook
note: the foss wiki page contains a few links to other libraries and programs that can make life easier when using spidermonkey and jsapi.
BOOLEAN_TO_JSVAL
please use js::booleanvalue/js::truevalue/js::falsevalue instead in spidermonkey 45 or later.
DOUBLE_TO_JSVAL
please use js::doublevalue instead in spidermonkey 45 or later.
INT_FITS_IN_JSVAL
starting in spidermonkey 1.8.5, jsval can store a full 32-bit integer, so this check isn't needed any longer for 32-bit integers.
JS::Add*Root
this article covers features introduced in spidermonkey 31 register a variable as a member of the garbage collector's root set, to protect anything the root points at from garbage collection.
JS::AutoIdArray
this article covers features introduced in spidermonkey 17 take ownership of a jsidarray and free it later.
JS::AutoSaveExceptionState
this article covers features introduced in spidermonkey 31 save and later restore the current exception state of a given jscontext.
JS::AutoValueArray
this article covers features introduced in spidermonkey 31 root an internal fixed-size array of js::values.
JS::BooleanValue
this article covers features introduced in spidermonkey 24 convert a c boolean of type bool to a js::value.
JS::Call
this article covers features introduced in spidermonkey 17 call a specified js function.
JS::CloneFunctionObject
this article covers features introduced in spidermonkey 38 create a new function object from an existing jsfunction.
JS::CompileFunction
this article covers features introduced in spidermonkey 17 create a javascript function from a text string.
JS::CompileOffThread
this article covers features introduced in spidermonkey 31 compile a script off thread for execution.
JS::Construct
this article covers features introduced in spidermonkey 38 call a specified js constructor.
JS::CurrentGlobalOrNull
this article covers features introduced in spidermonkey 31 return the global object for the active function on the context.
JS::DoubleNaNValue
this article covers features introduced in spidermonkey 24 create a not-a-number (nan) floating-point number as a value of type js::value.
JS::DoubleValue
this article covers features introduced in spidermonkey 24 convert a c floating-point number of type double to a js::value.
JS::FalseValue
this article covers features introduced in spidermonkey 24 create a js::value that represents the javascript value false.
JS::Float32Value
this article covers features introduced in spidermonkey 24 convert a c floating-point number of type float to a js::value.
JS::GetDeflatedUTF8StringLength
this article covers features introduced in spidermonkey 38 returns the length of the char buffer required to encode given string as utf8.
JS::GetSelfHostedFunction
this article covers features introduced in spidermonkey 31 create a new javascript function that is implemented in self-hosted javascript.
JS::HandleValueArray
this article covers features introduced in spidermonkey 31 a handle to an array of rooted values.
JS::Int32Value
this article covers features introduced in spidermonkey 24 convert a c signed 32-bit integer of type int32_t to a js::value.
JS::IsCallable
this article covers features introduced in spidermonkey 38 return whether the given function object is callable/a valid constructor.
JS::MutableHandle
this article covers features introduced in spidermonkey 17 reference to a t that has been rooted elsewhere.
JS::NullHandleValue
this article covers features introduced in spidermonkey 24 the js::value that represents the javascript value null.
JS::NullValue
this article covers features introduced in spidermonkey 24 create a js::value that represents the javascript value null.
JS::NumberValue
this article covers features introduced in spidermonkey 24 convert a c integer or floating-point value to a js::value.
JS::ObjectOrNullValue
this article covers features introduced in spidermonkey 24 convert a jsobject or null pointer to a js::value.
JS::ObjectValue
this article covers features introduced in spidermonkey 24 convert a jsobject to a js::value.
JS::OrdinaryToPrimitive
this article covers features introduced in spidermonkey 38 convert an ordinary object to a primitive value.
JS::PropertySpecNameEqualsId
this article covers features introduced in spidermonkey 38 determine if the given jspropertyspec::name or jsfunctionspec::name value equals the given jsid.
JS::PropertySpecNameIsSymbol
this article covers features introduced in spidermonkey 38 determine if the given jspropertyspec::name or jsfunctionspec::name value is actually a symbol code and not a string.
JS::PropertySpecNameToPermanentId
this article covers features introduced in spidermonkey 38 create a jsid that does not need to be marked for gc.
JS::ProtoKeyToId
this article covers features introduced in spidermonkey 38 convert a jsprotokey to js id.
JS::Remove*Root
this article covers features introduced in spidermonkey 31 unregister a pointer to a gc thing so that it is no longer a member of the garbage collector's root set.
JS::SourceBufferHolder
this article covers features introduced in spidermonkey 31 container class for passing in script source buffers to the js engine.
JS::StringValue
this article covers features introduced in spidermonkey 24 convert a jsstring to a js::value.
JS::SymbolValue
this article covers features introduced in spidermonkey 38 convert a js::symbol to a js::value.
JS::ToBoolean
this article covers features introduced in spidermonkey 17 convert any javascript value to a boolean.
JS::ToInt32
this article covers features introduced in spidermonkey 17 convert any javascript value to a signed 32bit integer.
JS::ToInt64
this article covers features introduced in spidermonkey 17 convert any javascript value to a signed 64bit integer.
JS::ToNumber
this article covers features introduced in spidermonkey 17 convert any javascript value to a double.
JS::ToPrimitive
this article covers features introduced in spidermonkey 45 converts a javascript object to a primitive value, using the semantics of toprimitive.
JS::ToUint16
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 16bit integer.
JS::ToUint32
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 32bit integer.
JS::ToUint64
this article covers features introduced in spidermonkey 17 convert any javascript value to an unsigned 64bit integer.
JS::TrueHandleValue
this article covers features introduced in spidermonkey 38 the js::value that represents the javascript value true.
JS::TrueValue
this article covers features introduced in spidermonkey 24 create a js::value that represents the javascript value true.
JS::UndefinedHandleValue
this article covers features introduced in spidermonkey 24 the js::value that represents the javascript value undefined.
JS::UndefinedValue
this article covers features introduced in spidermonkey 24 create a js::value that represents the javascript value undefined.
JSAutoByteString
this article covers features introduced in spidermonkey 17 take ownership of a string and free it later.
JSAutoCompartment
this article covers features introduced in spidermonkey 24 raii helper to enter a different compartment on the given context and automatically leave it once the jsautocompartment instance gets out of scope.
JSDeletePropertyOp
this article covers features introduced in spidermonkey 24 the type of the jsclass.delproperty.
JSErrorFormatString
this article covers features introduced in spidermonkey 17 represent error message and type.
JSExnType
this article covers features introduced in spidermonkey 17 possible exception types.
JSExtendedClass.wrappedObject
this article covers features introduced in spidermonkey 1.8 callback for objects that wrap other objects.
JSFUN_GLOBAL_PARENT
this macro is not provided in any stable spidermonkey releases.
JSFreeOp
this article covers features introduced in spidermonkey 17 structure used during finalization instead of jscontext.
JSID_EMPTY
syntax const jsid jsid_empty; const js::handleid jsid_emptyhandle; // added in spidermonkey 31 description jsid_empty is an internal jsid value which is used in type inference code.
JSID_IS_STRING
syntax bool jsid_is_string(jsid id); jsstring * jsid_to_string(jsid id); jsid interned_string_to_jsid(jscontext *cx, jsstring *str); // added in spidermonkey 38 jsflatstring * jsid_to_flat_string(jsid id); // added in spidermonkey 17 name type description cx jscontext * pointer to a js context from which to derive runtime information.
JSID_IS_SYMBOL
this article covers features introduced in spidermonkey 38 testing and conversion functions between a js id and a js symbol.
JSID_VOID
syntax const jsid jsid_void; const js::handleid jsid_voidhandle; // added in spidermonkey 31 description jsid_void does not occur in js scripts but may be used to indicate the absence of a valid jsid.
JSIteratorOp
this article covers features introduced in spidermonkey 1.8 callback for creating iterators.
JSObjectOps.defineProperty
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.destroyObjectMap
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.enumerate
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.getAttributes
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.getProperty
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.getRequiredSlot
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.lookupProperty
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.newObjectMap
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectOps.setProto
this documentation should be considered spidermonkey internals documentation, not api documentation.
JSObjectPrincipalsFinder
jsobjectprincipalsfinder is the type of a security callback that can be configured using js_setobjectprincipalsfinderjsapi 1.8 and earlier or js_setruntimesecuritycallbacksadded in spidermonkey 1.8.1.
JSPRINCIPALS_HOLD
principals are used by the spidermonkey security system.
JSPrincipals
added in spidermonkey 17 description jsprincipals is the abstract base class of all principals objects, the objects that identify the source of a function or script and are used to determine its privileges.
JSPrincipalsTranscoder
jsprincipalstranscoder is the type of a security callback that can be configured using js_setprincipalstranscoderjsapi 1.8 and earlier or js_setruntimesecuritycallbacksadded in spidermonkey 1.8.1.
JSStringFinalizer
this article covers features introduced in spidermonkey 17 finalize external strings created by js_newexternalstring.
JSVAL_TO_BOOLEAN
these are constants of type jsbool, which is an integer type, the spidermonkey version of bool.
JS_ASSERT_STRING_IS_FLAT
this article covers features introduced in spidermonkey 1.8.5 assert a string is flattened.
JS_BeginRequest
in spidermonkey 1.8 and later, these functions are present, but do nothing, in non-js_threadsafe builds.
JS_BindCallable
this article covers features introduced in spidermonkey 17 bind the given callable to use the given object as this.
JS_CheckForInterrupt
this article covers features introduced in spidermonkey 45 check for and handle interrupt.
JS_ClearDateCaches
this article covers features introduced in spidermonkey 17 clear the cache of calculated local time from each date object.
JS_ClearNonGlobalObject
this article covers features introduced in spidermonkey 24 remove all properties associated with an object.
JS_CompileFileHandleForPrincipals
this article covers features introduced in spidermonkey 1.8.5 please provide a description of this function.
JS_CompileFileHandleForPrincipalsVersion
this article covers features introduced in spidermonkey 1.8.5 please provide a description for this function.
JS_CompileScript
syntax // added in spidermonkey 45 bool js_compilescript(jscontext *cx, const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); // obsolete since jsapi 39 bool js_compilescript(jscontext *cx, js::handleobject obj, const char *ascii, size_t length, const js::compileoptions &options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, js::handleobject obj, const char16_t *chars, ...
JS_CompileUCFunctionForPrincipalsVersion
this article covers features introduced in spidermonkey 1.8.5 please provide a description for this function.
JS_CompileUTF8FileHandle
js_compileutf8filehandleforprincipals is a version of the function for use with spidermonkey's security features.
JS_ConvertArgumentsVA
added in spidermonkey 31 argc unsigned the number of arguments to convert.
JS_DecompileScript
from spidermonkey 17, this does not actually decompile the script, but returns the original source code (bug 761723).
JS_DecompileScriptObject
this article covers features introduced in spidermonkey 1.8.5 fixme: please provide a description for this function.
JS_DeepFreezeObject
this article covers features introduced in spidermonkey 1.8.5 freeze obj, and all objects it refers to, recursively.
JS_DefaultValue
this article covers features introduced in spidermonkey 1.8.6 converts a javascript object to a primitive value, using the semantics of that object's internal [[defaultvalue]] hook.
JS_DefineConstDoubles
syntax bool js_defineconstdoubles(jscontext *cx, js::handleobject obj, const jsconstdoublespec *cds); bool js_defineconstintegers(jscontext *cx, js::handleobject obj, const jsconstintegerspec *cis); // added in spidermonkey 38 name type description cx jscontext * the context in which to define the new properties.
JS_DefineElement
syntax /* added in spidermonkey 38 (jsapi 32) */ bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlevalue value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handleobject value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineelement(jscontext *cx, js::handleobject obj, uint32_t index, js::handlestring value, unsigned attrs, jsnative getter = nullptr, jsnative setter = nullptr); bool js_defineelement(jscontext *c...
JS_DefineOwnProperty
this article covers features introduced in spidermonkey 1.8.5 please provide a description for this function.
JS_DefineProperties
in spidermonkey versions prior to spidermonkey 24, the last argument to js_definepropeties was not const.
JS_DeleteElement
syntax bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index); // added in spidermonkey 45 bool js_deleteelement(jscontext *cx, js::handleobject obj, uint32_t index, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_DeleteProperty
syntax bool js_deleteproperty(jscontext *cx, js::handleobject obj, const char *name); bool js_deletepropertybyid(jscontext *cx, js::handleobject obj, jsid id); // added in spidermonkey 1.8.1 // added in spidermonkey 45 bool js_deleteproperty(jscontext *cx, js::handleobject obj, const char *name, js::objectopresult &result); bool js_deletepropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::objectopresult &result); bool js_deleteucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::objectopresult &result); name type description cx jscontext * pointer to a js context from which to derive runtime informati...
JS_DeleteProperty2
yntax bool js_deleteproperty2(jscontext *cx, js::handleobject obj, const char *name, bool *succeeded); bool js_deleteucproperty2(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *succeeded); bool js_deletepropertybyid2(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_DoubleIsInt32
this article covers features introduced in spidermonkey 17 compare double value and int32_t value.
JS_DoubleToInt32
this article covers features introduced in spidermonkey 17 convert a c floating-point number of type double to 32-bit integer per ecma spec.
JS_DumpHeap
this article covers features introduced in spidermonkey 1.8 debug only.
JS_EncodeCharacters
if spidermonkey was built with js_c_strings_are_utf8 defined or js_setcstringsareutf8 was called, the string is converted to utf-8.
JS_EncodeStringToBuffer
this article covers features introduced in spidermonkey 1.8.5 convert a javascript string to a c string.
JS_EnterCompartment
this article covers features introduced in spidermonkey 24 note: the preferred way of changing a context's current compartment is using jsautocompartment.
JS_EnterCrossCompartmentCall
this article covers features introduced in spidermonkey 1.8.1 js_entercrosscompartmentcall has been removed in bug 786068.
JS_EnumerateDiagnosticMemoryRegions
this article covers features introduced in spidermonkey 17 enumerate memory regions that contain diagnostic information..
JS_ExecuteScriptVersion
this article covers features introduced in spidermonkey 1.8.5 execute a compiled script with specified version.
JS_FORGET_STRING_FLATNESS
this article covers features introduced in spidermonkey 1.8.5 convert jsflatstring to jsstring.
JS_FileEscapedString
this article covers features introduced in spidermonkey 1.8.5 write string into file with escaping.
JS_FlattenString
this article covers features introduced in spidermonkey 1.8.5 flattens a string.
JS_FlushCaches
this article covers features introduced in spidermonkey 1.8.5 flushes the code cache for the current thread.
JS_ForwardGetPropertyTo
this article covers features introduced in spidermonkey 17 find a specified property and retrieve its value.
JS_FreezeObject
this article covers features introduced in spidermonkey 1.8.5 freeze an object.
JS_GetArrayPrototype
this article covers features introduced in spidermonkey 24 retrieves the original, canonical array.prototype for an object's global object.
JS_GetClass
in spidermonkey versions prior to spidermonkey 1.8.8, js_getclass took both a jscontext* and a jsobject* as arguments in thread-safe builds, and in non-thread-safe builds it took only a jsobject*.
JS_GetCompartmentPrivate
this article covers features introduced in spidermonkey 1.8.5 please provide a description for this function.
JS_GetContextPrivate
syntax void * js_getcontextprivate(jscontext *cx); void js_setcontextprivate(jscontext *cx, void *data); void * js_getsecondcontextprivate(jscontext *cx); // added in spidermonkey 17 void js_setsecondcontextprivate(jscontext *cx, void *data); // added in spidermonkey 17 name type description cx jscontext * any context.
JS_GetDefaultFreeOp
this article covers features introduced in spidermonkey 17 return default jsfreeop for the runtime.
JS_GetEmptyString
this article covers features introduced in spidermonkey 1.8.5 returns the empty string as a jsstring object.
JS_GetEmptyStringValue
syntax // added in spidermonkey 42 js::value js_getemptystringvalue(jscontext *cx); // obsolete since spidermonkey 42 jsval js_getemptystringvalue(jscontext *cx); name type description cx jscontext * a context.
JS_GetErrorPrototype
this article covers features introduced in spidermonkey 38 return the original value of error.prototype.
JS_GetExternalStringClosure
this article covers features introduced in spidermonkey 6 returns the string closure stored in a jsstring created by calling js_newexternalstringwithclosure.
JS_GetExternalStringFinalizer
this article covers features introduced in spidermonkey 17 get the string finalizer of an external string.
JS_GetFlatStringChars
this article covers features introduced in spidermonkey 1.8.5 get the chars of a flat string.
JS_GetFunctionId
syntax jsstring * js_getfunctionid(jsfunction *fun); jsstring * js_getfunctiondisplayid(jsfunction *fun); // added in spidermonkey 17 name type description fun jsfunction * a javascript function.
JS_GetFunctionPrototype
this article covers features introduced in spidermonkey 17 retrieves the original, canonical function.prototype for an object's global object.
JS_GetFunctionScript
this article covers features introduced in spidermonkey 38 retrieves a jsscript for a specified function.
JS_GetGCParameter
syntax uint32_t js_getgcparameter(jsruntime *rt, jsgcparamkey key); void js_setgcparameter(jsruntime *rt, jsgcparamkey key, uint32_t value); uint32_t js_getgcparameterforthread(jscontext *cx, jsgcparamkey key); // added in spidermonkeysidebar 17 void js_setgcparameterforthread(jscontext *cx, jsgcparamkey key, uint32_t value); // added in spidermonkeysidebar 17 name type description rt jsruntime * the runtime to configure.
JS_GetGlobalForCompartmentOrNull
this article covers features introduced in spidermonkey 17 return the global object for the specified compartment.
JS_GetGlobalForScopeChain
this article covers features introduced in spidermonkey 1.8.5 returns the global object for the active function on the context.
JS_GetInstancePrivate
added in spidermonkey 32 argv jsval * optional argument vector, used for error reporting.
JS_GetInternedStringChars
this article covers features introduced in spidermonkey 1.8.5 get the chars of an interned string.
JS_GetLatin1FlatStringChars
this article covers features introduced in spidermonkey 38 get the chars of a flat string.
JS_GetLatin1InternedStringChars
this article covers features introduced in spidermonkey 38 get the chars of an interned string.
JS_GetLatin1StringCharsAndLength
this article covers features introduced in spidermonkey 38 get the chars and the length of a string.
JS_GetNaNValue
syntax // added in spidermonkey 42 js::value js_getnanvalue(jscontext *cx); // obsolete since spidermonkey 42 jsval js_getnanvalue(jscontext *cx); name type description cx jscontext * a context.
JS_GetObjectPrototype
this article covers features introduced in spidermonkey 17 retrieves the original, canonical object.prototype for an object's global object.
JS_GetObjectRuntime
this article covers features introduced in spidermonkey 17 retrieve a pointer to the jsruntime of a specified object.
JS_GetOwnPropertyDescriptor
js::mutablehandle<jspropertydescriptor> desc); bool js_getownpropertydescriptorbyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandle<jspropertydescriptor> desc); bool js_getownucpropertydescriptor(jscontext *cx, js::handleobject obj, const char16_t *name, js::mutablehandle desc); // added in spidermonkey 45 name type description cx jscontext * a context.
JS_GetParentRuntime
this article covers features introduced in spidermonkey 31 retrieve a pointer to the parent jsruntime.
JS_GetPositiveInfinityValue
syntax // added in spidermonkey 42 js::value js_getpositiveinfinityvalue(jscontext *cx); js::value js_getnegativeinfinityvalue(jscontext *cx); // obsolete since spidermonkey 42 jsval js_getpositiveinfinityvalue(jscontext *cx); jsval js_getnegativeinfinityvalue(jscontext *cx); name type description cx jscontext * a context.
JS_GetProperty
rty(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandlevalue vp); bool js_getucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::mutablehandlevalue vp); bool js_getpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 name type description cx jscontext * a context.
JS_GetPropertyAttrsGetterAndSetter
jsbool js_getucpropertyattrsgetterandsetter(jscontext *cx, jsobject *obj, const jschar *name, size_t namelen, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); jsbool js_getpropertyattrsgetterandsetterbyid(jscontext *cx, jsobject *obj, jsid id, unsigned int *attrsp, jsbool *foundp, jspropertyop *getterp, jspropertyop *setterp); // added in spidermonkey 1.8.1 name type description cx jscontext * the context in which to perform the property lookup.
JS_GetPropertyDefault
this article covers features introduced in spidermonkey 1.8.5 finds a specified property and retrieves its value or provided default value.
JS_GetPropertyDescriptor
syntax bool js_getpropertydescriptor(jscontext *cx, js::handleobject obj, const char *name, js::mutablehandle<jspropertydescriptor> desc); // added in spidermonkey 31 bool js_getpropertydescriptorbyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandle<jspropertydescriptor> desc); name type description cx jscontext * a context.
JS_GetRegExpFlags
this article covers features introduced in spidermonkey 17 get the flags of the given regexp object.
JS_GetRegExpSource
this article covers features introduced in spidermonkey 17 get the source string of the given regexp object.
JS_GetReservedSlot
syntax // added in spidermonkey 42 js::value js_getreservedslot(jsobject *obj, uint32_t index); void js_setreservedslot(jsobject *obj, uint32_t index, js::value v); // obsolete since spidermonkey 42 jsval js_getreservedslot(jsobject *obj, uint32_t index); void js_setreservedslot(jsobject *obj, uint32_t index, jsval v); name type description obj jsobject * an object that has reserved slots.
JS_GetScopeChain
js_getscopechain has been removed in spidermonkey 1.8.7 with no identical replacement.
JS_GetStringCharAt
this article covers features introduced in spidermonkey 38 return a specified character from a string.
JS_GetStringChars
syntax jschar * js_getstringchars(jsstring *str); // obsolete since jsapi 1.8.5 const jschar * js_getstringcharsz(jscontext *cx, jsstring *str); // added in spidermonkey 1.8.2, obsolete since jsapi 33 name type description cx jscontext * (in js_getstringcharsz only) a context.
JS_GetStringCharsAndLength
this article covers features introduced in spidermonkey 1.8.5 get the characters and the length of a string.
JS_GetStringEncodingLength
this article covers features introduced in spidermonkey 1.8.5 get the length of a javascript string in bytes.
JS_GetTwoByteExternalStringChars
this article covers features introduced in spidermonkey 38 get the chars of an external string.
JS_HasOwnProperty
this article covers features introduced in spidermonkey 45 determine whether a javascript object has a specified own property.
JS_HasProperty
syntax bool js_hasproperty(jscontext *cx, js::handleobject obj, const char *name, bool *foundp); bool js_hasucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *vp); bool js_haspropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 name type description cx jscontext * a context.
JS_IdArrayGet
this article covers features introduced in spidermonkey 17 get the item of a jsidarray.
JS_IdArrayLength
this article covers features introduced in spidermonkey 17 get the length of a jsidarray.
JS_IdToProtoKey
this article covers features introduced in spidermonkey 31 convert a js id to a jsprotokey.
JS_InitCTypesClass
this article covers features introduced in spidermonkey 1.8.5 initialize the ctypes object on a global object.
JS_InitClass
note: starting with spidermonkey 1.8, the prototype and constructor are set up with stub getter and setter operations instead of class operations.
JS_InitStandardClasses
these include all the standard ecmascript global properties defined in ecma 262-3 §15.1: array, boolean, date, decodeuri, decodeuricomponent, encodeuri, encodeuricomponent, error, eval, evalerror, function, infinity, isnan, isfinite, math, nan, number, object, parseint, parsefloat, rangeerror, referenceerror, regexp, string, syntaxerror, typeerror, undefined, and urierror as well as a few spidermonkey-specific globals, depending on compile-time options: escape, unescape, uneval, internalerror, script, xml, namespace, qname, file, generator, iterator, and stopiteration, as of spidermonkey 1.7.
JS_InternJSString
this article covers features introduced in spidermonkey 1.8.5 make a string to interned string.
JS_IsBuiltinEvalFunction
this article covers features introduced in spidermonkey 17 return whether the given function is the global eval function.
JS_IsBuiltinFunctionConstructor
this article covers features introduced in spidermonkey 17 return whether the given function is the global function constructor.
JS_IsConstructor
this article covers features introduced in spidermonkey 24 return whether the given function is a valid constructor.
JS_IsExtensible
this article covers features introduced in spidermonkey 1.8.5 query [[extensible]] properly of the given object.
JS_IsExternalString
this article covers features introduced in spidermonkey 17 determines whether or not the specified jsstring is an external string (that is, a string created by calling js_newexternalstring rather than js_newexternalstringwithclosure).
JS_IsGlobalObject
this article covers features introduced in spidermonkey 24 determine if given object is a global object.
JS_IsNative
this article covers features introduced in spidermonkey 17 determines if given jsobject is a native object.
JS_IsNativeFunction
this article covers features introduced in spidermonkey 17 return whether the given function object equals the specified native function.
JS_IterateCompartments
this article covers features introduced in spidermonkey 17 iterate over compartments and call the specified callback function on every compartment.
JS_LeaveCompartment
this article covers features introduced in spidermonkey 24 note: the preferred way of changing a context's current compartment is using jsautocompartment.
JS_LeaveCrossCompartmentCall
this article covers features introduced in spidermonkey 1.8.1 js_leavecrosscompartmentcall has been removed in bug 786068.
JS_LinkConstructorAndPrototype
this article covers features introduced in spidermonkey 17 set up ctor.prototype = proto and proto.constructor = ctor with the right property flags.
JS_LooselyEqual
this article covers features introduced in spidermonkey 1.8.1 determine whether two javascript values are equal in the sense of the == operator.
JS_MakeStringImmutable
description a string's characters can never be changed, but spidermonkey uses two string optimization techniques behind the scenes: a growable string (see js_newgrowablestring ) has a buffer that the javascript engine can reallocate so that concatenating it with another string is much faster.
JS_NewCompartmentAndGlobalObject
this article covers features introduced in spidermonkey 1.8.1 js_newcompartmentandglobalobject has been removed in bug 755186.
JS_NewDateObject
this article covers features introduced in spidermonkey 1.8.5 creates a new date object instance for the given time and date.
JS_NewDateObjectMsec
this article covers features introduced in spidermonkey 1.8.5 creates a new date object instance, configured to represent the date and time indicated by the specified time in milliseconds since the unix epoch.
JS_NewExternalString
added in spidermonkey 17 type int (js_newexternalstringwithclosure only) indicates which string finalizer callback the javascript engine should use (later) to free the string buffer chars.
JS_NewPlainObject
this article covers features introduced in spidermonkey 38 creates a new plain javascript object.
JS_NewScriptObject
(the name "js_newscriptobject" suggests that the script object is freshly allocated; this was the case in older versions of the api, but now the script object is allocated along with the jsscript itself.) (some temporary scripts used internally by spidermonkey do not have script objects allocated for them; such scripts are not accessible via jsapi.) see also the jsapi user guide contains example code using compiled scripts.
JS_NewUCString
note: js_newstring() was removed in spidermonkey 1.8.5.
JS_ObjectIsDate
this article covers features introduced in spidermonkey 1.8.5 determines if a specified object is a date object.
JS_ObjectIsRegExp
this article covers features introduced in spidermonkey 17 determine if a specified object is a regexp.
JS_ParseJSON
this article covers features introduced in spidermonkey 1.8.6 parse a string using the json syntax described in ecmascript 5 and return the corresponding value.
JS_PropertyStub
syntax bool js_propertystub(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); bool js_strictpropertystub(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp, js::objectopresult &result); // added in spidermonkey 45 bool js_strictpropertystub(jscontext *cx, js::handleobject obj, js::handleid id, bool strict, js::mutablehandlevalue vp); // obsolete since jsapi 39 bool js_resolvestub(jscontext *cx, js::handleobject obj, js::handleid id, bool *resolvedp); // obsolete since jsapi 37 bool js_deletepropertystub(jscontext *cx, js::handleobject obj, js::handleid id, bool *succeeded); //...
JS_PutEscapedString
this article covers features introduced in spidermonkey 1.8.5 write a string into buffer with escaping.
JS_ReportErrorNumber
andnumberuc(jscontext *cx, unsigned flags, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); void js_reporterrornumberucarray(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, const char16_t **args); // added in spidermonkey 19 name type description cx jscontext * the context in which to report the error.
JS_ReportOutOfMemory
syntax void js_reportoutofmemory(jscontext *cx); void js_reportallocationoverflow(jscontext *cx); // added in spidermonkey 1.8 name type description cx jscontext * the context in which to report the error.
JS_SET_TRACING_DETAILS
this article covers features introduced in spidermonkey 1.8 set debugging information about the next thing to be traced by a jstracer.
JS_ScheduleGC
this article covers features introduced in spidermonkey 17 set nextscheduled parameter of gc.
JS_SealObject
as of spidermonkey 1.8.5, js_sealobject has been removed from the jsapi, because ecmascript 5 includes a "seal" concept (namely, that of object.seal) which is quite different from that of js_sealobject.
JS_SetAllNonReservedSlotsToUndefined
this article covers features introduced in spidermonkey 24 assign undefined to all of the object's non-reserved slots.
JS_SetCheckObjectAccessCallback
in spidermonkey 1.8.1 and later, use js_setruntimesecuritycallbacks instead.
JS_SetCompartmentNameCallback
this article covers features introduced in spidermonkey 17 set callback function to name each compartment.
JS_SetDefaultLocale
this article covers features introduced in spidermonkey 24 set and reset the default locale for the ecmascript internationalization api.
JS_SetDestroyCompartmentCallback
this article covers features introduced in spidermonkey 17 set the callback function for each compartment being destroyed.
JS_SetErrorReporter
like all other spidermonkey callbacks, the error reporter callback must not throw a c++ exception.
JS_SetExtraGCRoots
this article covers features introduced in spidermonkey 1.8 register externally maintained gc roots.
JS_SetGCParametersBasedOnAvailableMemory
this article covers features introduced in spidermonkey 31 adjust performance parameters related to garbage collection based on available memory.
JS_SetInterruptCallback
this article covers features introduced in spidermonkey 31 set a callback function that is automatically called periodically while javascript code runs.
JS_SetObjectPrincipalsFinder
in spidermonkey 1.8.1 or later, use js_setruntimesecuritycallbacks instead.
JS_SetParent
applications that use spidermonkey's security features typically use the parent relation to determine both (a) what security principals are attached to the currently executing script; and (b) what security principals are attached to the object being accessed.
JS_SetPrincipalsTranscoder
in spidermonkey 1.8.1 or later, use js_setruntimesecuritycallbacks instead.
JS_SetProperty
syntax bool js_setproperty(jscontext *cx, js::handleobject obj, const char *name, js::handlevalue v); bool js_setucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, js::handlevalue v); bool js_setpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::handlevalue v); // added in spidermonkey 1.8.1 name type description cx jscontext * pointer to a js context from which to derive runtime information.
JS_SetVersionForCompartment
this article covers features introduced in spidermonkey 31 configure a jscompartment to use a specific version of the javascript language.
JS_StringEqualsAscii
this article covers features introduced in spidermonkey 1.8.5 compare flat string and ascii string.
JS_StringHasBeenInterned
this article covers features introduced in spidermonkey 17 determine if string is interned.
JS_StringHasLatin1Chars
this article covers features introduced in spidermonkey 38 determine if a string's characters are stored as latin1.
JS_StringIsFlat
this article covers features introduced in spidermonkey 38 determine if a string is flattened.
JS_ThrowStopIteration
this article covers features introduced in spidermonkey js1.8 throw a stopiteration exception.
JS_TracerInit
this article covers features introduced in spidermonkey 1.8 note: in jsapi 12, the macro js_tracer_init has been replaced by the function js_tracerinit initialize a jstracer for object graph tracing.
JS_ValueToId
syntax bool js_valuetoid(jscontext *cx, js::handlevalue v, js::mutablehandleid idp); bool js_stringtoid(jscontext *cx, js::handlestring s, js::mutablehandleid idp); // added in spidermonkey 38 bool js_indextoid(jscontext *cx, uint32_t index, js::mutablehandleid idp); // added in spidermonkey 17 bool js_charstoid(jscontext* cx, js::twobytechars chars, js::mutablehandleid idp); // added in spidermonkey 24 void js::protokeytoid(jscontext *cx, jsprotokey key, js::mutablehandleid idp); // added in spidermonkey 38 name type description cx jscontext * a context.
JS_freeop
this article covers features introduced in spidermonkey 17 a wrapper for js_free.
JS_updateMallocCounter
this article covers features introduced in spidermonkey 17 decrement malloc counter.
OBJECT_TO_JSVAL
please use js::objectvalue/js::objectornullvalue instead in spidermonkey 45 or later.
PRIVATE_TO_JSVAL
please use js::privatevalue instead in spidermonkey 45 or later.
STRING_TO_JSVAL
please use js::stringvalue instead in spidermonkey 45 or later.
jsdouble
implementation note: spidermonkey has had several bugs involving details of floating-point arithmetic on various platforms.
Running Automated JavaScript Tests
most of the spidermonkey shell jobs, labeled sm(...), will include js shell runs of both jstests and jit-tests.
Running Parsemark
parsemark is a command-line testing utility for measuring parse/emit performance of the spidermonkey front-end.
SavedFrame
functiondisplayname either spidermonkey’s inferred name for this stack frame’s function, or null.
Mozilla Projects
spidermonkey: the mozilla javascript runtime standalone source code releases can be found on the releases page.
Mozilla internal string guide
used for http headers and for size-optimized storage in text node and spidermonkey strings.
PyXPCOM
related topics xpcom pydom: replace javascript with python python-spidermonkey ...
nsIDOMWindowUtils
this includes the text of the script and details about its internal representation in spidermonkey, and counts for how often and in what ways each operation in the script executed.
Mozilla
building spidermonkey with ubsan 1.
Debugger.Source - Firefox Developer Tools
spidermonkey constructs exactly one debugger.source for each underlying webassembly module per debugger instance.
Debugger-API - Firefox Developer Tools
the debugger interface mozilla’s javascript engine, spidermonkey, provides a debugging interface named debugger which lets javascript code observe and manipulate the execution of other javascript code.
Index - Firefox Developer Tools
17 debugger-api debugger, intermediate, intro, javascript, tools mozilla’s javascript engine, spidermonkey, provides a debugging interface named debugger which lets javascript code observe and manipulate the execution of other javascript code.
DOM allocation example - Firefox Developer Tools
it just contains a script that creates a large number of dom nodes: var toolbarbuttoncount = 20; var toolbarcount = 200; function getrandomint(min, max) { return math.floor(math.random() * (max - min + 1)) + min; } function createtoolbarbutton() { var toolbarbutton = document.createelement("span"); toolbarbutton.classlist.add("toolbarbutton"); // stop spidermonkey from sharing instances toolbarbutton[getrandomint(0,5000)] = "foo"; return toolbarbutton; } function createtoolbar() { var toolbar = document.createelement("div"); // stop spidermonkey from sharing instances toolbar[getrandomint(0,5000)] = "foo"; for (var i = 0; i < toolbarbuttoncount; i++) { var toolbarbutton = createtoolbarbutton(); toolbar.appendchild(toolbarbutton); } ...
Tree map view - Firefox Developer Tools
strings other: this includes internal spidermonkey objects.
Introduction - JavaScript
it is useful if you want to implement standards-compliant language features in your ecmascript implementation or engine (such as spidermonkey in firefox, or v8 in chrome).
JavaScript language resources - JavaScript
implementations spidermonkey - the javascript engine used in various mozilla products, including firefox; rhino - the javascript engine is written in java; tamarin - the actionscript virtual machine (used in the adobe® flash® player); other implementations (wikipedia).
The legacy Iterator protocol - JavaScript
the legacy iterator protocol was a spidermonkey-specific feature, which is removed in firefox 58+.
RangeError: precision is out of range - JavaScript
method firefox (spidermonkey) chrome, opera (v8) number.prototype.toexponential() 0 to 100 0 to 20 number.prototype.tofixed() -20 to 100 0 to 20 number.prototype.toprecision() 1 to 100 1 to 21 examples invalid cases 77.1234.toexponential(-1); // rangeerror 77.1234.toexponential(101); // rangeerror 2.34.tofixed(-100); // rangeerror 2.34.tofixed(1001); ...
RangeError: repeat count must be less than infinity - JavaScript
in firefox (spidermonkey) the maximum string size is 228 -1 (0xfffffff).
Functions - JavaScript
however, in the spidermonkey javascript engine, the serialized form of the function shows as if it has the name "anonymous".
Array.prototype.lastIndexOf() - JavaScript
math.min(n, len - 1) : len - math.abs(n); k >= 0; k--) { if (k in t && t[k] === searchelement) { return k; } } return -1; }; } again, note that this implementation aims for absolute compatibility with lastindexof in firefox and the spidermonkey javascript engine, including in several cases which are arguably edge cases.
Date.parse() - JavaScript
however, if the string is recognized as an iso format string and it contains invalid values, it will return nan in all browsers compliant with es5 and later: // iso string with invalid values new date('2014-25-23').toisostring(); // throws "rangeerror: invalid date" in all es5-compliant browsers spidermonkey's implementation-specific heuristic can be found in jsdate.cpp.
Date.prototype.toDateString() - JavaScript
in spidermonkey, this consists of the date portion (day, month, and year) followed by the time portion (hours, minutes, seconds, and time zone).
Date.prototype.toTimeString() - JavaScript
in spidermonkey, this consists of the date portion (day, month, and year) followed by the time portion (hours, minutes, seconds, and time zone).
Error.prototype.message - JavaScript
spidermonkey makes extensive use of the message property for exceptions.
EvalError - JavaScript
although ecma-262 specifies that evalerror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
RangeError - JavaScript
although ecma-262 specifies that rangeerror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
ReferenceError - JavaScript
although ecma-262 specifies that referenceerror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
RegExp.prototype.sticky - JavaScript
examples using a regular expression with the sticky flag var str = '#foo#'; var regex = /foo/y; regex.lastindex = 1; regex.test(str); // true regex.lastindex = 5; regex.test(str); // false (lastindex is taken into account with sticky flag) regex.lastindex; // 0 (reset after match failure) anchored sticky flag for several versions, firefox's spidermonkey engine had a bug with regard to the ^ assertion and the sticky flag which allowed expressions starting with the ^ assertion and using the sticky flag to match when they shouldn't.
SyntaxError - JavaScript
although ecma-262 specifies that syntaxerror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
TypeError - JavaScript
although ecma-262 specifies that typeerror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
URIError - JavaScript
although ecma-262 specifies that urierror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
WebAssembly.CompileError - JavaScript
although ecma-262 specifies that urierror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
WebAssembly.LinkError - JavaScript
although ecma-262 specifies that urierror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
WebAssembly.RuntimeError - JavaScript
although ecma-262 specifies that urierror should provide its own message property, in spidermonkey, it inherits error.prototype.message.
Property accessors - JavaScript
let foo = {unique_prop: 1}, bar = {unique_prop: 2}, object = {}; object[foo] = 'value' console.log(object[bar]) in the spidermonkey javascript engine, this string would be "[object object]".