Search completed in 0.90 seconds.
WebAssembly.RuntimeError - JavaScript
the webassembly.
runtimeerror object is the error type that is thrown whenever webassembly specifies a trap.
... constructor webassembly.
runtimeerror() creates a new webassembly.
runtimeerror object.
... instance properties webassembly.
runtimeerror.prototype.message error message.
...And 10 more matches
JS_NewRuntime
initializes the javascript
runtime.
... syntax js
runtime * js_new
runtime(uint32_t maxbytes, uint32_t maxnurserybytes = js::defaultnurserybytes, js
runtime *parent
runtime = nullptr); js
runtime * js_new
runtime(uint32_t maxbytes, jsusehelperthreads usehelperthreads, js
runtime *parent
runtime = nullptr); // deprecated since jsapi 32 name type description maxbytes uint32 maximum number of allocated bytes after which garbage collection is run.
...added in spidermonkey 38 parent
runtime js
runtime * the topmost parent or nullptr .
...And 9 more matches
JSRuntime
in the jsapi, js
runtime is the top-level object that represents an instance of the javascript engine.
... a program typically has only one js
runtime, even if it has many threads.
... the js
runtime is the universe in which javascript objects live; they can't travel to other js
runtimes.
...And 5 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
when debugging or, possibly, when trying to decide upon the best approach to solving a problem around timing and scheduling of tasks and microtasks, there are things about how the javascript
runtime operates under the hood that may be useful to understand.
...to understand where queuemicrotask() comes into play here, it's helpful to understand how the javascript
runtime operates when scheduling and running code.
...this allows the javascript
runtime to track the levels of recursion and the return of results through that recursion, but it also means that each time a function recurses, more memory is needed to create the new context.
...And 4 more matches
JS_DestroyRuntime
frees a javascript
runtime.
... syntax void js_destroy
runtime(js
runtime *rt); name type description rt js
runtime * the
runtime to destroy.
... description js_destroy
runtime frees the specified the javascript
runtime environment, rt.
...And 3 more matches
JS_GetRuntimePrivate
access a js
runtime field for application-specific data.
... syntax void * js_get
runtimeprivate(js
runtime *rt); void js_set
runtimeprivate(js
runtime *rt, void *data); name type description rt js
runtime * any js
runtime.
... data void * (in js_set
runtimeprivate) pointer to application-defined data to be associated with the
runtime rt.
...And 3 more matches
JS_GetParentRuntime
this article covers features introduced in spidermonkey 31 retrieve a pointer to the parent js
runtime.
... syntax js
runtime * js_getparent
runtime(jscontext *cx); name type description cx jscontext * the context to query.
... description js_getparent
runtime retrieves a pointer to the parent js
runtime of the
runtime for a specified jscontext.
...And 2 more matches
JS_GetRuntime
retrieves a pointer to the js
runtime.
... syntax js
runtime * js_get
runtime(jscontext *cx); name type description cx jscontext * the context to query.
... description js_get
runtime retrieves a pointer to the js
runtime with which a specified jscontext, cx, is associated.
...And 2 more matches
WebAssembly.RuntimeError() constructor - JavaScript
the webassembly.
runtimeerror() constructor creates a new webassembly
runtimeerror object — the type that is thrown whenever webassembly specifies a trap.
... syntax new webassembly.
runtimeerror(message, filename, linenumber) parameters message optional human-readable description of the error.
... examples creating a new
runtimeerror instance the following snippet creates a new
runtimeerror instance, and logs its details to the console: try { throw new webassembly.
runtimeerror('hello', 'somefile', 10); } catch (e) { console.log(e instanceof
runtimeerror); // true console.log(e.message); // "hello" console.log(e.name); // "
runtimeerror" console.log(e.filename); // "somefile" console.log(e.linenumber); // 10 console.log(e.columnnumber); // 0 console.log(e.stack); // returns the location where the code was run } speci...
...And 2 more matches
JS_GetObjectRuntime
this article covers features introduced in spidermonkey 17 retrieve a pointer to the js
runtime of a specified object.
... syntax js
runtime * js_getobject
runtime(jsobject *obj); name type description obj jsobject * the object to query.
... description js_getobject
runtime retrieves a pointer to the js
runtime for a specified jsobject.
... see also mxr id search for js_getobject
runtime bug 723286 ...
Zest runtimes
as zest is written in json it requires a
runtime in order to be evaluated.
... the following
runtimes are available: java https://github.com/mozilla/zest - this is the reference implementation the following
runtimes are planned or an an early stage of implementation: https://github.com/mozilla/zest/tree/master/js javascript https://github.com/darkowlzz/zest-runner https://github.com/darkowlzz/zest-cli - this is the zest-cli of js based runner.
... python no code available yet if you are interested in working on an existing or new zest
runtime then please get in touch via the zest group.
nsIXULRuntime
xpcom/system/nsixul
runtime.idlscriptable provides information about the xul
runtime to allow extensions and xul applications to determine information about the xul
runtime.
...to get an instance, use: var xul
runtime = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixul
runtime); method overview void invalidatecachesonrestart(); attributes attribute type description accessibilityenabled boolean if true, the accessibility service is running.
... example display the user's operating system in an alert box: var xul
runtime = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixul
runtime); alert(xul
runtime.os); see also nsixulappinfo - a related interface providing information about the host application, it's also implemented by xre/app-info.
Element.runtimeStyle - Web APIs
summary element.
runtimestyle is a proprietary property similar to htmlelement.style, except its styles, that have higher precedence and modification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
runtimestyle non-standardchrome no support noedge no support nofirefox no support noie full support 6opera no support nosafari no support ...
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
again note that the resulting dll filename must start with "np", so either call your project like this or rename the file later delete the .cpp and .h and readme files from the project and disk (if you did not create an empty project) copy the np
runtime sample plugin source code into the dir of the new vs project and add the files to the project using the vs gui (.cpp files to "source files", .h files to "header files", .rc file to "resource files").
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.
...they define which error to throw in case of a
runtime error.
... 144 jsprincipalstranscoder advanced, constructor, needsexample, reference, spidermonkey jsprincipalstranscoder is the type of a security callback that can be configured using js_setprincipalstranscoderjsapi 1.8 and earlier or js_set
runtimesecuritycallbacksadded in spidermonkey 1.8.1.
...And 46 more matches
JSAPI User Guide
the spidermonkey universe in order to run any javascript code in spidermonkey, an application must have three key elements: a js
runtime, a jscontext, and a global object.
...
runtimes.
... a js
runtime, or
runtime, is the space in which the javascript variables, objects, scripts, and contexts used by your application are allocated.
...And 13 more matches
Index - Archive of obsolete content
109 system/
runtime access to information about firefox's
runtime environment.
... 381 chromeless update [this project may not be active — check github https://github.com/mozilla/chromeless] 382 compiling the np
runtime sample plugin in visual studio add-ons, plugins no summary!
... 478 gre gecko, xul, xulrunner the framework for embedding mozilla technologies was at one point called the gre (gecko
runtime environment).
...And 7 more matches
Debugging on Mac OS X
debugging firefox on macos 10.14+ macos 10.14 introduced notarization and hardened
runtime features for improved application security.
... macos 10.15 went further, requiring applications to be notarized with hardened
runtime enabled in order to launch (ignoring workarounds.) when run on earlier macos versions, notarization and hardened
runtime settings have no effect.
...this is due to notarization requiring hardened
runtime to be enabled with the com.apple.security.get-task-allow entitlement disallowed.
...And 7 more matches
Monitoring plugins - Archive of obsolete content
this component then reports the plugin
runtime using the observer service to anyone registered to receive the notifications.
...
runtime data the
runtime information reported is always in fractions of a second.
...it is therefore technically incorrect to say that the
runtime is a measure of cpu use, however, it is a good representation of overall resources being consumed by the plugin.
...And 6 more matches
Strict mode - JavaScript
function strict() { // because this is a module, i'm strict by default } export default strict; changes in strict mode strict mode changes both syntax and
runtime behavior.
... changes generally fall into these categories: changes converting mistakes into errors (as syntax errors or at
runtime), changes simplifying how the particular variable for a given use of a name is computed, changes simplifying eval and arguments, changes making it easier to write "secure" javascript, and changes anticipating future ecmascript evolution.
...javascript sometimes makes this basic mapping of name to variable definition in the code impossible to perform until
runtime.
...And 6 more matches
How to embed the JavaScript engine
*/ static jsclass global_class = { "global", jsclass_global_flags, js_propertystub, js_deletepropertystub, js_propertystub, js_strictpropertystub, js_enumeratestub, js_resolvestub, js_convertstub, }; int main(int argc, const char *argv[]) { js
runtime *rt = js_new
runtime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
...script = "'hello'+'world, it is '+new date()"; const char *filename = "noname"; int lineno = 1; bool ok = js_evaluatescript(cx, global, script, strlen(script), filename, lineno, rval.address()); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroy
runtime(rt); js_shutdown(); return 0; } spidermonkey 31 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
... */ static jsclass global_class = { "global", jsclass_global_flags, js_propertystub, js_deletepropertystub, js_propertystub, js_strictpropertystub, js_enumeratestub, js_resolvestub, js_convertstub, nullptr, nullptr, nullptr, nullptr, js_globalobjecttracehook }; int main(int argc, const char *argv[]) { js_init(); js
runtime *rt = js_new
runtime(8l * 1024 * 1024, js_use_helper_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
...And 5 more matches
JSAPI reference
runtimes and contexts js_init added in spidermonkey 31 js_shutdown struct js
runtime js_new
runtimeobsolete since jsapi 52 js_destroy
runtime js_get
runtimeprivate js_set
runtimeprivate js_setnativestackquota added in spidermonkey 17 js_contextiteratorobsolete since jsapi 52 js_finish obsolete since jsapi 19 struct jscontext js_newcontext js_destroycontext js_destroycontextnogc js_se...
...tcontextcallback enum jscontextop js_get
runtime js_getparent
runtime added in spidermonkey 31 js_getobject
runtime added in spidermonkey 17 js_getcontextprivate js_setcontextprivate js_getsecondcontextprivate added in spidermonkey 17 js_setsecondcontextprivate added in spidermonkey 17 js_setinterruptcallback added in spidermonkey 31 js_getinterruptcallback added in spidermonkey 31 js_requestinterruptcallback added in spidermonkey 31 js_checkforinterrupt added in jsapi 45 js_destroycontextmaybegc obsolete since jsapi 14 js_setbranchcallback obsolete since javascript 1.9.1 js_setoperationcallback obsolete since jsapi 30 js_getoperationcallback obsolete since jsapi 30 js_triggeroperationcallback obsolete since jsapi 30 js_clearoperationcallback obsolete since ja...
...(for example, these apis support very smooth integration between the js garbage collector and other garbage collectors.) struct jstracer added in spidermonkey 1.8 js_tracechildren added in spidermonkey 1.8 js_trace
runtime added in spidermonkey 1.8 jsval_is_traceable added in spidermonkey 1.8 obsolete since jsapi 31 jsval_to_traceable added in spidermonkey 1.8 obsolete since jsapi 31 jsval_trace_kind added in spidermonkey 1.8 obsolete since jsapi 31 js_tracer_init added in spidermonkey 1.8 obsolete since jsapi 12 js_tracerinit added in spidermonkey 12 obsolete since jsapi 31 js_calltracer added in spidermo...
...And 5 more matches
Concurrency model and the event loop - JavaScript
runtime concepts the following sections explain a theoretical model.
... queue a javascript
runtime uses a message queue, which is a list of messages to be processed.
... at some point during the event loop, the
runtime starts handling the messages on the queue, starting with the oldest one.
...And 5 more matches
JavaScript modules - JavaScript
see node's ecmascript modules documentation for more details.disabled from version 12.0.0: this feature is behind the --experimental-modules
runtime flag.
...see node's ecmascript modules documentation for more details.disabled from version 8.5.0: this feature is behind the --experimental-modules
runtime flag.dynamic importchrome full support 63edge full support 79firefox full support 67 full support 67 no support 66 — 67disabled disabled from version 66 until version 67 (exclusive): this feature is behind the javascript.options.dynamicimport preference (needs to be set to true).
...see node's ecmascript modules documentation for more details.disabled from version 12.0.0: this feature is behind the --experimental-modules
runtime flag.available in workerschrome full support 80 full support 80 full support 67disabled disabled from version 67: this feature is behind the experimental web platform features preference.
...And 5 more matches
SpiderMonkey Internals: Thread Safety
note: starting in gecko 12.0, js
runtime is single-threaded.
...general background spidermonkey has a top-level struct, js
runtime, that acts as a container for everything else.
... a program typically has only one js
runtime, even if it has many threads.
...And 4 more matches
Mozilla internal string guide
the advantage of the user-defined literals is that the length of these strings is calculated at compile time, so the string does not need to be scanned at
runtime to determine its length.
... // call init(const char16_t*) - bad signature, will need to do
runtime length calculation inside init(l"start value"); // bad - l"..." is not portable!
... init(ns_convertasciitoutf16("start value").get()); // bad -
runtime ascii->utf-16 conversion!
...And 4 more matches
Scripting Java
in java, overload resolution is performed at compile time, while in rhino it occurs at
runtime.
... this difference is inevitable given javascript's use of dynamic typing as was discussed in chapter 2: since the type of a variable is not known until
runtime, only then can overload resolution occur.
....f(a[i])); } } when we compile and execute the program, it produces the output f(object) f(object) f(object) however, if we write a similar script var o = new packages.overload(); var a = [ 3, "hi", packages.overload ]; for (var i = 0; i != a.length; ++i) print(o.f(a[i])); and execute it, we get the output f(int) f(string) f(object) because rhino selects an overloaded method at
runtime, it calls the more specific type that matches the argument.
...And 3 more matches
Thread Sanitizer
it uses a compile-time instrumentation to check all non-race-free memory access at
runtime.
...# note: the use of this flag causes clang to automatically link the tsan
runtime :) export ldflags="-fsanitize=thread -fpic -pie" # these three are required by tsan ac_add_options --disable-jemalloc ac_add_options --disable-crashreporter ac_add_options --disable-elf-hack # keep symbols to symbolize tsan traces export moz_debug_symbols=1 ac_add_options --enable-debug-symbols ac_add_options --disable-install-strip # settings for an opt build ac_add_options --enable-optimize=...
...n/clang++" \ cflags="-fsanitize=thread -fpic -pie" \ cxxflags="-fsanitize=thread -fpic -pie" \ ldflags="-fsanitize=thread -fpic -pie" \ ../configure --disable-debug --enable-optimize="-o2 -gline-tables-only" --enable-llvm-hacks --disable-jemalloc make -j 8 fi using llvm symbolizer for faster/better traces by default, tsan traces are symbolized because otherwise, the
runtime suppression list wouldn't work.
...And 3 more matches
LiveConnect Overview - Archive of obsolete content
when a javascript object is sent to java, the
runtime engine creates a java wrapper of type jsobject; when a jsobject is sent from java to javascript, the
runtime engine unwraps it to its original javascript object type.
... note: because java is a strongly typed language and javascript is weakly typed, the javascript
runtime engine converts argument values into the appropriate data types for the other language when you use liveconnect.
...more recently, the classes have been distributed with sun's java
runtime; initially in the file "jaws.jar" in the "jre/lib" directory of the
runtime distribution (for jre 1.3), then in "plugin.jar" in the same location (jre 1.4 and up).
...And 2 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
123 dynamic typing codingscripting, glossary, programminglanguage dynamically-typed languages are those (like javascript) where the interpreter assigns variables a type at
runtime based on the variable's value at the time.
... 242 javascript codingscripting, glossary, javascript, l10n:priority javascript (or "js") is a programming language used most often for dynamic client-side scripts on webpages, but it is also often used on the server-side, using a
runtime such as node.js.
... 290 node.js glossary, infrastructure, javascript, node.js node.js is a cross-platform javascript
runtime environment that allows developers to build server-side and network applications with javascript.
...And 2 more matches
Index
in order to support multiple operating systems (os), it is based on a cross platform portability layer, called the netscape portable
runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multithreaded programming.
...such an operation might fail at
runtime if data elements are still being referenced.
...an application is able to modify the policy used at program
runtime, by using function calls to modify the set of enabled cipher suites.
...And 2 more matches
JS::PersistentRooted
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 js
runtime * the
runtime in which to add the root.
...added in spidermonkey 38 void init(jscontext* cx, t initial) void init(js
runtime* rt) void init(js
runtime* rt, t initial) void reset() reset the value to initial value of the type.
...they are registered with the js
runtime itself, without locking, so they require a full jscontext to be initialized, not one of its more restricted superclasses.
...And 2 more matches
JS_GetSecurityCallbacks
syntax /* added in spidermonkey 17 */ void js_setsecuritycallbacks(js
runtime *rt, const jssecuritycallbacks *callbacks); const jssecuritycallbacks * js_getsecuritycallbacks(js
runtime *rt); /* obsolete since jsapi 13 */ jssecuritycallbacks * js_setcontextsecuritycallbacks(jscontext *cx, jssecuritycallbacks *callbacks); jssecuritycallbacks * js_get
runtimesecuritycallbacks(js
runtime *rt); jssecuritycallbacks * js_set
runtimesecuritycallbacks(js
runtime *rt, jssecuritycallbacks *callbacks); name type description rt js
runtime * a
runtime to get/set the security callbacks.
... callbacks const jssecuritycallbacks * a pointer to the new callbacks for the
runtime.
... description js_setsecuritycallbacks sets the
runtime's security callbacks to callbacks.
...And 2 more matches
JS_SetGCCallback
syntax void js_setgccallback(js
runtime *rt, jsgccallback cb, void *data); jsgccallback js_setgccallback(jscontext *cx, jsgccallback cb); // obsolete since jsapi 13 jsgccallback js_setgccallbackrt(js
runtime *rt, jsgccallback cb); // obsolete since jsapi 13 name type description cx jscontext * (for the old js_setgccallback) any jscontext.
... the gc callback of the associated js
runtime is set.
... rt js
runtime * the js
runtime for which to set the gc callback.
...And 2 more matches
Source code directories overview - Archive of obsolete content
this code is also known by the names, "netlib" and "necko." nsprpub contains c code for the cross platform "c"
runtime library.
... the "c"
runtime library contains basic non-visual c functions to allocate and deallocate memory, get the time and date, read and write files, handle threads and handling and compare strings across all platforms.
... this code is also known by the name, "nspr" and "netscape portable
runtime".
... xreis the xul
runtime engine.
GRE - Archive of obsolete content
the framework for embedding mozilla technologies was at one point called the gre (gecko
runtime environment).
... this embedding framework allows applications to locate a compatible gecko
runtime and embed it without knowing in advance where that
runtime will be installed.
... the xre project, which means "xul
runtime environment", has been replaced by xulrunner.
...this prevents dynamically finding a compatible gre at
runtime.
Server-side web frameworks - Learn web development
performance of the framework/programming language: usually "speed" is not the biggest factor in selection because even relatively slow
runtimes like python are more than "good enough" for mid-sized sites running on moderate hardware.
... deno (javascript) deno is a simple, modern, and secure javascript/typescript
runtime and framework built on top of chrome v8 and rust.
... deno is powered by tokio — a rust-based asynchronous
runtime which lets it serve web pages faster.
... one of the differentiators for asp.net is that it is built on the common language
runtime (clr), allowing programmers to write asp.net code using any supported .net language (c#, visual basic, etc.).
JS::Add*Root
syntax bool js::addvalueroot(jscontext *cx, js::heap<js::value> *vp); bool js::addstringroot(jscontext *cx, js::heap<jsstring *> *rp); bool js::addobjectroot(jscontext *cx, js::heap<jsobject *> *rp); bool js::addnamedvalueroot(jscontext *cx, js::heap<js::value> *vp, const char *name); bool js::addnamedvaluerootrt(js
runtime *rt, js::heap<js::value> *vp, const char *name); bool js::addnamedstringroot(jscontext *cx, js::heap<jsstring *> *rp, const char *name); bool js::addnamedobjectroot(jscontext *cx, js::heap<jsobject *> *rp, const char *name); bool js::addnamedscriptroot(jscontext *cx, js::heap<jsscript *> *rp, const cha...
... rt js
runtime * the
runtime in which to add the new root.
... an entry for rp is added to the garbage collector's root set for the js
runtime associated with cx (or, in js::addnamedvaluerootrt, the
runtime rt).
... the name parameter, if present and non-null, is stored in the js
runtime's root table entry along with rp.
JS_ContextIterator
cycles through the js contexts associated with a particular js
runtime.
... syntax jscontext * js_contextiterator(js
runtime *rt, jscontext **iterp); name type description rt js
runtime * the
runtime to walk.
... description js_contextiterator steps through the set of contexts associated with the
runtime rt.
... example the following code snippet illustrates how to cycle through the contexts for a given
runtime: jscontext *acx; jscontext *iterp = null; int i = 0; while ((acx = js_contextiterator(rt, &iterp)) != null) { printf("%d ", ++i); } see also mxr id search for js_contextiterator ...
JS_DumpNamedRoots
enumerate all the named roots in a
runtime.
... syntax void js_dumpnamedroots(js
runtime *rt, void (*dump)(const char *name, void *rp, void *data), void *data); name type description rt js
runtime * pointer to a js
runtime from which to dump named roots.
...it calls the dump function once for each named root in the given
runtime rt.
... in pseudocode: /* pseudocode explanation of what js_dumpnamedroots does */ void js_dumpnamedroots(js
runtime *rt, dumpfn dump, void *data) { for each (root in rt->namedroots) dump(root.name, root.address, data); } callback syntax dump is a pointer to a function provided by the application.
JS_Finish
same function as js_destroy
runtime.
... syntax void js_finish(js
runtime *rt); name type description rt js
runtime * pointer to a js
runtime to destroy.
...use js_destroy
runtime instead.
... see also js_destroy
runtime bug 805080 ...
JS_GC
syntax void js_gc(jscontext *cx); // added in spidermonkey 52 void js_gc(js
runtime *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 js
runtime * the
runtime to for which to perform garbage collection.
... obsolete since jsapi 50 description js_gc performs garbage collection of js objects, strings and other internal data structures that are no longer reachable in the specified context or
runtime.
... see also mxr id search for js_gc js_maybegc bug 737364 -- changed to js
runtime bug 1283855 -- changed to jscontext ...
JS_Init
once this method has succeeded, it is safe to call js_new
runtime and other jsapi methods.
... in the past js_init once had the signature js
runtime * js_init(uint32_t maxbytes) and was used to create new js
runtime instances.
... this meaning has been removed; use js_new
runtime instead.
... see also mxr id search for js_init js_new
runtime js_shutdown bug 896124 ...
JS_NewContext
syntax jscontext * js_newcontext(js
runtime *rt, size_t stackchunksize); name type description rt js
runtime * parent
runtime for the new context.
... javascript objects, functions, strings, and numbers may be shared among the contexts in a js
runtime, but they cannot be shared across js
runtimes.
... description js_newcontext creates a new jscontext in the
runtime rt.
...before a js
runtime may be destroyed, all the jscontexts associated with it must be destroyed.
JS_SetCheckObjectAccessCallback
set the
runtime-wide check-object-access callback.
...in spidermonkey 1.8.1 and later, use js_set
runtimesecuritycallbacks instead.
... syntax jscheckaccessop js_setcheckobjectaccesscallback( js
runtime *rt, jscheckaccessop acb); name type description rt js
runtime * the
runtime to configure.
... description js_setcheckobjectaccesscallback sets the
runtime-wide check-object-access callback, which is used as the fallback jsclass.checkaccess method for all classes that leave the checkaccess field null.
JS_SetPrincipalsTranscoder
set the
runtime-wide principals transcoder callback.
...in spidermonkey 1.8.1 or later, use js_set
runtimesecuritycallbacks instead.
... syntax jsprincipalstranscoder js_setprincipalstranscoder(js
runtime *rt, jsprincipalstranscoder px); name type description rt js
runtime * the
runtime to configure.
... description js_setprincipalstranscoder sets a
runtime-wide callback which the javascript engine uses to serialize and deserialize principals.
JS_ShutDown
free all resources used by the js engine, not associated with specific
runtimes.
... syntax void js_shutdown(void); description destroys all free-standing resources allocated by spidermonkey, not associated with any js
runtime, jscontext, or other structure.
... this method should be called after all other jsapi data has been properly cleaned up: every js
runtime created with js_new
runtime must have been destroyed with js_destroy
runtime, every jscontext created with js_newcontext must have been destroyed with js_destroycontext, and so on.
...see also mxr id search for js_shutdown js_init js_new
runtime js_destroy
runtime js_newcontext js_destroycontext ...
SpiderMonkey 31
js_init is a new function which must be used to initialize the js engine before any js
runtimes are created or other jsapi methods are called.
... this method pairs with the existing (currently non-mandatory) js_shutdown method, which uninitializes the js engine after all
runtimes have been destroyed.
... this is performed by calling the new js_init method before creating any
runtimes or contexts and before compiling, evaluating, or executing any js script.
... once this method has been successfully called, it's okay to call js_new
runtime and all the other existing spidermonkey apis as usual.
Using RAII classes in Mozilla
we have two techniques for avoiding this problem: static analysis and
runtime assertions.
... this involves just one addition to the class, and the inclusion of attributes.h: class moz_raii nsautoscriptblocker {...} this is much simpler and more thorough than the guardobject
runtime assertions, but are unfortunately currently only run on mac os x and linux builds, which means that guardobject should still be used for raii guards which may be used in windows-only code.
... assertions
runtime assertions offer two benefits - firstly, they run on windows, which the static analysis currently does not, and secondly they will run locally, even if the developer did not choose to run static analysis locally.
... the static analys
runtime assertions are often better at catching bugs in code that a developer is currently working on than static analysis, which he might not think to run.
An Overview of XPCOM
these pieces, known as components, are then assembled back together at
runtime.
...the difference here is that a "helloworld" application in xpcom finds this screen-printing functionality at
runtime and never has to know about stdio when it's compiled.
... the nsisupports base interface two fundamental issues in component and interface-based programming are component lifetime, also called object ownership, and interface querying, or being able to identify which interfaces a component supports at
runtime.
... in xpcom, all classes derive from the nsisupports interface, so all objects are nsisupports but they are also other, more specific classes, which you need to be able to find out about at
runtime.
Building the WebLock UI
the xpcom interfaces and tools you've used have been general, cross-platform, and available in the gecko
runtime environment or in any gecko-based application after mozilla 1.2 (when the gre began to be used).
...that piece of ui - which needs to be dynamically inserted into the browser at
runtime - is described in overlaying new user interface into mozilla.
...overlays are xul files that register themselves to be dynamically inserted into the appropriate parts of the browser ui at
runtime.
...this id is the same one used by the <statusbar/> in navigator.xul, which means that the overlay mechanism will merge the new ui here (i.e., the weblock statusbarpanel) and the ui already defined within that browser <statusbar/> at
runtime.
Troubleshooting XPCOM components registration
note that even your version of msvc may matter; your test machine may not have the c
runtime libraries (msvcr70.dll / msvcp70.dll for msvc 7.0, and similarly named files for 7.1 and 8.0) available.
...it may then be necessary for the stub to locate the newer
runtime libraries for the other files it loads.
... if you compiled the component with msvc 8.0 (2005) and are attempting to use it on a windows xp machine or later, it will need a manifest embedded to find the
runtime.
... you may be able build your component using use_static_libs=1 in order to remove c
runtime library dependencies.
Intl.Collator.supportedLocalesOf() - JavaScript
the intl.collator.supportedlocalesof() method returns an array containing those of the provided locales that are supported in collation without having to fall back to the
runtime's default locale.
... return value an array of strings representing a subset of the given locale tags that are supported in collation without having to fall back to the
runtime's default locale.
...the language tags returned are those for which the
runtime supports a locale in collation that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
... examples using supportedlocalesof assuming a
runtime that supports indonesian and german but not balinese in collation, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is not used with indonesian and a specialized german for indonesia is unlikely to be supported.
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
the intl.datetimeformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the
runtime's default locale.
... return value an array of strings representing a subset of the given locale tags that are supported in date and time formatting without having to fall back to the
runtime's default locale.
...the language tags returned are those for which the
runtime supports a locale in date and time formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
... examples using supportedlocalesof assuming a
runtime that supports indonesian and german but not balinese in date and time formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to date and time formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.DisplayNames.supportedLocalesOf() - JavaScript
the intl.displaynames.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the
runtime's default locale.
... return value an array of strings representing a subset of the given locale tags that are supported in date and time formatting without having to fall back to the
runtime's default locale.
...the language tags returned are those for which the
runtime supports a locale in date and time formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
... examples using supportedlocalesof assuming a
runtime that supports indonesian and german but not balinese in date and time formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to date and time formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.ListFormat.supportedLocalesOf() - JavaScript
the intl.listformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the
runtime's default locale.
... return value an array of strings representing a subset of the given locale tags that are supported in date and time formatting without having to fall back to the
runtime's default locale.
...the language tags returned are those for which the
runtime supports a locale in date and time formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
... examples using supportedlocalesof assuming a
runtime that supports indonesian and german but not balinese in date and time formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to date and time formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.NumberFormat.supportedLocalesOf() - JavaScript
the intl.numberformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in number formatting without having to fall back to the
runtime's default locale.
... return value an array of strings representing a subset of the given locale tags that are supported in number formatting without having to fall back to the
runtime's default locale.
...the language tags returned are those for which the
runtime supports a locale in number formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
... examples using supportedlocalesof assuming a
runtime that supports indonesian and german but not balinese in number formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to number formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.PluralRules.supportedLocalesOf() - JavaScript
the intl.pluralrules.supportedlocalesof() method returns an array containing those of the provided locales that are supported in plural formatting without having to fall back to the
runtime's default locale.
... return value an array of strings representing a subset of the given locale tags that are supported in plural formatting without having to fall back to the
runtime's default locale.
...the language tags returned are those for which the
runtime supports a locale in plural formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
... examples using supportedlocalesof() assuming a
runtime that supports indonesian and german but not balinese in plural formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to plural formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
the intl.relativetimeformat.supportedlocalesof() method returns an array containing those of the provided locales that are supported in date and time formatting without having to fall back to the
runtime's default locale.
... return value an array of strings representing a subset of the given locale tags that are supported in date and time formatting without having to fall back to the
runtime's default locale.
...the language tags returned are those for which the
runtime supports a locale in date and time formatting that the locale matching algorithm used considers a match, so that it wouldn't have to fall back to the default locale.
... examples using supportedlocalesof assuming a
runtime that supports indonesian and german but not balinese in date and time formatting, supportedlocalesof returns the indonesian and german language tags unchanged, even though pinyin collation is neither relevant to date and time formatting nor used with indonesian, and a specialized german for indonesia is unlikely to be supported.
Intl - JavaScript
if the locales argument is not provided or is undefined, the
runtime's default locale is used.
...the
runtime compares it against the locales it has available and picks the best one available.
... two matching algorithms exist: the "lookup" matcher follows the lookup algorithm specified in bcp 47; the "best fit" matcher lets the
runtime provide a locale that's at least, but possibly more, suited for the request than the result of the lookup algorithm.
... if the application doesn't provide a locales argument, or the
runtime doesn't have a locale that matches the request, then the
runtime's default locale is used.
Chrome Authority - Archive of obsolete content
when the manifest implementation is complete the
runtime loader will actually prevent modules from require()ing modules that are not listed in the manifest.
...if the scanner fails to see a require entry, the manifest will not include that entry, and (once the implementation is complete) the
runtime code will get an exception.
... for example, none of the following code will be matched by the manifest scanner, leading to exceptions at
runtime, when the require() call is prohibited from importing the named modules: // all of these will fail!
Index of archived content - Archive of obsolete content
marks places/favicon places/history platform/xpcom preferences/event-target preferences/service remote/child remote/parent stylesheet/style stylesheet/utils system/child_process system/environment system/events system/
runtime system/unload system/xul-app tabs/utils test/assert test/harness test/httpd test/runner test/utils ui/button/action ui/button/toggle ui/frame ui/id ui/sidebar ui/toolbar util/array ...
... homeprovider.jsm homestorage nativewindow contextmenus doorhanger menu toast notifications.jsm pageactions.jsm prompt.jsm
runtimepermissions.jsm snackbars.jsm sound.jsm tab addons developer guide code snippets creating a user interface firefox hub walkthrough initialization and cleanup prerequisites walkthrough webextensions for firefox for android ...
... locked config settings other mozilla customization pages protecting mozilla's registry.dat file automatically handle failed asserts in debug builds blackconnect blackwood bonsai bookmark keywords build building transformiix standalone chromeless compiling the np
runtime sample plugin in visual studio creating a firefox sidebar extension creating a microsummary creating a mozilla extension adding the structure conclusion enabling the behavior - retrieving tinderbox status enabling the behavior - updating the status bar panel enabling the behavior - up...
XULRunner FAQ - Archive of obsolete content
not particularly; xulrunner is a internet technology
runtime.
... how does xulrunner compare to other
runtimes like java or .net (or python or ...)?
...it is not meant to be a full-featured
runtime; this allows xulrunner to maintain a smaller footprint and simpler deployment strategy than generic full-featured
runtimes.
Getting started with Svelte - Learn web development
highly interactive pages or complex visualizations: if you are building data-visualizations that need to display a large number of dom elements, the performance gains that come from a framework with no
runtime overhead will ensure that user interactions are snappy and responsive.
... being a compiler, svelte can extend html, css, and javascript, generating optimal javascript code without any
runtime overhead.
...ent='width=device-width,initial-scale=1'> <title>svelte app</title> <link rel='icon' type='image/png' href='/favicon.png'> <link rel='stylesheet' href='/global.css'> <link rel='stylesheet' href='/build/bundle.css'> <script defer src='/build/bundle.js'></script> </head> <body> </body> </html> the minified version of bundle.js weighs a little more than 3kb, which includes the "svelte
runtime" (just 300 lines of javascript code) and the app.svelte compiled component.
Chrome registration
the chrome registry the gecko
runtime maintains a service known as the chrome registry that provides mappings from chrome package names to the physical location of chrome packages on disk.
...each line is parsed individually; if the line is parsable the chrome registry takes the action identified by that line, otherwise the chrome registry ignores that line (and prints a warning message in the
runtime error console).
...the value is taken from the nsixul
runtime os and xpcomabi values (concatenated with an underscore).
Log.jsm
error other
runtime errors or unexpected conditions.
... warn use of deprecated apis, poor use of api, 'almost' errors, other
runtime situations that are undesirable or unexpected, but not necessarily "wrong".
... info interesting
runtime events (startup/shutdown).
Introduction to NSPR
the netscape portable
runtime (nspr) api allows compliant applications to use system facilities such as threads, thread synchronization, i/o, interval timing, atomic operations, and several other low-level services in a platform-independent manner.
...other systems are not thread-aware, and their
runtime libraries not thread-safe (most versions of unix).
...at this time, the only safe solutions are to turn off preemption (a
runtime decision) or to preempt global threads only.
PRLinger
the pr_sockopt_linger socket option, with a value represented by a structure of type prlinger, makes it possible to change this default as follows: if polarity is set to pr_false, pr_close returns immediately, but if there are any data remaining in the socket send buffer, the
runtime attempts to deliver the data to the peer.
... if polarity is set to pr_true and linger is set to 0 (pr_interval_no_wait), the
runtime aborts the connection when it is closed and discards any data remaining in the socket send buffer.
... if polarity is set to pr_true and linger is nonzero, the
runtime lingers when the socket is closed.
PR_FreeLibraryName
syntax #include <prlink.h> void pr_freelibraryname(char *mem); parameters the function has this parameter: mem a reference to a character array that was previously allocated by the dynamic library
runtime.
... description this function deletes the storage allocated by the
runtime in the functions described previously.
... it is important to use this function to rather than calling directly into malloc in order to isolate the
runtime's semantics regarding storage management.
PR_PushIOLayer
some subtle ramifications: the ownership of the storage pointed to by the caller's layer argument is relinquished to the
runtime.
... accessing the object via the pointer is not permitted while the
runtime has ownership.
...if the original container was allocated using a different mechanism than used by the
runtime, the default calling of the layer's destructor by the
runtime will fail pr_createiolayerstub is provided to allocate layer objects and template implementations).
An overview of NSS Internals
in order to support multiple operating systems (os), it is based on a cross platform portability layer, called the netscape portable
runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multithreaded programming.
...such an operation might fail at
runtime if data elements are still being referenced.
...an application is able to modify the policy used at program
runtime, by using function calls to modify the set of enabled cipher suites.
NSS FAQ
does nss require netscape portable
runtime (nspr)?
... to provide cross-platform support, nss utilizes netscape portable
runtime (nspr) libraries as a portability interface and implementation that provides consistent cross-platform semantics for network i/o and threading models.
...more information about nspr may be found at netscape portable
runtime.
Invariants
if !js_isrunning(cx) && cx->globalobject == null, then cx->compartment == cx->
runtime->defaultcompartment.
... locks "are we holding the
runtime-wide gc lock?" is a static yes or no for almost every line of code.
...some nameexpressions might refer to a variable or global; or might at
runtime turn out to reference another object property, due to with, or a variable that isn't in the source code at all but was injected into a local scope by eval.
JS::Remove*Root
syntax void removevalueroot(jscontext *cx, js::heap<js::value> *vp); void removestringroot(jscontext *cx, js::heap<jsstring *> *rp); void removeobjectroot(jscontext *cx, js::heap<jsobject *> *rp); void removescriptroot(jscontext *cx, js::heap<jsscript *> *rp); void removevaluerootrt(js
runtime *rt, js::heap<js::value> *vp); void removestringrootrt(js
runtime *rt, js::heap<jsstring *> *rp); void removeobjectrootrt(js
runtime *rt, js::heap<jsobject *> *rp); void removescriptrootrt(js
runtime *rt, js::heap<jsscript *> *rp); name type description cx jscontext * the context from which to remove the root.
... rt js
runtime * the
runtime from which to remove the root.
... the entry for vp/rp is removed from the root set for the js
runtime associated with the context cx.
JS_DumpHeap
syntax bool js_dumpheap(js
runtime *rt, file *fp, void* startthing, jsgctracekind kind, void *thingtofind, size_t maxdepth, void *thingtoignore); name type description cx jscontext * pointer to a js context.
... every jscontext is permanently associated with a js
runtime; each js
runtime contains a gc heap.
...when null, dump all things reachable from the
runtime roots.
JS_GetDefaultFreeOp
this article covers features introduced in spidermonkey 17 return default jsfreeop for the
runtime.
... syntax jsfreeop * js_getdefaultfreeop(js
runtime *rt); name type description rt js
runtime * a pointer to the
runtime.
... description js_getdefaultfreeop returns default jsfreeop for the
runtime.
JS_SetCompartmentNameCallback
syntax void js_setcompartmentnamecallback(js
runtime *rt, jscompartmentnamecallback callback); name type description cx js
runtime * the
runtime to set the callback function.
... callback function typedef void (* jscompartmentnamecallback)(js
runtime *rt, jscompartment *compartment, char *buf, size_t bufsize); name type description cx js
runtime * the
runtime of the compartments.
...if the
runtime has no jscompartmentnamecallback, a compartment will be named "<unknown>"</unknown>.
JS_SetDestroyCompartmentCallback
syntax void js_setdestroycompartmentcallback(js
runtime *rt, jsdestroycompartmentcallback callback); name type description cx js
runtime * the
runtime to set the callback function.
... callback function typedef void (* jsdestroycompartmentcallback)(jsfreeop *fop, jscompartment *compartment); name type description cx js
runtime * the
runtime of the compartments.
... description js_setdestroycompartmentcallback sets callback function which will be called when sweeping each compartment of the
runtime, before deleting the compartment.
JS_SetErrorReporter
syntax jserrorreporter js_geterrorreporter(js
runtime *rt); jserrorreporter js_seterrorreporter(js
runtime *rt, jserrorreporter er); name type description cx js
runtime * pointer to a js
runtime whose errors should be reported via your function.
...you can work around this by using the js_set
runtimeprivate and js_get
runtimeprivate methods.
... example code with error handling omitted: class myrequest { public: void execute() { auto rt = js_new
runtime(memlimit); js_set
runtimeprivate(rt, this); js_seterrorreporter(rt, &myrequest::dispatcherror); // execute js } void onerror(const std::string& error) { // handle error } static void dispatcherror( jscontext* ctx, const char* message, jserrorreport* report) { auto rt = js_get
runtime(ctx); auto rt_userdata = js_get
runtimeprivate(rt); if (rt_userdata) { auto req = static_cast<myrequest*>(rt_userdata); req->onerror(message); } } }; see also mxr id search for js_geterrorreporter mxr id search for js_seterrorreport...
JS_SetObjectPrincipalsFinder
set the
runtime-wide object-principals-finder callback.
...in spidermonkey 1.8.1 or later, use js_set
runtimesecuritycallbacks instead.
... syntax jsobjectprincipalsfinder js_setobjectprincipalsfinder(js
runtime *rt, jsobjectprincipalsfinder fop); name type description rt js
runtime * the
runtime to configure.
Shell global objects
if (s == '' && !o) return new o with eager standard classes, if (s == 'lazy' && !o) return new o with lazy standard classes evalinworker(str) evaluate str in a separate thread with its own
runtime.
... withsourcehook(hook, fun) set this js
runtime's lazy source retrieval hook (that is, the hook used to find sources compiled with compileoptions::lazy_source) to hook; call fun with no arguments; and then restore the
runtime's original hook.
... the
runtime can have only one source retrieval hook active at a time.
Mozilla Projects
nspr netscape portable
runtime (nspr) provides a platform-neutral api for system level and libc-like functions.
... spidermonkey: the mozilla javascript
runtime standalone source code releases can be found on the releases page.
...it uses a compile-time instrumentation to check all non-race-free memory access at
runtime.
XPCOM glue
in order to use xpcom, the embedding application first needs to find where the xpcom
runtime is located.
...then, the code must call xpcomgluestartup, which will dynamically link against the xpcom
runtime.
...at
runtime (not compile time) (in debug builds) or your module just won't load (in optimized builds).
nsIJSON
cx the javascript
runtime context to use to decode the string.
... cx the javascript
runtime context to use to encode the value.
... cx the javascript
runtime context to use to decode the string.
nsIXULAppInfo
to create an instance, use: var xulappinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); the nsixul
runtime interface is also implemented by "xre/app-info".
... it contains advanced information on the xul
runtime.
...mponents.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); alert("application version: " + info.version + "\n" + "gecko version: " + info.platformversion); example this example here uses nsixulappinfo to get the version of the current browser and then compares it: example - compare current browser version see also using nsixulappinfo nsixul
runtime get thunderbird version firefox code snippets ...
xptcall FAQ
the stubs (or impersonation) facility of xptcall allows for implementing a class which can, at
runtime, pretend to be any xpcom interface.
...xptcall needs to be able to call any valid xpcom method signature and it needs to specify this at
runtime.
...we could run the compiler at
runtime and dynamically build and load stubs.
Using Mozilla code in other projects
xulrunner a mozilla
runtime package that can be used to bootstrap xul and xpcom applications with ease.
... using mozilla components spidermonkey spidermonkey is the javascript
runtime engine used by mozilla projects.
... nspr the netscape portable
runtime provides a platform-neutral api for system level and libc-type functions.
Using Objective-C from js-ctypes
get a reference to a class class definitions are retrieved with the objc_getclass function, declared in /usr/include/objc/
runtime.h.
.../objc.h, class is defined as an opaque type by the following: typedef struct objc_class *class; in this example, we need the classnsspeechsynthesizer, which is retrieved with the following code: class nsspeechsynthesizer = objc_getclass("nsspeechsynthesizer"); registering a selector selectors can be registered and retrieved with sel_registername function, also declared in /usr/include/objc/
runtime.h.
... #include <objc/objc.h> #include <objc/
runtime.h> #include <objc/message.h> int main(void) { // nsspeechsynthesizer* synth = [[nsspeechsynthesizer alloc] initwithvoice: nil]; id nsspeechsynthesizer = (id)objc_getclass("nsspeechsynthesizer"); sel alloc = sel_registername("alloc"); sel initwithvoice = sel_registername("initwithvoice:"); id tmp = objc_msgsend(nsspeechsynthesizer, alloc); id synth = objc_msgsend(tmp, initwithvoice, n...
Debugger - Firefox Developer Tools
however, the onnewglobalobject method allows the api user to monitor all global object creation that occurs anywhere within the javascript system (the “js
runtime”, in spidermonkey terms), thereby escaping the capability-based limits.
...however, the addallglobalsasdebuggees method allows the api user to monitor all global object creation that occurs anywhere within the javascript system (the “js
runtime”, in spidermonkey terms), thereby escaping the capability-based limits.
...however, findallglobals allows the api user to find all global objects anywhere within the javascript system (the “js
runtime”, in spidermonkey terms), thereby escaping the capability-based limits.
Dominators - Firefox Developer Tools
they can just create and use objects, and when the objects are no longer needed, the
runtime takes care of cleaning up, and frees the memory the objects occupied.
... reachability in modern javascript implementations, the
runtime decides whether an object is no longer needed based on reachability.
... during garbage collection, the
runtime traverses the graph, starting at the root, and marks every object it finds.
Remote Debugging - Firefox Developer Tools
you can use the firefox developer tools on your desktop to debug web sites and web apps running in other browsers or
runtimes.
... the detailed instructions for connecting the developer tools are specific to the
runtime.
... you can connect the developer tools to gecko-based
runtimes like firefox desktop, firefox for android, and thunderbird.
RTCPeerConnection.setLocalDescription() - Web APIs
if the description is omitted, the webrtc
runtime tries to automatically do the right thing.
... implicit description if you don't explicity provide a session description, the webrtc
runtime will try to handle it correctly.
... if the signaling state is one of stable, have-local-offer, or have-remote-pranswer, the webrtc
runtime automatically creates a new offer and sets that as the new local description.
WebAssembly - JavaScript
providing facilities to handle errors that occur in webassembly via the webassembly.compileerror()/webassembly.linkerror()/webassembly.
runtimeerror() constructors.
... webassembly.
runtimeerror() error type that is thrown whenever webassembly specifies a trap.
... 52notes notes disabled in the firefox 52 extended support release (esr).opera android full support 43safari ios full support 11samsung internet android full support 7.0nodejs full support 8.0.0
runtimeerrorchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support ...
Signing an XPI - Archive of obsolete content
in my case it's c:\apps\nss-3.11.4\ get netscape portable
runtime 1.
... download the latest netscape portable
runtime from the mozilla ftp site: http://ftp.mozilla.org/pub/mozilla.org/nspr/releases/.
Dehydra Function Reference - Archive of obsolete content
include example include("map.js") // includes map.js into toplevel var map = {} include("map.js", map) // includes map.js into the map object require({version:, strict:, werror:, gczeal:}) require is used to set
runtime execution flags.
...if a property is not specified then it will not be passed to the
runtime.
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
veloper.mozilla.org/en/docs/getting_started_with_xulrunner defaultdirname={pf}\my app defaultgroupname=my app allownoicons=yes outputdir=..\build\output outputbasefilename=myapp-1.0-win32 ; setupiconfile= compression=lzma solidcompression=yes [languages] name: english; messagesfile: compiler:default.isl [components] name: main; description: my app; types: full compact custom; flags: fixed name:
runtime; description: xul runner
runtime; types: full custom [tasks] name: desktopicon; description: {cm:createdesktopicon}; groupdescription: {cm:additionalicons}; flags: unchecked name: quicklaunchicon; description: {cm:createquicklaunchicon}; groupdescription: {cm:additionalicons}; flags: unchecked [files] source: c:\develop\xulrunnerinstaller\myapp\myapp.exe; destdir: {app}; components: main; flags...
...rinstaller\myapp\chrome\*; excludes: .svn; destdir: {app}\chrome; components: main; flags: ignoreversion recursesubdirs createallsubdirs source: c:\develop\xulrunnerinstaller\myapp\defaults\*; excludes: .svn; destdir: {app}\defaults; components: main; flags: ignoreversion recursesubdirs createallsubdirs source: c:\develop\xulrunnerinstaller\myapp\xulrunner\*; destdir: {app}\xulrunner; components:
runtime; flags: ignoreversion recursesubdirs createallsubdirs ; note: don't use "flags: ignoreversion" on any shared system files [icons] name: {group}\my app; filename: {app}\myapp.exe name: {group}\{cm:uninstallprogram,xul explorer}; filename: {uninstallexe} name: {userdesktop}\my app; filename: {app}\myapp.exe; tasks: desktopicon name: {userappdata}\microsoft\internet explorer\quick launch\my app; fi...
Getting started with XULRunner - Archive of obsolete content
since we are not creating any binary xpcom components, we only need to download and install the xulrunner
runtime package, not the sdk.
...one way to achieve this is to run the following script everytime you want to install a new version: firefox_version=`grep -po "\d{2}\.\d+" /usr/lib/firefox/platform.ini` arch=`uname -p` xurl=https://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$firefox_version/
runtimes/xulrunner-$firefox_version.en-us.linux-$arch.tar.bz2 cd /opt sudo sh -c "wget -o- $xurl | tar -xj" sudo ln -s /opt/xulrunner/xulrunner /usr/bin/xulrunner sudo ln -s /opt/xulrunner/xpcshell /usr/bin/xpcshell you could also save this script to a file for convenience.
NPAPI plugin developer guide - Archive of obsolete content
to make your plugin scriptable from web pages, use np
runtime.
... plug-in basics how plug-ins are used plug-ins and helper applications how plug-ins work understanding the
runtime model plug-in detection how gecko finds plug-ins checking plug-ins by mime type overview of plug-in structure understanding the plug-in api plug-ins and platform independence windowed and windowless plug-ins the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug...
The First Install Problem - Archive of obsolete content
unless gecko does a pre-emptive scan upon startup for desirable plugins that are not in the browser's plugins directory first, the best way to solve this problem is to encourage plugin vendors to leave dlls (and xpt files, if applicable) in a location that gecko can discover at
runtime.
...the following write-up describes how a plugin installer can write keys to the win32 system registry to enable gecko-based browsers to discover the plugin at
runtime.
Plugins - Archive of obsolete content
to make your plugin scriptable from web pages, use np
runtime.
... scripting plugins (np
runtime) this reference describes the new cross-browser npapi extensions that let plugins be scriptable and also let them access the script objects in the browser.
ECMAScript 5 support in Mozilla - Archive of obsolete content
the javascript
runtime used in the latest versions of mozilla projects including both firefox and thunderbird has full support for ecmascript 5.1 features.
... this article covers the features supported by different versions of mozilla's javascript
runtime.
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
summary javascript (or "js") is a programming language used most often for dynamic client-side scripts on webpages, but it is also often used on the server-side, using a
runtime such as node.js.
... recently, javascript's popularity has expanded even further through the successful node.js platform—the most popular cross-platform javascript
runtime environment outside the browser.
A bird's-eye view of the Mozilla framework
object model at a glance mozilla dynamically loads and integrates core modules and xul packages into the
runtime environment on startup.
... once loaded, a module or package has full access to the xpcom objects of all the other modules in the
runtime environment.
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).
...also, all consumers of the jsapi must use these routines for allocating memory they plan to pass to the javascript
runtime.
The Firefox codebase: CSS Guidelines
using css variables adding new variables before adding new css variables, please consider the following questions: is the variable value changed at
runtime?
... if the answer is no and the value isn't changed at
runtime, then you likely don't need a css variable.
Using JavaScript code modules
the basic syntax of a resource url is as follows: resource://<alias>/<relative-path>/<file.js|jsm> the <alias> is an alias to a location, usually a physical location relative to the application or xul
runtime.
... there are multiple pre-defined aliases set up by the xul
runtime: app - alias to the location of the xul application gre - alias to the location of the xul
runtime the <relative-path> can be multiple levels deep and is always relative to the location defined by the <alias>.
mozilla::CondVar
does not incur a
runtime penalty in optimized builds.
...does not incur a
runtime penalty in optimized builds.
mozilla::Monitor
does not incur a
runtime penalty in optimized builds.
...does not incur a
runtime penalty in optimized builds.
mozilla::Mutex
does not incur a
runtime penalty in optimized builds.
...does not incur a
runtime penalty in optimized builds.
About NSPR
netscape portable
runtime (nspr) provides platform independence for non-gui operating system facilities.
...depending on the platform, the functions may be implemented almost entirely in the nspr
runtime or simply shims that call immediately into the host operating system's offerings.
NSPR's Position On Abrupt Thread Termination
this memo describes my position on a facility that is currently under discussion for inclusion in the netscape portable
runtime (nspr); the ability of a thread to abruptly exit.
...the implementation of either strategy within the nspr
runtime is not difficult.
PRDescIdentity
identities are allocated by the
runtime and are to be associated (by the layer implementor) with all file descriptors of that layer.
...the string is copied by the
runtime, and pr_getnameforidentity returns a reference to that copy.
PR_FindSymbol
if the lib parameter is null, all libraries known to the
runtime and the main program are searched in an unspecified order.
...the
runtime does nothing to ensure the continued validity of the symbol.
PR_FindSymbolAndLibrary
lib a reference to a location at which the
runtime will store the library in which the symbol was discovered.
... the identity returned from this function must be the target of a pr_unloadlibrary in order to return the
runtime to its original state.
PR_GetHostByAddr
this buffer is referenced by the
runtime during a call to pr_enumeratehostent.
...on output, this structure is filled in by the
runtime if the function returns pr_success.
PR_GetHostByName
this buffer is referenced by the
runtime during a call to pr_enumeratehostent.
...on output, this structure is filled in by the
runtime if the function returns pr_success.
PR_GetProtoByName
buffer a pointer to a scratch buffer for the
runtime to return result.
...on output, this structure is filled in by the
runtime if the function returns pr_success.
PR_GetProtoByNumber
buffer a pointer to a scratch buffer for the
runtime to return result.
...on output, this structure is filled in by the
runtime if the function returns pr_success.
PR_Initialize
description pr_initialize initializes the nspr
runtime and places nspr between the caller and the
runtime library.
... this allows main to be treated like any other function, signaling its completion by returning and allowing the
runtime to coordinate the completion of the other threads of the
runtime.
PR_LoadLibrary
the function suppresses duplicate loading if the library is already known by the
runtime.
... each call to pr_loadlibrary must be paired with a corresponding call to pr_unloadlibrary in order to return the
runtime to its original state.
PR_SetLibraryPath
registers a default library pathname with a
runtime.
...this may indicate that the function cannot allocate sufficient storage to make a copy of the path string description this function registers a default library pathname with the
runtime.
PR_SetThreadPrivate
the
runtime provides no protection for the private data.
... the destructor is called with the
runtime holding no locks.
PR_dtoa
decpt a pointer to a memory location where the
runtime will store the offset, relative to the beginning of the output string, of the conversion's decimal point.
... sign a location where the
runtime can store an indication that the conversion was of a negative value.
Using JSS
gather components setup your
runtime environment initialize jss in your application gather components you need the jss classes and the nspr, nss, and jss shared libraries.
... setup your
runtime environment you need to set some environment variables before building and running java applications with jss.
NSS 3.17 release notes
on windows, the new build variable use_static_rtl can be used to specify the static c
runtime library should be used.
... by default the dynamic c
runtime library is used.
Python binding for NSS
project information python-nss is a python binding for nss (network security services) and nspr (netscape portable
runtime).
... netscape portable
runtime.
Rhino optimization
the compilation time is minimized at the expense of
runtime performance.
...function call targets are speculatively pre-cached (based on the name used in the source) so that dispatching can be direct, pending
runtime confirmation of the actual target.
Creating JavaScript jstest reftests
if your test needs to use browser-specific features, either: make the test silently pass if those features aren't present; or write a mochitest instead (preferred); or at the top of the test, add the comment // skip-if(xul
runtime.shell), so that it only runs in the browser.
... if your test needs to use shell-specific features, like gc(), either: make the test silently pass if those features aren't present; or make it a jit-test (so that it never runs in the browser); or at the top of the test, add the comment // skip-if(!xul
runtime.shell), so that it only runs in the shell.
Bytecode Descriptions
throwsetconst operands: (uint32_t nameindex) throws a
runtime typeerror for invalid assignment to a const binding.
...if all bindings in a lexical scope are optimized into stack slots, then the
runtime environment objects for that scope are optimized away.
Garbage collection
implementation details write barriers have a
runtime cost, so spidermonkey tries to skip them when an incremental gc cycle is not active.
... sweeping todo generational gc todo gc statistics api you can access the light statistics the gc keeps at
runtime through the gc statistics api.
JS::CompileOffThread
compileoffthread(jscontext *cx, const js::readonlycompileoptions &options, size_t length); bool js::compileoffthread(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::offthreadcompilecallback callback, void *callbackdata); jsscript * js::finishoffthreadscript(jscontext *maybecx, js
runtime *rt, void *token); typedef void (*js::offthreadcompilecallback)(void *token, void *callbackdata); name type description cx / maybe jscontext * pointer to a js context from which to derive
runtime information.
... rt js
runtime * pointer to a js
runtime.
JSFreeOp
syntax jsfreeop(js
runtime *rt); name type description rt js
runtime * a
runtime to store in this structure.
... methods method description js
runtime *
runtime() const returns a pointer to js
runtime passed to constructor.
JS_AddFinalizeCallback
syntax bool js_addfinalizecallback(js
runtime *rt, jsfinalizecallback cb, void *data); // added in spidermonkey 38 (jsapi 32) void js_removefinalizecallback(js
runtime *rt, jsfinalizecallback cb); // added in spidermonkey 38 (jsapi 32) void js_setfinalizecallback(js
runtime *rt, jsfinalizecallback cb); // obsolete since jsapi 32 name type description rt js
runtime * the js
runtime for which to set the finalization callback.
...rt is the
runtime in which you specify the callback.
JS_Add*Root
an entry for rp is added to the garbage collector's root set for the js
runtime associated with cx (or, in js_addnamedrootrt, the
runtime rt).
... the name parameter, if present and non-null, is stored in the js
runtime's root table entry along with rp.
JS_GetLocaleCallbacks
syntax jslocalecallbacks * js_getlocalecallbacks(js
runtime *rt); void js_setlocalecallbacks(js
runtime *rt, jslocalecallbacks *callbacks); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
...the pointer must persist as long as the js
runtime.
JS_InternString
each js
runtime keeps a table of all existing interned strings.
...strings created with these functions are protected from garbage collection for the lifetime of the js
runtime.
JS_IterateCompartments
syntax void js_iteratecompartments(js
runtime *rt, void *data, jsiteratecompartmentcallback compartmentcallback); name type description cx js
runtime * the
runtime of the compartments to iterate over.
... callback function typedef void (*jsiteratecompartmentcallback)(js
runtime *rt, void *data, jscompartment *compartment); name type description cx js
runtime * the
runtime of the compartments.
JS_Lock
syntax void js_lock(js
runtime *rt); name type description rt js
runtime * pointer to the
runtime to lock.
... see also mxr id search for js_lock js_get
runtime, js_unlock ...
JS_LockGCThing
syntax jsbool js_lockgcthing(jscontext *cx, void *thing); // obsolete since jsapi 21 jsbool js_unlockgcthing(jscontext *cx, void *thing); // obsolete since jsapi 21 jsbool js_lockgcthingrt(js
runtime *rt, void *thing); jsbool js_unlockgcthingrt(js
runtime *rt, void *thing); name type description cx jscontext * a context.
... rt js
runtime * a
runtime.
JS_MapGCRoots
perform some action for each object in a js
runtime's gc root set.
... syntax uint32 js_mapgcroots(js
runtime *rt, jsgcrootmapfun map, void *data); callback syntax #define js_map_gcroot_next 0 /* continue mapping entries */ #define js_map_gcroot_stop 1 /* stop mapping entries */ #define js_map_gcroot_remove 2 /* remove and free the current entry */ typedef int (*jsgcrootmapfun)(void *rp, const char *name, void *data); description call js_mapgcroots to map the gc's roots table using map(rp, name, data).
JS_RemoveRootRT
syntax jsbool js_removerootrt(js
runtime *rt, void *rp); name type description rt js
runtime * pointer to the
runtime with which the root was registered.
...the entry for the gc thing rp points to is removed in the garbage collection hash table for the specified
runtime, rt.
JS_SetContextCallback
syntax void js_setcontextcallback(js
runtime *rt, jscontextcallback cxcallback, void *data); name type description rt js
runtime * pointer to a js
runtime.
...only one callback function may be specified per js
runtime.
JS_SetGCZeal
the gc zeal level of the associated js
runtime is set.
... description js_setgczeal sets the level of additional garbage collection to perform for a
runtime, for the purpose of finding or reproducing bugs.
JS_SetNativeStackQuota
syntax void js_setnativestackquota(js
runtime *cx, size_t systemcodestacksize, size_t trustedscriptstacksize = 0, size_t untrustedscriptstacksize = 0); name type description rt js
runtime * the
runtime.
... this function may only be called immediately after the
runtime is initialized and before any code is executed and/or interrupts requested.
JS_SetOperationCallback
syntax void js_setoperationcallback(jscontext *cx, jsoperationcallback callback); jsoperationcallback js_getoperationcallback(jscontext *cx); void js_triggeroperationcallback(js
runtime *rt); name type description cx jscontext * a context.
... rt js
runtime * the
runtime.
JS_SuspendRequest
since then, a js
runtime is tied to the thread that created it; it may not be accessed by any other thread.
...this allows the
runtime to perform garbage collection if needed and allows other threads to access objects that the calling thread had locked.
JS_TracerInit
syntax void js_tracerinit(jstracer *trc, js
runtime *rt, jstracecallback callback); name type description trc jstracer * the tracer to be initialized.
... description js_tracechildren and other tracing apis call the tracer callback for each traceable thing directly referenced by a particular object or
runtime structure.
JS_malloc
for js_realloc and js_free, if p is non-null, cx must be associated with the same
runtime as the context used to allocate p.
... that is, it is safe to allocate memory in one context and free it in another, as long as both contexts are in the same
runtime.
JS_updateMallocCounter
maxmallocbytes is initialized with maxbytes parameter of js_new
runtime, and could be configured later by calling js_getgcparameter with jsgc_max_malloc_bytes.
... see also mxr id search for js_updatemalloccounter changeset 88cfae411a2a js_new
runtime js_getgcparameter bug 517665 ...
SpiderMonkey 45
future direction jscontext and js
runtime are merging.
... (jscontext will be the only thing visible from within the api, there will be just one per
runtime, and inheriting from js
runtime.) spidermonkey embedders should be aware that mozilla has no plans to keep the jsapi stable for embedders.
Component Internals
this is how the api is used, for example, in the gecko
runtime environment (gre).
...at
runtime you can acquire any service or component by merely knowing a cid or contract id along with an iid.
Starting WebLock
there are many ways to do this: you can use standard ansi file i/o, or nspr (see the netscape portable
runtime library below for a brief description of nspr), or you can use the networking apis that gecko provides.
... the netscape portable
runtime library thenetscape portable
runtime library (nspr) is a platform-independent library that sits below xpcom.
Using XPCOM Components
the contractual arrangements that xpcom enforces open up the way to binary interoperability - to being able to access, use, and reuse xpcom components at
runtime.
...this service, which is defined in the basic nsisupports interface and implemented by all xpcom components, allows you to query and switch interfaces on a component as part of the
runtime object typing capabilities of xpcom.
Index
the xpcom interfaces and tools you've used have been general, cross-platform, and available in the gecko
runtime environment or in any gecko-based application after mozilla 1.2 (when the gre began to be used).
... 1111 nsixul
runtime interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference implemented by: @mozilla.org/xre/app-info;1.
RefPtr
o; and for concrete classes: refptr<nsfoo> foo; // class that implements nsifoo; refptr<bar> bar; // some random class that i want ref-counted but has nothing to do with xpcom: // just implement addref() and release() and it will work with refptr it is important that nscomptr is not used to hold a pointer to a concrete class since this can cause compile time errors or
runtime errors.
...what goes wrong at
runtime - uaf?
nsIFileProtocolHandler
warning: this restriction may not be enforced at
runtime!
...warning: this restriction may not be enforced at
runtime!
nsIPluginHost
native code only!instantiatedummyjavaplugin instantiate a "dummy" java plugin if a java plugin that supports np
runtime is installed.
...if the java plugin supports np
runtime and instantiation was successful, aowners instance will be non-null, if not, it will be null.
Reference Manual
in debug builds, if you subvert this invariant with one of the assignment forms that doesn't call queryinterface, nscomptr will assert at
runtime in the bad assignment.
...null-dereference safeguards an nscomptr will also assert at
runtime if you try to dereference it when it is void, e.g., nscomptr<nsifoo> foo; // note: default initialized to |0| foo->dosomething(); // ns_precondition: "you can't dereference a null nscomptr with operator->()" a similar precondition intervenes on behalf of operator*.
XPCOM ABI
bi and may be either: msvc - microsoft visual c++ n32 - irix 6 c++ compiler gcc2 - gnu c++ compiler 2.x gcc3 - gnu c++ compiler 3.x or 4.x sunc - sun c++ compiler ibmc - ibm c++ compiler for example: firefox built with the gnu c++ compiler 4.0.0 for the intel pentium processor would have xpcom abi of x86-gcc3 the xpcom abi string can be retrieved programmatically by using the nsixul
runtime interface.
... to retrieve the abi of your firefox or thunderbird, open the error console (accessible through tools | error console) and evaluate the following javascript code: components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixul
runtime) .xpcomabi if either the cpu architecture or the c++ compiler are unknown, the application wouldn't have an xpcom abi string and attempts to get it will result in error ns_error_not_available.
Plug-in Basics - Plugins
the next section, understanding the
runtime model, describes these stages in more detail.
... understanding the
runtime model plug-ins are dynamic code modules that are associated with one or more mime types.
Index - Firefox Developer Tools
they can just create and use objects, and when the objects are no longer needed, the
runtime takes care of cleaning up, and frees the memory the objects occupied.
... 93 ui tour the performance tool's ui consists of 4 main pieces: 94 waterfall 95 remote debugging tools, l10n:priority you can use the firefox developer tools on your desktop to debug web sites and web apps running in other browsers or
runtimes.
Index - Web APIs
1149 element.
runtimestyle api, needsbrowsercompatibility, needsexample, needsmobilebrowsercompatibility, non-standard, property element.
runtimestyle is a proprietary property similar to htmlelement.style, except its styles, that have higher precedence and modification.
... 4257 in depth: microtasks and the javascript
runtime environment api, advanced, guide, javascript, microtasks, asynchronous, queuemicrotask,
runtime when debugging or, possibly, when trying to decide upon the best approach to solving a problem around timing and scheduling of tasks and microtasks, there are things about how the javascript
runtime operates under the hood that may be useful to understand.
About JavaScript - JavaScript
javascript's dynamic capabilities include
runtime object construction, variable parameter lists, function variables, dynamic script creation (via eval), object introspection (via for ...
... 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.
Functions - JavaScript
for example, the following function definition defines myfunc only if num equals 0: var myfunc; if (num === 0) { myfunc = function(theobject) { theobject.make = 'toyota'; } } in addition to defining functions as described here, you can also use the function constructor to create functions from a string at
runtime, much like eval().
...there are often cases where a function needs to be called dynamically, or the number of arguments to a function vary, or in which the context of the function call needs to be set to a specific object determined at
runtime.
Using Promises - JavaScript
these get logged to the console by the node
runtime.
...m cluttering up your output—by adding a handler for the unhandledrejection event, like this: window.addeventlistener("unhandledrejection", event => { /* you might start here by adding code to examine the promise specified by event.promise and the reason in event.reason */ event.preventdefault(); }, false); by calling the event's preventdefault() method, you tell the javascript
runtime not to do its default action when rejected promises go unhandled.
Error - JavaScript
error objects are thrown when
runtime errors occur.
... description
runtime errors result in new error objects being created and thrown.
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
timezone the value provided for this property in the options argument; undefined (representing the
runtime's default time zone) if none was provided.
... warning: applications should not rely on undefined being returned, as future versions may return a string value identifying the
runtime’s default time zone instead.
WebAssembly.instantiate() - JavaScript
if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.
runtimeerror, depending on the cause of the failure.
... if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.
runtimeerror, depending on the cause of the failure.
Transitioning to strict mode - JavaScript
new
runtime errors javascript used to silently fail in contexts where what was done was an error.
...here are the rules to make your code strictness-neutral: write your code as strict and make sure no strict-only errors (from the above "new
runtime errors" section) are thrown.
Using templates and slots - Web Components
of composing different dom trees together.</span> <dl slot="attributes"> <dt>name</dt> <dd>the name of the slot.</dd> </dl> </element-details> <element-details> <span slot="element-name">template</span> <span slot="description">a mechanism for holding client- side content that is not to be rendered when a page is loaded but may subsequently be instantiated during
runtime using javascript.</span> </element-details> about that snippet, notice these points: the snippet has two instances of <element-details> elements which both use the slot attribute to reference the named slots "element-name" and "description" we put in the <element-details> shadow root .
...er.</span> <dl slot="attributes"> <dt>name</dt> <dd>the name of the slot.</dd> </dl> </element-details> <element-details> <span slot="element-name">template</span> <span slot="description">a mechanism for holding client- side content that is not to be rendered when a page is loaded but may subsequently be instantiated during
runtime using javascript.</span> </element-details> <script> customelements.define('element-details', class extends htmlelement { constructor() { super(); const template = document .getelementbyid('element-details-template') .content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(template.clon...
WebAssembly Concepts - WebAssembly
instance: a module paired with all the state it uses at
runtime including a memory, table, and set of imported values.
... writing webassembly directly do you want to build your own compiler, or your own tools, or make a javascript library that generates webassembly at
runtime?
Understanding WebAssembly text format - WebAssembly
to see why tables are needed, we need to first observe that the call instruction we saw earlier (see calling functions from other functions in the same module) takes a static function index and thus can only ever call one function — but what if the callee is a
runtime value?
...if the callee doesn’t have a matching signature (say an f32 is returned instead), a webassembly.
runtimeerror is thrown.
Compiling an Existing C Module to WebAssembly - WebAssembly
it seemed to work brilliantly: $ emcc -o3 -s wasm=1 -s extra_exported_
runtime_methods='["cwrap"]' \ -i libwebp \ webp.c \ libwebp/src/{dec,dsp,demux,enc,mux,utils}/*.c note: this strategy will not work with every c project.
... now you only need some html and javascript to load your new module: <script src="./a.out.js"></script> <script> module.on
runtimeinitialized = async _ => { const api = { version: module.cwrap('version', 'number', []), }; console.log(api.version()); }; </script> and you will see the correct version number in the output: note: libwebp returns the current version a.b.c as a hexadecimal number 0xabc.
WebAssembly
webassembly.
runtimeerror() creates a new webassembly
runtimeerror object.
... 52notes notes disabled in the firefox 52 extended support release (esr).opera android full support 43safari ios full support 11samsung internet android full support 7.0nodejs full support 8.0.0
runtimeerrorchrome full support 57edge full support 16firefox full support 52notes full support 52notes notes disabled in the firefox 52 extended support release (esr).ie no support ...
core/heritage - Archive of obsolete content
this.bark() : ''; }; since sdk apis may be interacting with untrusted code an extra security measures are required to guarantee that documented behavior can't be changed at
runtime.
remote/parent - Archive of obsolete content
// remote.js const { process } = require("sdk/remote/child"); const { processid } = require("sdk/system/
runtime"); process.port.on("fetchid", () => { process.port.emit("id", processid); }); // main.js const { processes, remoterequire } = require("sdk/remote/parent"); // load "remote.js" into every current and future process remoterequire("./remote.js", module); // for every current and future process processes.forevery(process => { // ask for the process id process.port.emit("fetchid"); // fi...
Developing for Firefox Mobile - Archive of obsolete content
net/xhr supported places/bookmarks not supported places/favicon not supported places/history not supported platform/xpcom supported preferences/service supported stylesheet/style supported stylesheet/utils supported system/environment supported system/events supported system/
runtime supported system/unload supported system/xul-app supported tabs/utils supported test/assert supported test/harness supported test/httpd supported test/runner supported test/utils supported ui/button/action not supported ui/button/toggle not supported ui/frame not ...
Alerts and Notifications - Archive of obsolete content
this works on windows, linux and (if growl is installed) mac os x: function popup(title, text) { try { components.classes['@mozilla.org/alerts-service;1'] .getservice(components.interfaces.nsialertsservice) .showalertnotification(null, title, text, false, '', null); } catch(e) { // prevents
runtime error on platforms that don't implement nsialertsservice } } if you need to display a comparable alert on a platform that doesn't support nsialertsservice, you can do this: function popup(title, msg) { var image = null; var win = components.classes['@mozilla.org/embedcomp/window-watcher;1'] .getservice(components.interfaces.nsiwindowwatcher) .o...
Extension Packaging - Archive of obsolete content
register an extension location using the windows registry external installers, such as the java
runtime, may wish to install application integration points as an extension, even if the application is not yet installed.
List of Mozilla-Based Applications - Archive of obsolete content
dimail mail client seems to use xulrunner instantbird im client xulrunner application itsnat java ajax component based web framework java software platform uses mozilla rhino javalikescript javascript extensible tooling framework uses nspr and spidermonkey jaxer ajax server jslibs javascript development
runtime environment uses spidermonkey (note: this is separate from the javascript library jslib) joybidder ebay auction tool standalone version uses xulrunner just (fr) audio a tool for setting temporal tags in audio documents jsdoc toolkit documentation tool uses mozilla rhino k-meleon gecko-based web browser for windows embeds gecko in mfc ...
jspage - Archive of obsolete content
n c){b[e]=$unlink(c[e]); }break;case"hash":b=new hash(c);break;case"array":b=[];for(var d=0,a=c.length;d<a;d++){b[d]=$unlink(c[d]);}break;default:return c;}return b;}var browser=$merge({engine:{name:"unknown",version:0},platform:{name:(window.orientation!=undefined)?"ipod":(navigator.platform.match(/mac|win|linux/i)||["other"])[0].tolowercase()},features:{xpath:!!(document.evaluate),air:!!(window.
runtime),query:!!(document.queryselector)},plugins:{},engines:{presto:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getelementsbyclassname)?950:925)); },trident:function(){return(!window.activexobject)?false:((window.xmlhttprequest)?((document.queryselectorall)?6:5):4);},webkit:function(){return(navigator.taintenabled)?false:((browser.features.xpath)?((browser.features.
Mozilla Application Framework in Detail - Archive of obsolete content
lable vector graphics (svg) rendering with support for a usable subset of the standard including all basic shapes, beziers, stroking and filling with opacity, and much of the dom; mathml rendering; an ecma-262 edition 3-compliant javascript engine; java integration with a bridge to xpcom, a java dom api, the open jvm integration (oji) facility, a java webclient api, and java plug-ins; nspr, a
runtime engine that provides platform-independence (across over a dozen platforms) for non-gui operating system facilities with support for threads, thread synchronization, normal file and network i/o, interval timing and calendar time, basic memory management (malloc and free) and shared library linking; psm, a set of libraries that perform cryptographic operations including setting up an ssl connectio...
Abc Assembler Tests - Archive of obsolete content
asm/abs_helper.as file which defines the following functions: start(summary:string):void - start a new test section described by summary end():void - test section finished compare_stricteq(name:string, expected:*, actual:*):void - compare the results of a testcase where name is the testcase name compare_typeerror(name:string, expected:*, actual:*):void - special function for comparing typeerrors (
runtimeerrors) - will only compare the first 22 chars of expected and actual so that test can be run in release and releasedebugger configurations.
Running Tamarin performance tests - Archive of obsolete content
avmplus command to use --avmname nickname for avm to use as column header --avm2name nickname for avm2 to use as column header --detail display results in 'old-style' format --raw output all raw test values -i --iterations number of times to repeat test -l --log logs results to a file -k --socketlog logs results to a socket server -r --
runtime name of the
runtime vm used, including switch info eg.
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
flash10576k tc-700740k tc-703655k known issues known failures in the acceptance testsuite include: number failures in testsuite when running on linux windows mobile system.privatebytes and -memstats privatebytes always returns 0 amd64 longjmp hack needs reengineering on non-windows platforms different
runtime errors when -dforcemir set in acceptance test run arm: math failures running with thumb or arm jit and interp.
The Joy of XUL - Archive of obsolete content
but these offerings were invariably proprietary, cost a substantial amount of money per developer, and had
runtime license fees that kept you humble and tightly tethered to the vendor.
XULRunner tips - Archive of obsolete content
gnons", true); pref("signon.expiremasterpassword", false); pref("signon.signonfilename", "signons.txt"); you also need to get an instance of the login manager service, which internally initializes the system: components.classes["@mozilla.org/login-manager;1"].getservice(components.interfaces.nsiloginmanager); using firefox to run xulrunner applications firefox 3 and up contain the xulrunner
runtime.
Mozilla release FAQ - Archive of obsolete content
here are a few that are specific to the mozilla newsgroups: fe = front end -- the part of mozilla that handles the interface be = back end -- the part of mozilla that does all the behind-the-scenes stuff nspr = netscape portable
runtime -- an abstraction layer over the local os gtk = a free gui toolkit native to unix qt = another gui toolkit xp = cross platform xpfe = cross-platform frontend based on nglayout m[number] = milestone release [number] (no longer used) i'm wondering how to do xxx with navigator 3.x...
2006-09-30 - Archive of obsolete content
developers should use this sample instead: http://developer.mozilla.org/en/docs/xpcom_glue discussions dynamic load overlay a short discussion about the possibilities of loading and unloading xul overlay
runtime reading binary data from file discusses about the code to read binary data from file how to build xpcom component on mac os x discusses about the make file code used to build xpcom components on mac os x successfully meetings none during this week.
External resources for plugin creation - Archive of obsolete content
in mozilla firefox, safari, opera, google chrome, qtwebkit and any other web browser that supports the "netscape plugin api", npapi articles, information, and tutorials npapi has been around a very long time, and there have been many attempts to distill down useful information on creating them: colonelpanic.net building a firefox plugin - part one: discusses the difference between npapi and np
runtime and summarizes the basic apis needed to create a plugin building a firefox plugin - part two: discusses the basic lifecycle of a npapi plugin building a firefox plugin - part three: discusses npobjects and how to use them memory management in npapi: discusses how memory is managed in a npapi plugin browser plugins vs extensions (add-ons) -- the difference: discusses the oft-misunderstood differen...
NPN_CreateObject - Archive of obsolete content
syntax #include <np
runtime.h> npobject *npn_createobject(npp npp, npclass *aclass); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin wants to instantiate the object.
NPN_Enumerate - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_enumerate(npp npp, npobject *npobj, npidentifier **identifiers, uint32_t *identifiercount); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_Evaluate - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_evaluate(npp npp, npobject *npobj, npstring *script, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin instance's window to evaluate the script in.
NPN_GetIntIdentifier - Archive of obsolete content
syntax #include <np
runtime.h> npidentifier npn_getintidentifier(int32_t intid); parameters the function has the following parameter: <tt>intid</tt> the integer for which an opaque identifier should be returned.
NPN_GetProperty - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_getproperty(npp npp, npobject *npobj, npidentifier propertyname, npvariant *result); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
NPN_GetStringIdentifier - Archive of obsolete content
syntax #include <np
runtime.h> npidentifier npn_getstringidentifier(const nputf8 *name); parameters the function has the following parameters: <tt>name</tt> the string for which an opaque identifier should be returned.
NPN_GetStringIdentifiers - Archive of obsolete content
syntax #include <np
runtime.h> void npn_getstringidentifiers(const nputf8 **names, int32_t namecount, npidentifier *identifiers); parameters the function has the following parameters: names an array of strings for which opaque identifiers should be returned.
NPN_HasMethod - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_hasmethod(npp npp, npobject *npobj, npidentifier methodname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_HasProperty - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_hasproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance is making the request.
NPN_IntFromIdentifier - Archive of obsolete content
syntax #include <np
runtime.h> int32_t npn_intfromidentifier(npidentifier identifier); parameters the function has the following parameter: <tt>identifier</tt> the integer identifier whose corresponding integer value should be returned.
NPN_Invoke - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_invoke(npp npp, npobject *npobj, npidentifier methodname, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the method on the object.
NPN_InvokeDefault - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_invokedefault(npp npp, npobject *npobj, const npvariant *args, uint32_t argcount, npvariant *result); parameters the function has the following parameters: npp the npp indicating which plugin wants to call the default method on the object.
NPN_ReleaseObject - Archive of obsolete content
syntax #include <np
runtime.h> void npn_releaseobject(npobject *npobj); parameters the function has the following parameter: <tt>npobj</tt> the npobject whose reference count should be decremented.
NPN_RemoveProperty - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_removeproperty(npp npp, npobject *npobj, npidentifier propertyname); parameters the function has the following parameters: npp the npp indicating which plugin instance is making the request.
NPN_SetException - Archive of obsolete content
syntax #include <np
runtime.h> void npn_setexception(npobject *npobj, const nputf8 *message); parameters the function has the following parameters: <tt>npobj</tt> the object on which the exception occurred.
NPN_SetProperty - Archive of obsolete content
syntax #include <np
runtime.h> bool npn_setproperty(npp npp, npobject *npobj, npidentifier propertyname, const npvariant *value); parameters the function has the following parameters: <tt>npp</tt> the npp indicating which plugin instance's is making the request.
NPN_UTF8FromIdentifier - Archive of obsolete content
syntax #include <np
runtime.h> nputf8 *npn_utf8fromidentifier(npidentifier identifier); parameters the function has the following parameter: <tt>identifier</tt> the string identifier whose corresponding string should be returned.
Security - Archive of obsolete content
ssl has been universally accepted on the world wide web for authenticated and encrypted communication between clients and servers.nspr release engineering guidethis paper is for engineers performing formal release for the netscape portable
runtime (nspr) across all platforms.ssl and tlsthe secure sockets layer (ssl) and transport layer security (tls) protocols are universally accepted standards for authenticated and encrypted communication between clients and servers.
JSException - Archive of obsolete content
summary the public class jsexception extends
runtimeexception java.lang.object | +----java.lang.throwable | +----java.lang.exception | +----java.lang.
runtimeexception | +----netscape.javascript.jsexception description jsexception is an exception which is thrown when javascript code returns an error.
JSObject - Archive of obsolete content
when a javascript object is sent to java, the
runtime engine creates a java wrapper of type jsobject; when a jsobject is sent from java to javascript, the
runtime engine unwraps it to its original javascript object type.
Archive of obsolete content
using firebug and jquery (screencast) note: this screencast is originally from: http://ejohn.org/blog/hacking-digg-w...ug-and-jquery/ using io timeout and interrupt on nt this technical memo is a cautionary note on using netscape portable
runtime's (nspr) io timeout and interrupt on windows nt 3.51 and 4.0.
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 contr...
Choosing the right approach - Learn web development
support 10.3samsung internet android full support 6.0nodejs full support 7.6.0 full support 7.6.0 full support 7.0.0disabled disabled from version 7.0.0: this feature is behind the --harmony
runtime flag.legend full support full support no support no supportuser must explicitly enable this feature.user must explicitly enable this feature.
Client-side tooling overview - Learn web development
others there are a number of other tool types available to use in the post-development stage, including code climate for gathering code quality metrics, the webhint browser extension for performing
runtime analysis of cross-browser compatibility and other checks, github bots for providing more powerful github functionality, updown for providing app uptime monitoring, and so many more!
Multiprocess on Windows
this is great for system interfaces, but for interfaces that are specific to gecko, it is better to register them at
runtime.
Benchmarking
this setting reduces build times significantly but comes with a serious hit to
runtime performance for any rust code (for example stylo and webrender).
Configuring Build Options
after enabling the crash reporter in your local build, you will need to run mach with the --enable-crash-reporter (note the extra dash) to enable it at
runtime, like so: `./mach run --enable-crash-reporter` ac_add_options --enable-warnings-as-errors this makes compiler warnings into errors which fail the build.
How Mozilla's build system works
for example, there is a tier for the netscape portable
runtime (nspr), one for the javascript engine, one for the core gecko platform, one for the xul app being built, and so on.
Eclipse CDT
isn't library_path for compile time, not
runtime, linking?) in the workspace preferences, you may want to go to "c/c++ > debug > gdb" and deselect "stop on startup at", so that eclipse won't automatically break in main() when it launches firefox for debugging.
Gecko Logging
the special pref logging.config.log_file can be set at
runtime to change the log file being output to.
Firefox and the "about" protocol
about:crashes lists all crashes, which happened during the
runtime of firefox (in case the user enabled the crash reporter) about:credits lists all contributors to the firefox project about:debugging switches to the developer tools debugging page, which allows you to debug add-ons, tabs and service workers about:devtools summarizes the developer tools and provides links to documentation for each tool about:downloads ...
Overview of Mozilla embedding APIs
this interface provides
runtime interface discovery and a reference counted memory model fashioned after the microsoft com iunknown interface.
How to Report a Hung Firefox
getservice(ci.nsiwindowmediator); let win = wm.getmostrecentwindow("navigator:browser"); let browser = win.gbrowser.selectedbrowser; if (browser.isremotebrowser) { browser.messagemanager.loadframescript('data:,let appinfo = components.classes["@mozilla.org/xre/app-info;1"];if (appinfo && appinfo.getservice(components.interfaces.nsixul
runtime).processtype != components.interfaces.nsixul
runtime.process_type_default) {components.utils.import("resource://gre/modules/ctypes.jsm");var zero = new ctypes.intptr_t(8);var badptr = ctypes.cast(zero, ctypes.pointertype(ctypes.int32_t));var crash = badptr.contents;}', true); } other techniques on os x if you use a nightly build (>= firefox 16), you can use activity monitor's "sample process" fe...
IME handling guide
if we can separate editor contents per paragraph, moving selection between paragraphs generates pseudo focus move, we can reduce this size and
runtime cost of contenteventhandler.
Implementing QueryInterface
a reference implementation of queryinterface ns_imethodimp nsmyimplementation::queryinterface( refnsiid aiid, void** ainstanceptr ) { ns_assertion(ainstanceptr, "queryinterface requires a non-null destination!"); // it's a logic error, not a
runtime error, to call me without any place to put my answer!
Services.jsm
for example, to obtain a reference to the preferences service: var prefsservice = services.prefs; provided service getters service accessor service interface service name androidbridge nsiandroidbridge 1 appinfo nsixulappinfo nsixul
runtime application information service appshell nsiappshellservice application shell service blocklist nsiblocklistservice blocklist service cache nsicacheservice cache service cache2 nsicachestorageservice cache storage service clipboard nsiclipboard clipboard console nsiconsoleservice error console service ...
Mozilla Framework Based on Templates (MFBT)
(this header will likely be further split up so that its functionality is less grab-bag.) debugging assertions.h provides assertion macros in implementing
runtime assertions and compile-time assertions.
DMD
options
runtime when you run mach run --dmd you can specify additional options to control how dmd runs.
about:memory
mb ── gfx-textures 0.00 mb ── gfx-tiles-waste 0 ── ghost-windows 109.22 mb ── heap-allocated 164 ── heap-chunks 1.00 mb ── heap-chunksize 114.51 mb ── heap-committed 164.00 mb ── heap-mapped 4.84% ── heap-overhead-ratio 1 ── host-object-urls 0.00 mb ── imagelib-surface-cache 5.27 mb ── js-main-
runtime-temporary-peak 0 ── page-faults-hard 203,349 ── page-faults-soft 274.99 mb ── resident 251.47 mb ── resident-unique 1,103.64 mb ── vsize some measurements of note are as follows.
Performance
valgrind valgrind is a tool that detects various memory-related problems at
runtime, including leaks.
Emscripten
compile the c/c++
runtimes of other languages into javascript, and then run code in those other languages in an indirect way (this has been done for python and lua)!
L20n Javascript API
these errors include: context.
runtimeerror, when an entity is missing or broken in all supported locales; in this case, l20n will show the the best available fallback of the requested entity in the ui: the source string as found in the resource, or the identifier.
NSPR Poll Method
the poll method operates on a single netscape portable
runtime (nspr) file descriptor, whereas pr_poll operates on a collection of nspr file descriptors.
Nonblocking IO In NSPR
introduction previously, all i/o in the netscape portable
runtime (nspr) was blocking (or synchronous).
Process Forking in NSPR
the threads provided in netscape portable
runtime (nspr) are implemented using different mechanisms on the various platforms.
I/O Functions
each type of layer has a unique identity, which is allocated by the
runtime.
Logging
to enable nspr logging and/or the debugging aids in your application, compile using the nspr debug build headers and
runtime.
PRIntervalTime
a platform-dependent type that represents a monotonically increasing integer--the nspr
runtime clock.
PRLibrary
a reference to such a structure can be returned by some of the functions in the
runtime and serve to identify a particular instance of a library.
PRStaticLinkTable
a static link table entry can be created by a client of the
runtime so that other clients can access static or dynamic libraries transparently.
PR_AcceptRead
this buffer must be large enough to receive amount bytes of data and two prnetaddr structures (thus allowing the
runtime to align the addresses as needed).
PR_CallOnce
from that time on, the client should consider the object read-only (or even opaque) and allow the
runtime to manipulate its content appropriately.
PR_ClearInterrupt
for example, the target thread may reach the agreed-on control point without providing an opportunity for the
runtime to notify the thread of the interrupt request.
PR EnumerateAddrInfo
on output, this structure is filled in by the
runtime if the result of the call is not null.
PR_EnumerateHostEnt
on output, this structure is filled in by the
runtime if the result of the call is greater than 0.
PR_GetLibraryName
storage for the result is allocated by the
runtime and becomes the responsibility of the caller.
PR_GetLibraryPath
storage for the result is allocated by the
runtime and becomes the responsibility of the caller.
PR_GetNameForIdentity
the string is copied by the
runtime, and pr_getnameforidentity returns a pointer to that copy.
PR_GetSpecialFD
description type prspecialfd is defined as follows: typedef enum prspecialfd{ pr_standardinput, pr_standardoutput, pr_standarderror } prspecialfd; #define pr_stdin pr_getspecialfd(pr_standardinput) #define pr_stdout pr_getspecialfd(pr_standardoutput) #define pr_stderr pr_getspecialfd(pr_standarderror) file descriptors returned by pr_getspecialfd are owned by the
runtime and should not be closed by the caller.
PR_GetUniqueIdentity
asks the
runtime to allocate a unique identity for a layer identified by the layer's name.
PR_Notify
when the notification occurs, the
runtime promotes a thread that is waiting on the monitor to a ready state.
PR_NotifyCondVar
when the notification occurs, the
runtime promotes a thread that is waiting on the condition variable to a ready state.
PR_STATIC_ASSERT
an expression which cannot be evaluated at compile time will cause a compiler error; see pr_assert for a
runtime alternative.
PR_SetError
the
runtime merely stores the value and returns it when requested.
PR_VersionCheck
compares the version of nspr assumed by the caller (the imported version) with the version being offered by the
runtime (the exported version).
PR_WaitCondVar
the value pr_interval_no_wait causes the thread to release the lock, possibly causing a rescheduling within the
runtime, then immediately attempt to reacquire the lock and resume.
NSPR
netscape portable
runtime (nspr) provides a platform-neutral api for system level and libc-like functions.
Introduction to Network Security Services
(note that nspr is a separate mozilla project; see netscape portable
runtime for details.) figure 1 relationships among core nss libraries and nspr naming conventions and special libraries windows and unix use different naming conventions for static and dynamic libraries: windows unix static .lib .a dynamic .dll .so or .sl in addition, windows has "import" libraries that bind to dynamic libraries.
JSS Provider Notes
at
runtime, the jre automatically verifies this signature whenever a jss class is loaded that implements a jce algorithm.
Mozilla-JSS JCA Provider notes
at
runtime, the jre automatically verifies this signature whenever a jss class is loaded that implements a jce algorithm.
JSS 4.4.0 Release Notes
jss 4.4.0 requires netswork security services (nss) 3.29.1 and netscape portable
runtime (nspr) 4.13.1 or newer.
NSS 3.14.2 release notes
if compiled on linux systems in 64-bit mode, nss will include
runtime detection to check if the platform supports aes-ni and pclmulqdq.
NSS 3.16 release notes
bug 956082: if the nss_sdb_use_cache environment variable is set, skip the
runtime test sdb_measureaccess.
NSS 3.35 release notes
if an application is linked at
runtime to a later version of nss, which no longer provides any of these apis, the application must handle the scenario gracefully.
NSS 3.37 release notes
with nss 3.37, this alternative implementation for linux has been enhanced to use the glibc function getentropy(), instead of reading from /dev/urandom directly, if the build and
runtime linux platform supports it.
NSS 3.46 release notes
hangs on windows x64 when building nss since changeset 9162c654d06915f0f15948fbf67d4103a229226f bug 1564875 - improve rebuilding with build.sh bug 1565243 - support tc_owner without email address in nss taskgraph bug 1563778 - increase max
runtime on mac taskcluster tools, ssl tests bug 1561591 - remove -wmaybe-uninitialized warning in tstclnt.c bug 1561587 - remove -wmaybe-uninitialized warning in lgattr.c bug 1561558 - remove -wmaybe-uninitialized warning in httpserv.c bug 1561556 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1561332 - ec.c:28 warning: comparison of integers of different signs: 'int' and 'unsigned long' ...
NSS Sample Code Sample1
etpublickey(seckeypublickey **pubkey); int wrapkey(pk11symkey *key, seckeypublickey *pubkey, secitem **data); // export raw key (unwrapped) do not use int rawexportkey(pk11symkey *key, secitem **data); char *mservername; // these items represent data that might be stored // in files or in a configuration file secitem *mwrappedenckey; secitem *mwrappedmackey; // these are the
runtime keys as loaded from the files pk11symkey *menckey; pk11symkey *mmackey; }; server::server(const char *servername) : mservername(0), mwrappedenckey(0), mwrappedmackey(0), menckey(0), mmackey(0) { // copy the server name mservername = pl_strdup(servername); } server::~server() { if (mservername) pl_strfree(mservername); if (mwrappedenckey) secitem_freeitem(mwrappedenckey, pr_true); ...
Overview of NSS
nss makes use of netscape portable
runtime (nspr), a platform-neutral open-source api for system functions designed to facilitate cross-platform development.
NSS troubleshooting
on this page, let's collect information on how to troubleshoot nss at
runtime.
Network Security Services
more information, extracting roots and their trust bits nss is built on top of netscape portable
runtime (nspr) netscape portable
runtime nspr project page.
Tutorial: Embedding Rhino
because the java -jar option preempts the rest of the classpath, we can't use that and access the counter class.) $ java -cp "js.jar;examples" org.mozilla.javascript.tools.shell.main js> defineclass("counter") js> c = new counter(7) [object counter] js> c.count 7 js> c.count 8 js> c.count 9 js> c.resetcount() js> c.count 0 counter's constructors the zero-argument constructor is used by rhino
runtime to create instances.
Small Footprint
similarly omitting -dno-e4x=true results in smalljs.jar that includes
runtime support for e4x.
Rhino overview
the value of this property can be determined at
runtime by calling the issecuritydomainrequired method of context.
Performance Hints
a constructor call like that indicates to the
runtime that a javascript array should be used for the first n entries of the array.
Future directions
no fundamental blockers currently exist, but ctypes is still using nspr's
runtime library loading facilities.
64-bit Compatibility
loading and storing native integers the harder cases to detect usually involve
runtime value truncation.
SpiderMonkey Internals
it runs automatically only when maxbytes (as passed to js_new
runtime) bytes of gc things have been allocated and another thing-allocation request is made.
JS::AutoSaveExceptionState
syntax js::autosaveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS::Call
ll(jscontext *cx, js::handlevalue thisv, js::handlevalue fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); bool js::call(jscontext *cx, js::handlevalue thisv, js::handleobject funobj, const js::handlevaluearray& args, js::mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS::CloneFunctionObject
syntax jsobject * js::clonefunctionobject(jscontext *cx, js::handleobject funobj); jsobject * js::clonefunctionobject(jscontext *cx, js::handleobject funobj, js::autoobjectvector &scopechain); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS::Compile
const js::readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::readonlycompileoptions &options, const char *filename, js::mutablehandlescript script); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS::CompileOptions
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::Construct
syntax bool js::construct(jscontext *cx, js::handlevalue fun, const js::handlevaluearray& args, js::mutablehandlevalue rval); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS::CreateError
levalue 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::PropertySpecNameToPermanentId
syntax bool js::propertyspecnametopermanentid(jscontext *cx, const char *name, jsid *idp); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS::ProtoKeyToId
syntax void js::protokeytoid(jscontext *cx, jsprotokey key, js::mutablehandleid idp); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS::Rooted
rt js
runtime * the
runtime in which to add the root.
JS::SetLargeAllocationFailureCallback
syntax void js::setlargeallocationfailurecallback(js
runtime *rt, js::largeallocationfailurecallback afc, void *data); name type description rt js
runtime * the js
runtime for which to set the gc callback.
JS::SetOutOfMemoryCallback
syntax void js::setoutofmemorycallback(js
runtime *rt, js::outofmemorycallback cb, void *data); name type description rt js
runtime * the js
runtime for which to set the gc callback.
JSCheckAccessOp
if a class leaves the checkaccess field null, a
runtime-wide object access callback is called instead; see js_setcheckobjectaccesscallback.
JSExnType
they define which error to throw in case of a
runtime error.
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.
JSObjectPrincipalsFinder
jsobjectprincipalsfinder is the type of a security callback that can be configured using js_setobjectprincipalsfinderjsapi 1.8 and earlier or js_set
runtimesecuritycallbacksadded in spidermonkey 1.8.1.
JSPrincipalsTranscoder
jsprincipalstranscoder is the type of a security callback that can be configured using js_setprincipalstranscoderjsapi 1.8 and earlier or js_set
runtimesecuritycallbacksadded in spidermonkey 1.8.1.
JSReserveSlotsOp
rather, within a js
runtime, every call to the same reserveslots hook must return the same value (excepting a few internal classes such as function, call, and block).
JS_AliasProperty
syntax jsbool js_aliasproperty(jscontext *cx, jsobject *obj, const char *name, const char *alias); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_BindCallable
syntax jsobject* js_bindcallable(jscontext *cx, js::handle<jsobject*> callable, js::handle<jsobject*> newthis); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_BufferIsCompilableUnit
syntax bool js_bufferiscompilableunit(jscontext *cx, js::handle<jsobject*> obj, const char *utf8, size_t length); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_CStringsAreUTF8
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_new
runtime.
JS_CallFunction
gv, jsval *rval); bool js_callfunctionname(jscontext *cx, jsobject *obj, const char *name, unsigned argc, jsval *argv, jsval *rval); bool js_callfunctionvalue(jscontext *cx, jsobject *obj, jsval fval, unsigned argc, jsval *argv, jsval *rval); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_CheckAccess
otherwise, if a
runtime-wide check-object-access callback has been installed by calling js_setcheckobjectaccesscallback, then that is called to perform the check.
JS_ClearDateCaches
syntax void js_cleardatecaches(jscontext *cx); name type description cx jscontext * pointer to a javascript context from which to derive
runtime information.
JS_CloneFunctionObject
syntax jsobject * js_clonefunctionobject(jscontext *cx, jsobject *funobj, jsobject *parent); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_CompileScript
&options, js::mutablehandlescript script); bool js_compileucscript(jscontext *cx, js::handleobject obj, const char16_t *chars, size_t length, const js::compileoptions &options, js::mutablehandlescript script); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_ConstructObject
cx is a pointer to a context associated with the
runtime in which to create the new object.
JS_ConvertArgumentsVA
syntax bool js_convertargumentsva(jscontext *cx, const js::callargs &args, const char *format, va_list ap); bool js_convertargumentsva(jscontext *cx, unsigned argc, jsval *argv, const char *format, va_list ap); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_DecompileFunction
syntax jsstring * js_decompilefunction(jscontext *cx, js::handle<jsfunction*> fun); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_DeepFreezeObject
syntax bool js_deepfreezeobject(jscontext *cx, js::handle<jsobject*> obj); name type description cx js
runtime * the context.
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_DeleteElement2
renamed to js_deleteelement in jsapi 39 syntax bool js_deleteelement2(jscontext *cx, js::handleobject obj, uint32_t index, bool *succeeded); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_DeleteProperty
; 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 information.
JS_DeleteProperty2
eleteucproperty2(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_DropExceptionState
syntax void js_dropexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_GET_CLASS
syntax #ifdef js_threadsafe #define js_get_class(cx,obj) js_getclass(cx, obj) #else #define js_get_class(cx,obj) js_getclass(obj) #endif parameter type description cx jscontext * any context associated with the
runtime in which obj exists.
JS_GetArrayPrototype
syntax jsobject * js_getarrayprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive
runtime information.
JS_GetClass
syntax const jsclass * js_getclass(jsobject *obj); name type description cx jscontext * any context associated with the
runtime in which obj exists.
JS_GetCompartmentPrivate
see also mxr id search for js_setcompartmentprivate mxr id search for js_getcompartmentprivate js_get
runtimeprivate js_set
runtimeprivate js_getprivate js_setprivate js_getinstanceprivate js_getcontextprivate js_setcontextprivate js_getcontextprivate js_setsecondcontextprivate bug 563106 ...
JS_GetContextPrivate
see also mxr id search for js_getcontextprivate mxr id search for js_setcontextprivate mxr id search for js_getsecondcontextprivate mxr id search for js_setsecondcontextprivate js_get
runtimeprivate js_set
runtimeprivate js_getcompartmentprivate js_setcompartmentprivate js_getprivate js_setprivate js_getinstanceprivate bug 714458 ...
JS_GetEmptyString
syntax jsstring * js_getemptystring(js
runtime *rt); name type description rt js
runtime * the
runtime for which to return the empty string.
JS_GetErrorPrototype
other contexts in the same
runtime can have their own error reporting functions.
JS_GetFunctionCallback
syntax jsfunctioncallback js_getfunctioncallback(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_GetFunctionPrototype
syntax jsobject * js_getfunctionprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive
runtime information.
JS_GetFunctionScript
syntax jsscript * js_getfunctionscript(jscontext *cx, js::handlefunction fun); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_GetGCParameter
syntax uint32_t js_getgcparameter(js
runtime *rt, jsgcparamkey key); void js_setgcparameter(js
runtime *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 js
runtime * the
runtime to configure.
JS_GetObjectPrototype
syntax jsobject * js_getobjectprototype(jscontext *cx, js::handleobject forobj); name type description cx jscontext * pointer to a javascript context from which to derive
runtime information.
JS_GetPrototype
syntax bool js_getprototype(jscontext *cx, js::handleobject obj, js::mutablehandleobject protop); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_GetTypeName
syntax const char * js_gettypename(jscontext *cx, jstype type); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_HasArrayLength
syntax jsbool js_hasarraylength(jscontext *cx, jsobject *obj, jsuint *lengthp); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_HasInstance
syntax bool js_hasinstance(jscontext *cx, js::handle<jsobject*> obj, js::handle<js::value> v, bool *bp); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_IdToProtoKey
syntax jsprotokey js_idtoprotokey(jscontext *cx, js::handleid id); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_IdToValue
syntax bool js_idtovalue(jscontext *cx, jsid id, js::mutablehandle<js::value> vp); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_InitClass
(jscontext *cx, js::handleobject obj, js::handleobject parent_proto, const jsclass *clasp, jsnative constructor, unsigned nargs, const jspropertyspec *ps, const jsfunctionspec *fs, const jspropertyspec *static_ps, const jsfunctionspec *static_fs); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_InstanceOf
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.
JS_IsIdentifier
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_LinkConstructorAndPrototype
syntax bool js_linkconstructorandprototype(jscontext *cx, js::handle<jsobject*> ctor, js::handle<jsobject*> proto); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_LookupProperty
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.
JS_MaybeGC
description js_maybegc tries to determine whether garbage collection in cx's
runtime would free up enough memory to be worth the amount of time it would take.
JS_NewObject
cx is a pointer to a context associated with the
runtime in which to establish the new object.
JS_NewStringCopyN
syntax jsstring * js_newstringcopyn(jscontext *cx, const char *s, size_t n); jsstring * js_newucstringcopyn(jscontext *cx, const char16_t *s, size_t n); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_NewStringCopyZ
syntax jsstring * js_newstringcopyz(jscontext *cx, const char *s); jsstring * js_newucstringcopyz(jscontext *cx, const char16_t *s); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_ObjectIsDate
syntax bool js_objectisdate(jscontext *cx, js::handleobject obj); name type description cx jscontext * pointer to a javascript context from which to derive
runtime information.
JS_PopArguments
syntax void js_poparguments(jscontext *cx, void *mark); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_Remove*Root
the entry for rp is removed from the root set for the js
runtime associated with the context cx.
JS_ReportError
syntax void js_reporterror(jscontext *cx, const char *format, ...); bool js_reportwarning(jscontext *cx, const char *format, ...); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_RestoreExceptionState
syntax void js_restoreexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_SameValue
) 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_SaveExceptionState
syntax jsexceptionstate * js_saveexceptionstate(jscontext *cx); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_ScheduleGC
the gc zeal level of the associated js
runtime is set.
JS_SetCallReturnValue2
description calling js_setcallreturnvalue2 indicates to the
runtime that the native will return a value of type reference.
JS_SetDefaultLocale
syntax bool js_setdefaultlocale(js
runtime *rt, const char *locale); void js_resetdefaultlocale(js
runtime *rt); name type description rt js
runtime * pointer to a js
runtime locale const char * string represents locale.
JS_SetExtraGCRoots
syntax void js_setextragcroots(js
runtime *rt, jstracedataop traceop, void *data); argument meaning rt the
runtime whose trace operation is to be set.
JS_SetFunctionCallback
syntax void js_setfunctioncallback(jscontext *cx, jsfunctioncallback fcb); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_SetInterruptCallback
syntax jsinterruptcallback js_setinterruptcallback(js
runtime *rt, jsinterruptcallback callback); jsinterruptcallback js_getinterruptcallback(js
runtime *rt); void js_requestinterruptcallback(js
runtime *rt); name type description rt js
runtime * the
runtime.
JS_SetParent
syntax bool js_setparent(jscontext *cx, js::handleobject obj, js::handleobject parent); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_SetPendingException
syntax void js_setpendingexception(jscontext *cx, js::handlevalue v); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_SetProperty
roperty(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_SetScriptStackQuota
description set the quota on the number of bytes that stack-like data structures can use when the
runtime compiles and executes scripts.
JS_SetVersion
syntax jsversion js_setversion(jscontext *cx, jsversion version); name type description cx jscontext * pointer to a js context from which to derive
runtime information.
JS_Unlock
syntax void js_unlock(js
runtime *rt); name type description rt js
runtime * pointer to the
runtime to unlock.
SpiderMonkey 1.8.5
s js_freezeobject js_getcompartmentprivate js_getemptystring js_getflatstringchars js_getgcparameter js_getgcparameterforthread js_getglobalforscopechain js_getinternedstringchars js_getinternedstringcharsandlength js_getownpropertydescriptor js_getpropertyattrsgetterandsetterbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_get
runtimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_getstringencodinglength js_haspropertybyid js_initctypesclass js_internjsstring js_isconstructing_possiblywithgiventhisobject js_isextensible js_isinrequest js_leavecrosscompartmentcall js_lookuppropertybyid js_lookuppropertywithflagsbyid js_new js_newcompartmentan...
SpiderMonkey 1.8.7
s js_freezeobject js_getcompartmentprivate js_getemptystring js_getflatstringchars js_getgcparameter js_getgcparameterforthread js_getglobalforscopechain js_getinternedstringchars js_getinternedstringcharsandlength js_getownpropertydescriptor js_getpropertyattrsgetterandsetterbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_get
runtimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_getstringencodinglength js_haspropertybyid js_initctypesclass js_internjsstring js_isconstructing_possiblywithgiventhisobject js_isextensible js_isinrequest js_leavecrosscompartmentcall js_lookuppropertybyid js_lookuppropertywithflagsbyid js_new js_newcompartmentan...
SpiderMonkey 17
(the js_get_class macro abstracting away this difference has accordingly been removed.) garbage collection functions now take
runtime argument most garbage collection functions now take a
runtime argument instead of a context.
SpiderMonkey 24
js_getprototype, takes context as first argument js_encodestringtobuffer takes add context as first argument, js_new
runtime adds a js_[use|no]_helper_threads flag delete property in jsclass definitions now use js_deletepropertystub garbage collection functions now take
runtime argument most garbage collection functions now take a
runtime argument instead of a context.
Zest
zest topics usecases reporting security vulnerabilities to developers reporting security vulnerabilities to companies defining active and passive scanner rules deep integration with security tools
runtimes the
runtime environments that support zest tools the tools that include support zest implementation the state of zest development videos simon demoed zest at appsec usa in november 2013, and the full video of my talk is available on youtube.
The Rust programming language
in addition, rust offers zero-cost abstractions, move semantics, guaranteed memory safety, threads with no data races, trait-based generics, pattern matching, type inference, and efficient c bindings, with a minimum
runtime size.
The Places database
periodically at
runtime, the following happens to expire pages: expire visits that are older than the history expiration threshold.
Bundling multiple binary components
the stub component is an xpcom component itself and when registered by xpcom, the code would sniff the
runtime version and operating system then the stub load the appropriate "real" xpcom component for the current configuration.
How to build an XPCOM component in JavaScript
depth = @depth@ topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk # module specifies where header files from this makefile are installed # use dom if your component implements a dom api module = dom # name of the typelib xpidl_module = dom_apps # set to 1 if the module should be part of the gecko
runtime common to all applications gre_module = 1 # the idl sources xpidlsrcs = \ helloworld.idl \ $(null) include $(topsrcdir)/config/rules.mk xpidl_flags += \ -i$(topsrcdir)/dom/interfaces/base \ -i$(topsrcdir)/dom/interfaces/events \ $(null) creating the component using xpcomutils in firefox 3 and later you can use import xpcomutils.jsm using components.utils.import to simplify the process ...
Resources
ller and information the sdk download linux: http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4a/gecko-sdk-i686-pc-linux-gnu-1.4a.tar.gz windows: http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4a/gecko-sdk-win32-1.4a.zip other mozilla downloads gecko resources internal string guide external string guide the gecko networking library ("necko") the netscape portable
runtime environment embedding mozilla current module owners xpinstall xul xpcom resources the xpcom project page xulplanet's online xpcom reference information on xpconnect and scriptable components the smart pointer guide xpidl xpidl compiler reference general development resources the world wide web consortium url specification at the w3 gnu make « previous copyright (c) ...
Setting up the Gecko SDK
ne: nspr4.lib plds4.lib plc4.lib embedstring.lib xpcomglue.lib both of these settings are shown below: the last change you need to make to set up the gecko sdk in your project is to change the "use run-time library" setting to "multithreaded dll." since this change is configuration dependent, you must make set the release configuration run-time library to the release multithreaded dll
runtime and the debug configuration to the debug multithreaded dll
runtime (this needs clarification): after making these changes, press ok.
XPCShell Reference
-g this option specifies which gecko
runtime environment directory (gredir) to use for xpcom.
NS_InitXPCOM2
abindirectory [in] the directory containing the component registry and
runtime libraries.
NS_InitXPCOM3
abindirectory [in] the directory containing the component registry and
runtime libraries.
nsMemory
however, if you use these functions in your xpcom component, and if you link to the xpcom glue library, then your component will only have a
runtime dependency on the frozen xpcom api.
IAccessible2
this value is provided so the at can have access to a unique
runtime persistent identifier even when not handling an event for the object.
mozIJSSubScriptLoader
js/xpconnect/idl/mozijssubscriptloader.idlscriptable this interface can be used from privileged javascript to load and run javascript code from the given url at
runtime.
mozIRegistry
this issue needs to be resolved in order to enable alternative moziregistry implementations or to permit other service implementations to be bound at
runtime.
nsIChromeRegistry
checkfornewchrome() refreshes the chrome list at
runtime, looking for new packages and so forth.
nsICrashReporter
attributes attribute type description enabled boolean enable or disable the crashreporter at
runtime.
nsIFileURL
note: this constraint might not be enforced at
runtime, so beware!
nsIProtocolProxyService
it is recommended that any extensions that choose to call this method make their position value configurable at
runtime (perhaps via the preferences service).
nsISupports
queryinterface() the queryinterface method provides
runtime type discovery.
nsIWebBrowser
the interface may also be used at
runtime to obtain the content dom window and from that the rest of the dom.
nsIWinAppHelper
to create an instance, use: var xulappinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsiwinapphelper); the nsixulappinfo and nsixul
runtime interfaces are also implemented by "xre/app-info".
nsIXPConnect
this is because we currently activate debugmode on all scripts in the js
runtime when the debugger is activated.
XPCOM Interface Reference
copensiworkermessageeventnsiworkermessageportnsiworkerscopensiwritablepropertybagnsiwritablepropertybag2nsixformsmodelelementnsixformsnsinstanceelementnsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulbrowserwindownsixulbuilderlistenernsixul
runtimensixulsortservicensixultemplatebuildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsmsglabelvaluensmsgpriorityvaluensmsgruleactiontypensmsgsearchattribnsmsgsearchopnsmsgsearchscopensmsgsearchtermnsmsgsearchtypevaluensmsgsearchvaluensms...
XPCOM Interface Reference by grouping
ssl nsibadcertlistener2 system action nsicancelable application application nsiapplicationupdateservice nsiappshell nsiappshellservice nsiappstartup xul nsixulappinfo nsixul
runtime nsixultemplatebuilder nsixultemplatequeryprocessor nsixultemplateresult bookmark livemark nsilivemarkservice nsinavbookmarkobserver nsinavbookmarksservice nsinavhistoryservice browser dom ...
nsMsgMessageFlags
runtimeonly 0x00000020 indicates the flags which are not emitted to the database.
Frequently Asked Questions
comparing an nscomptr to a raw xpcom interface pointer declaring an nscomptr to a forward-declared class not linking to xpcom not including nscomptr.h different settings of nscap_feature_debug_ptr_types
runtime errors ns_assertion "queryinterface needed" may be caused by a class that derives from a given interface, when you forgetting to also specify the interface name in the ns_impl_isupports / ns_impl_threadsafe_isupports macro.
Getting Started Guide
however, be aware that if you should have queried but didn't, e.g., when assigning in a raw pointer where c++ allows the assignment, but xpcom wouldn't, nscomptr will assert at
runtime.
Using nsCOMPtr
contents status, recent changes, and plans recent changes to nscomptr getting started guide introduction using nscomptr summary reference manual the basics initialization and assignment using an nscomptr<t> as a t* efficiency and correctness compiler annoyances frequently asked questions buildtime errors
runtime errors how do i...
xpidl
it generates: c++ header files (.h), with a commented template for full c++ implementation of the interface xpconnect typelib files (.xpt), with
runtime type information to dynamically call xpcom objects through xpconnect note: starting in gecko 9.0, xpidl has been replaced with pyxpidl in the gecko sdk.
XUL Overlays
loading overlays at
runtime firefox 1.5 and other gecko 1.8-based applications also support loading overlays on-the-fly via the document.loadoverlay() function.
Testing Mozilla code
in addition, the
runtime part replaces the malloc and free functions to check dynamically allocated memory.
Zombie compartments
in the results, you'll find a js-main-
runtime-compartments tree (whcih you may need to expand further) that lists all system (firefox and add-ons) and user (website) compartments, these compartments are also listed in more detail in the explicit allocations section.
Mozilla
it uses a compile-time instrumentation to ensure that all memory access at
runtime uses only memory that has been initialized.
Scripting plugins - Plugins
« previousnext » xxx: dummy p element this document describes the new cross-browser npapi extensions, commonly called np
runtime, that have been developed by a group of browser and plugin vendors, including the mozilla foundation, adobe, apple, opera, and sun microsystems (see press release).
Gecko Plugin API Reference - Plugins
plug-in basics how plug-ins are used plug-ins and helper applications how plug-ins work understanding the
runtime model plug-in detection how gecko finds plug-ins checking plug-ins by mime type overview of plug-in structure understanding the plug-in api plug-ins and platform independence windowed and windowless plug-ins the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing ...
Debugger.Memory - Firefox Developer Tools
known values include the following: “api” “eager_alloc_trigger” “destroy_
runtime” “last_ditch” “too_much_malloc” “alloc_trigger” “debug_gc” “compartment_revived” “reset” “out_of_nursery” “evict_nursery” “full_store_buffer” “shared_memory_limit” “periodic_full_gc” “incremental_too_slow” “dom_window_utils” “component_utils” “mem_pressure” “cc_waiting” “cc_force...
Allocations - Firefox Developer Tools
with a garbage-collected language, like javascript, the
runtime periodically needs to walk the heap looking for objects that are no longer reachable, and then freeing the memory they occupy.
Waterfall - Firefox Developer Tools
for example, consider code like this: var timerbutton = document.getelementbyid("timer"); timerbutton.addeventlistener("click", handleclick, false); function handleclick() { console.time("timer");
runtimer(1000).then(timerfinished); } function timerfinished() { console.timeend("timer"); console.log("ready!"); } function
runtimer(t) { return new promise(function(resolve) { settimeout(resolve, t); }); } the waterfall will display a marker for the period between time() and timeend(), and if you select it, you'll see the async stack in the sidebar: timestamp markers timestamps enabl...
GlobalEventHandlers.onerror - Web APIs
error events are fired at various targets for different kinds of errors: when a javascript
runtime error (including syntax errors and exceptions thrown within handlers) occurs, an error event using interface errorevent is fired at window and window.onerror() is invoked (as well as handlers attached by window.addeventlistener (not only capturing)).
Audio() - Web APIs
the event-based approach is best: myaudioelement.addeventlistener("canplaythrough", event => { /* the audio is now playable; play it if permissions allow */ myaudioelement.play(); }); memory usage and management if all references to an audio element created using the audio() constructor are deleted, the element itself won't be removed from memory by the javascript
runtime's garbage collection mechanism if playback is currently underway.
PromiseRejectionEvent() - Web APIs
there are two types of promiserejectionevent: unhandledrejection is sent by the javascript
runtime when a promise is rejected but the rejection goes unhandled.
Sensor APIs - Web APIs
let accelerometer = null; try { accelerometer = new accelerometer({ referenceframe: 'device' }); accelerometer.addeventlistener('error', event => { // handle
runtime errors.
USBEndpoint - Web APIs
examples while sometimes the developer knows ahead of time the exact layout of a device's endpoints there are cases where this must be discovered at
runtime.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
however, if you are designing the format yourself, or your geometry is in text files (like wavefront .obj files) and must be converted into an arraybuffer at
runtime, you have free choice on how to structure the memory.
WebXR performance guide - Web APIs
that means that for every frame, the javascript
runtime has to allocate memory for those and set them up—possibly triggering garbage collection—and then when each interaction of the loop is completed, the memory is released.
Window: unhandledrejection event - Web APIs
you can prevent that from happening by adding a handler for unhandledrejection events that—in addition to any other tasks you wish to perform—calls preventdefault() to cancel the event, preventing it from bubbling up to be handled by the
runtime's logging code.
Window - Web APIs
globaleventhandlers.onclose called after the window is closed globaleventhandlers.oncontextmenu called when the right mouse button is pressed globaleventhandlers.onerror called when a resource fails to load or when an error occurs at
runtime.
WindowOrWorkerGlobalScope - Web APIs
this lets your code run without interfering with other, possibly higher priority, code, but before the browser
runtime regains control, potentially depending upon the work you need to complete.
WorkerGlobalScope.navigator - Web APIs
) applewebkit/537.36 (khtml, like gecko) chrome/40.0.2214.93 safari/537.36" hardwareconcurrency: 4 online: true platform: "macintel" product: "gecko" useragent: "mozilla/5.0 (macintosh; intel mac os x 10_10_1) applewebkit/537.36 (khtml, like gecko) chrome/40.0.2214.93 safari/537.36" __proto__: object you could use this navigator object to return more information about the
runtime envinronment, as you might do with a normal navigator object.
XRWebGLLayer - Web APIs
let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); rendering every view in a frame each time the gpu is ready to render the scene to the xr device, the xr
runtime calls the function you specified when you called the xrsession method requestanimationframe() to ask to render the frame.
HTML documentation index - HTML: Hypertext Markup Language
>: the content template element element, html, html web components, html:flow content, html:metadata content, html:phrasing content, html:script-supporting element, reference, template, web, web components the html content template (<template>) element is a mechanism for holding html that is not to be rendered immediately when a page is loaded but may be instantiated subsequently during
runtime using javascript.
A re-introduction to JavaScript (JS tutorial) - JavaScript
javascript lets you modify something's prototype at any time in your program, which means you can add extra methods to existing objects at
runtime: var s = new person('simon', 'willison'); s.firstnamecaps(); // typeerror on line 1: s.firstnamecaps is not a function person.prototype.firstnamecaps = function() { return this.first.touppercase(); }; s.firstnamecaps(); // "simon" interestingly, you can also add things to the prototype of built-in javascript objects.
Introduction - JavaScript
in contrast to java's compile-time system of classes built by declarations, javascript supports a
runtime system based on a small number of data types representing numeric, boolean, and string values.
Regular expressions - JavaScript
or calling the constructor function of the regexp object, as follows: let re = new regexp('ab+c'); using the constructor function provides
runtime compilation of the regular expression.
Working with objects - JavaScript
this notation is also very useful when property names are to be dynamically determined (when the property name is not determined until
runtime).
Arrow function expressions - JavaScript
https://www.ecma-international.org/ecma-262/10.0/index.html#sec-strict-mode-code https://www.ecma-international.org/ecma-262/10.0/index.html#sec-arrow-function-definitions-
runtime-semantics-evaluation correction: end invoked through call or apply since arrow functions do not have their own this, the methods call() and apply() can only pass in parameters.
EvalError() constructor - JavaScript
the line number of the code that caused the exception examples evalerror is not used in the current ecmascript specification and will thus not be thrown by the
runtime.
EvalError - JavaScript
examples evalerror is not used in the current ecmascript specification and will thus not be thrown by the
runtime.
Intl.Collator - JavaScript
static methods intl.collator.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the
runtime's default locale.
Intl.DateTimeFormat - JavaScript
static methods intl.datetimeformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the
runtime's default locale.
Intl.DisplayNames - JavaScript
static methods intl.displaynames.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the
runtime's default locale.
Intl.ListFormat - JavaScript
static methods intl.listformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the
runtime's default locale.
Intl.NumberFormat - JavaScript
static methods intl.numberformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the
runtime's default locale.
Intl.PluralRules - JavaScript
static methods intl.pluralrules.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the
runtime's default locale.
Intl.RelativeTimeFormat - JavaScript
static methods intl.relativetimeformat.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the
runtime's default locale.
Object.create() - JavaScript
note that such a different order may arise statically via disparate fixed codings such as here, but also dynamically via whatever the order any such property-adding code-branches actually get executed at
runtime as depends on inputs and/or random-variables.
RegExp() constructor - JavaScript
the constructor of the regular expression object—for example, new regexp('ab+c')—results in
runtime compilation of the regular expression.
RegExp - JavaScript
the constructor of the regular expression object—for example, new regexp('ab+c')—results in
runtime compilation of the regular expression.
Symbol.for() - JavaScript
the symbol.for(key) method searches for existing symbols in a
runtime-wide symbol registry with the given key and returns it if found.
Symbol.iterator - JavaScript
using it as such is likely to result in
runtime exceptions or buggy behavior: var nonwellformediterable = {} nonwellformediterable[symbol.iterator] = () => 1 [...nonwellformediterable] // typeerror: [] is not a function specifications specification ecmascript (ecma-262)the definition of 'symbol.iterator' in that specification.
WeakRef - JavaScript
various
runtime heuristics can be used to balance memory usage, responsiveness.
Standard built-in objects - JavaScript
intl intl.collator intl.datetimeformat intl.listformat intl.numberformat intl.pluralrules intl.relativetimeformat intl.locale webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.
runtimeerror other arguments ...
Iteration protocols - JavaScript
using one is likely to result in
runtime errors or buggy behavior: let nonwellformediterable = {}; nonwellformediterable[symbol.iterator] = () => 1; [...nonwellformediterable]; // typeerror: [] is not a function iterator examples simple iterator function makeiterator(array) { let nextindex = 0 return { next: function() { return nextindex < array.length ?
Object initializer - JavaScript
with the introduction of computed property names making duplication possible at
runtime, ecmascript 2015 has removed this restriction.
this - JavaScript
in most cases, the value of this is determined by how a function is called (
runtime binding).
var - JavaScript
the list of names in [[varnames]] enables the
runtime to distinguish between global variables and straightforward properties on the global object.
JavaScript reference - JavaScript
eflect proxy internationalization intl intl.collator intl.datetimeformat intl.displaynames intl.listformat intl.locale intl.numberformat intl.pluralrules intl.relativetimeformat webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.
runtimeerror statements javascript statements and declarations control flowblock break continue empty if...else switch throw try...catch declarations var let const functions and classes function function* async function return class iterations do...while for for each...in for...in for...of for await...of while other debugger ...
Web Performance
web performance is the objective measurements and the perceived user experience of load time and
runtime.
Web Components
html templates <template> contains an html fragment that is not rendered when a containing document is initially loaded, but can be displayed at
runtime using javascript, mainly used as the basis of custom element structures.
Compiling a New C/C++ Module to WebAssembly - WebAssembly
(note that we need to compile with no_exit_
runtime, which is necessary as otherwise when main() exits the
runtime would be shut down — necessary for proper c emulation, e.g., atexits are called — and it wouldn't be valid to call compiled code.) emcc -o hello3.html hello3.c -o3 -s wasm=1 --shell-file html_template/shell_minimal.html -s no_exit_
runtime=1 -s "extra_exported_
runtime_methods=['ccall']" if you load the example in your bro...