Search completed in 4.45 seconds.
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.
... this chapter introduces key
nspr programming concepts and illustrates them with sample code.
... the current implementation of
nspr allows developers to compile a single source code base on macintosh (ppc), win32 (nt 3.51, nt 4.0, win'95), and over twenty versions of unix.
...And 30 more matches
About NSPR
netscape portable runtime (
nspr) provides platform independence for non-gui operating system facilities.
...
nspr went beyond that requirement in some areas and since it was also the platform independent layer for most of the servers produced by netscape.
... it was expected and preferred that existing code be restructured and perhaps even rewritten in order to use the
nspr api.
...And 24 more matches
NSPR Contributor Guide
abstract:
nspr accepts contributions in the form of bugfixes, new features, libraries, platform ports, documentation, test cases and other items from many sources.
... we (the
nspr module owners) sometimes disappoint our contributors when we must reject their contributions.
...
nspr wishes to document some guidelines for those who would contribute to
nspr.
...And 24 more matches
Optimizing Applications For NSPR
netscape portable runtime (
nspr) tries to provide a consistent level of service across the platforms it supports.
...the only exception to this rule is the <tt>select()</tt> and <tt>poll()</tt> system calls on unix, both of which
nspr has overridden to make sure they are aware of the
nspr local threads.
...
nspr uses timer signals to implement thread preemption for local threads on some platforms.
...And 23 more matches
Porting NSPR to Unix Platforms - Archive of obsolete content
last modified 16 july 1998 <<< under construction >>> unix platforms are probably the easiest platforms to port netscape portable runtime (
nspr) to.
... however, if you are not familiar with the structure of the
nspr source tree and its build system, it may take you extra time.
... porting instructions you can use different threading packages to implement
nspr threads.
...And 14 more matches
NSPR functions
nspr is a platform abstraction library that provides a cross-platform api to common os services.
... nss uses
nspr internally as the porting layer.
... however, a small number of
nspr functions are required for using the certificate verification and ssl functions in nss.
...And 14 more matches
NSPR build instructions
prerequisites on windows, the
nspr build system needs gnu make and a unix command-line utility suite such as mks toolkit, cygwin, and msys.
... introduction the top level of the
nspr source tree is the mozilla/
nsprpub directory.
... although
nsprpub is a subdirectory under mozilla,
nspr is independent of the mozilla client source tree.
...And 10 more matches
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.
...we consider a stack of
nspr i/o layers on top of the network transport.
...the
nspr library provides a reference implementation of the bottom layer using the sockets api, but you can provide your own implementation of the bottom layer using another network transport api.
...And 7 more matches
NSPR
netscape portable runtime (
nspr) provides a platform-neutral api for system level and libc-like functions.
... documentation about
nspr this topic describes, in general terms, the goals of
nspr and a bit about how it does it.
...
nspr api reference the reference describes each api public macro, structure and function in the
nspr api.
...And 7 more matches
NSPR release process
set the
nspr version number.
... make a dummy change (add or remove a blank line) to mozilla/
nsprpub/config/prdepend.h.
... make sure the nss tinderboxes (which also build and test
nspr) are all green.
...And 6 more matches
Updating NSPR or NSS in mozilla-central
the
nspr and nss sources in mozilla-central are maintained by the
nspr and nss teams and always taken from exports of hg tags.
...if you check in an individual change by mistake, your change will be lost when the
nspr and nss teams push a new hg tag to mozilla-central.
... (because some developers might not be aware that
nspr/nss are separately maintained and released, the mozilla hg server rejects accidental changes/forking, if the required keywords are missing in the commit comment.) if
nspr or nss must be upgraded to a new static tag, follow this procedure: before starting, make sure your local repository is updated to mozilla-central tip and that there are no local changes: $ hg status -mard pull the new sources $ python client.py update_
nspr nspr_tag_name or $ python client.py update_nss nss_tag_name if you update a branch older than mozilla 17 (without the change from bug 782784), you must manually add a dummy change (add or remove a blank line) to force a rebuild of
nspr: mozilla/
nsprpub/config/prdepend.h or nss: mozilla/secu...
...And 4 more matches
Running NSPR tests
nspr has a test suite in the mozilla/
nsprpub/pr/tests directory.
...running gmake in the top-level directory (mozilla/
nsprpub) only builds the
nspr libraries.
... to build the test programs, you need to change directory to mozilla/
nsprpub/pr/tests and run gmake.
...And 4 more matches
NSPR release procedure
release checklist change the
nspr version in mozilla/
nsprpub/pr/include/prinit.h.
... change the
nspr version in mozilla/
nsprpub/{configure.in,configure}.
... change the
nspr version in mozilla/
nsprpub/pr/tests/vercheck.c.
...And 3 more matches
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.
... i resist including this function in
nspr because it results in bad programming practice and unsupportable programs.
...
nspr has defined a function, callable by any thread within a process at any time, called pr_processexit().
...And 3 more matches
NSPR LOG MODULES
special log module names are provided for controlling
nspr's log service at execution time.
... these controls should be set in the
nspr_log_modules environment variable at execution time to affect
nspr's log service for your application.
...to enable all log module calls to pr_log, set the variable as follows: set
nspr_log_modules=all:5 timestamp including timestamp results in a timestamp of the form "2015-01-15 21:24:26.049906 utc - " prefixing every logged line.
...And 3 more matches
NSPR Types
this chapter describes the most common
nspr types.
... for information on naming conventions for
nspr types, functions, and macros, see
nspr naming conventions.
... here are some simple examples of the use of these types: in dowhim.h: pr_extern( void ) dowhatimean( void ); static void pr_callback rootfunction(void *arg); in dowhim.c: pr_implement( void ) dowhatimean( void ) { return; }; prthread *thread = pr_createthread(..., rootfunction, ...); algebraic types
nspr provides the following type definitions with unambiguous bit widths for algebraic operations: 8-, 16-, and 32-bit integer types 64-bit integer types floating-point number type for convenience,
nspr also provides type definitions with platform-dependent bit widths: native os integer types 8-, 16-, and 32-bit integer types signed integers print8 print16 print32 unsigned integers...
...And 3 more matches
NSPR Release Engineering Guide - Archive of obsolete content
this paper is for engineers performing formal release for the netscape portable runtime (
nspr) across all platforms.
...
nspr generally follows the iplanet product lifecycle.
... feature complete update ...pr/include/prinit.h with release numbers build all targets, debug and optimized on all platforms using local directories run the test suite on all targets verify release numbers show up in binaries resolve testing anomalies tag the tree with
nsprpub_release_x_y_z_beta beta release checkout a whole new tree using the tag from above build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/
nspr20/.vx.y.z 1 run explode.pl run the test suite on all targets, using binaries & headers from shipped bits resolve testing anomalies tag the tree with
nsprpub_release_x_y[_z] release candi...
...And 2 more matches
Nonblocking IO In NSPR
introduction previously, all i/o in the netscape portable runtime (
nspr) was blocking (or synchronous).
...in
nspr, a new socket returned by <tt>pr_newtcpsocket()</tt> or <tt>pr_newudpsocket()</tt> is always created in blocking mode.
...ing by using <tt>pr_setsockopt()</tt> as in the example below (error checking is omitted for clarity): <tt>prfiledesc *sock;</tt> <tt>printn optval = 1;</tt> <tt>sock = pr_newtcpsocket();</tt> /* * make the socket nonblocking */ pr_setsockopt(sock, pr_sockopt_nonblocking, &optval, sizeof(optval)); programming constraints there are some constraints due to the use of nt asynchronous i/o in the
nspr.
...And 2 more matches
Process Forking in NSPR
the threads provided in netscape portable runtime (
nspr) are implemented using different mechanisms on the various platforms.
... on some platforms,
nspr threads directly map one-to-one to the threads provided by the platform vendor, on other platforms
nspr threads are basically user-level threads within a single process (with no kernel threads) and on still others
nspr threads are user-level threads implemented on top of one or more kernel threads within single address space.
...
nspr does not override the fork function and so, when fork is called from the
nspr thread the results are different on the various platforms.
...And 2 more matches
NSPR LOG FILE
if
nspr_log_file is not in the environment, then log output is written to stdout or stderr, depending on the platform.
... set
nspr_log_file to the name of the log file you want to use.
...
nspr logging, when enabled, writes to the file named in this environment variable.
... for ms windows systems, you can set
nspr_log_file to the special (case-sensitive) value windebug.
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
consequently, implementing threads, with their implication of a unique stack for each thread, requires that the
nspr copy the stacks during thread context switches.
...0 : 1; } this is a completely correct (albeit trivial) program that will run predictably on all
nspr platforms other than win-16.
... original document information author: larryh@netscape.com, wan teh chang last updated date: december 1, 2004 this note is about writing win16-portable code that uses
nspr threads, probably not interesting to today's developers ...
NSPR API Reference
introduction to
nspr nspr naming conventions
nspr threads thread scheduling setting thread priorities preempting threads interrupting threads
nspr thread synchronization locks and monitors condition variables
nspr sample code
nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities contr...
...ss communication process management types and constants prprocess prprocessattr process management functions setting the attributes of a new process creating and managing processes multiwait receive system information and environment variables logging conditional compilation and execution log types and variables prlogmoduleinfo prlogmodulelevel
nspr_log_modules
nspr_log_file logging functions and macros pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_not_reached use example instrumentation counters named shared memory shared memory protocol named shared memory functions anonymous shared memory anonymous memory protoc...
...ol anonymous shared memory functions ipc semaphores ipc semaphore functions thread pools thread pool types thread pool functions random number generator random number generator function hash tables hash tables and type constants hash table functions
nspr error handling error type error functions error codes ...
Programs Using NSPR
the following programs are known to use
nspr, or portions of it: gecko using programs (mozilla application suite, firefox, thunderbird, camino, etc.) many fedora/red hat and sun server applications.
... netscape alumni took
nspr with them to their new companies: good technology, kontiki, tellme networks.
NSPR Error Handling
this chapter describes the functions for retrieving and setting errors and the error codes set by
nspr.
... error type error functions error codes for information on naming conventions for
nspr types, functions, and macros, see
nspr naming conventions.
nsPromiseFlatCString
methods constructors void
nspromiseflatcstring(const nsacstring_internal&) - source parameters nsacstring_internal& str void
nspromiseflatcstring(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const ...
nsPromiseFlatString
methods constructors void
nspromiseflatstring(const nsastring_internal&) - source parameters nsastring_internal& str void
nspromiseflatstring(const nssubstringtuple&) - source parameters nssubstringtuple& tuple operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const p...
Python binding for NSS
project information python-nss is a python binding for nss (network security services) and
nspr (netscape portable runtime).
... nss is built upon
nspr because
nspr provides an abstraction of common operating system services, particularly in the areas of networking and process management.
... python also provides an abstraction of common operating system services but because nss and
nspr are tightly bound python-nss exposes elements of
nspr.
...And 27 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.
...when creating the network socket for data exchange, note that you must use the operating system independent apis provided by
nspr and nss.
... it might be interesting to mention a property of the
nspr file descriptors, which are stacked in layers.
...And 15 more matches
Logging
nspr provides a set of logging functions that conditionally write printf() style strings to the console or to a log file.
...
nspr uses this facility itself for its own development debugging purposes.
...
nspr also provides "assert"-style macros and functions to aid in application debugging.
...And 7 more matches
SpiderMonkey Build Documentation
when building a version older than 28, you'll additionally need
nspr.
... since the posix
nspr emulation is not available for windows, a working version of
nspr must be available to your build.
... the easiest option is to configure with --enable-
nspr-build.
...And 7 more matches
I/O Functions
this chapter describes the
nspr functions used to perform operations such as system access, normal file i/o, and socket (network) i/o.
... for sample code that illustrates basic i/o operations, see introduction to
nspr.
...
nspr uses unix-style pathnames, which are null-terminated character strings.
...And 6 more matches
PR ImportTCPSocket
imports a native tcp socket into
nspr.
... description a native tcp socket osfd can be imported into
nspr with pr_importtcpsocket.
... although pr_importtcpsocket is a supported function, it is declared in "private/pprio.h" to stress the fact that this function depends on the internals of the
nspr implementation.
...And 6 more matches
XPCOM glue
embedders using the standalone glue typically also need to avoid linking against
nspr as well.
...this is because it forces a dependency on the
nspr library, which can otherwise be avoided.
... as described in bug 299664, the preprocessor symbol xpcom_glue_use_
nspr needs to be defined.
...And 6 more matches
Using IO Timeout And Interrupt On NT - Archive of obsolete content
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.
... due to a limitation of the present implementation of
nspr io on nt, programs must follow the following guideline: if a thread calls an
nspr io function on a file descriptor and the io function fails with <tt>pr_io_timeout_error</tt> or <tt>pr_pending_interrupt_error</tt>, the file descriptor must be closed before the thread exits.
...
nspr io on nt the io model of
nspr 2.0 is synchronous and blocking.
...And 5 more matches
Threads
nspr provides an execution environment that promotes the use of lightweight threads.
...this chapter describes the basic
nspr threading api.
...to an
nspr client, a thread is represented by a pointer to an opaque structure of type prthread.
...And 5 more matches
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.
...
nspr and nss shared libraries jss uses the
nspr and nss libraries for i/o and crypto.
... jss version 3.0 linked statically with nss, so it only required
nspr.
...And 5 more matches
Date and Time
this chapter describes the date and time functions in
nspr.
...
nspr represents time in two ways, absolute time and clock/calendar time.
...
nspr provides types and constants for both representations, and functions to convert time values between the two.
...And 4 more matches
PRThreadScope
the scope of an
nspr thread, specified as a parameter to pr_createthread or returned by pr_getthreadscope.
... syntax #include <prthread.h> typedef enum prthreadscope { pr_local_thread, pr_global_thread pr_global_bound_thread } prthreadscope; enumerators pr_local_thread a local thread, scheduled locally by
nspr within the process.
... pr_global_bound_thread a global bound (kernel) thread, scheduled by the host os description an enumerator of type prthreadscope specifies how a thread is scheduled: either locally by
nspr within the process (a local thread) or globally by the host (a global thread).
...And 4 more matches
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.
... you can use
nspr throughout your application or only in the portion that calls into nss.
...And 4 more matches
sslfnc.html
ssl configuration functions ssl configuration involves several
nspr functions in addition to the ssl functions listed here.
... ssl configuration callback configuration ssl configuration ssl_importfd ssl_optionset ssl_optionget ssl_cipherprefset ssl_cipherprefget ssl_configsecureserver ssl_seturl ssl_setpkcs11pinarg ssl_importfd imports an existing
nspr file descriptor into ssl and returns a new ssl socket.
...sockets do not automatically become secure ssl sockets when they are created by the
nspr functions.
...And 4 more matches
sslintro.html
initializes
nspr.
...a legal
nspr socket is required to be passed to ssl_importfd, whether it is created with this function or by another method.
...makes an
nspr socket into an ssl socket.
...And 4 more matches
Index - Archive of obsolete content
606 porting
nspr to unix platforms
nspr last modified 16 july 1998 607 priority content update: i've removed documents from this list that have been migrated into the wiki.
... 681 using addresses of stack variables with
nspr threads on win16
nspr, outdated_articles this is a cautionary note that may be old information for some of you.
...this is done using
nspr logging.
...And 3 more matches
I/O Types
this chapter describes the most common
nspr types, enumerations, and structures used with the functions described in i/o functions and network addresses.
... for sample code that illustrates basic i/o operations, see introduction to
nspr.
... directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o offset interpretation for seek functions directory type prdir file descriptor types
nspr represents i/o objects, such as open files and sockets, by file descriptors of type prfiledesc.
...And 3 more matches
NSS API Guidelines
pkcs #11: implementation lib/softoken keydbt.h, keylow.h, keytboth.h, keytlow.h, secpkcs5.h, pkcs11.h, pkcs11f.h, pkcs11p.h, pkcs11t.h, pkcs11u.h ssl provides an implementation of the ssl protocol using nss and
nspr.
... nss makes use of traditional memory allocation functions, wrapping
nspr's pr_alloc in a util function called port_alloc.
... though nss makes further use of an
nspr memory-allocation facility which uses 'arenas' and 'arenapools'.
...And 3 more matches
Migration to HG
the
nspr, nss and related projects have stopped using mozilla'a cvs server, but have migrated to mozilla's hg (mercurial) server.
... each project now lives in its own separate space, they can be found at: https://hg.mozilla.org/projects/
nspr/ https://hg.mozilla.org/projects/nss/ https://hg.mozilla.org/projects/jss/ https://hg.mozilla.org/projects/python-nss/ this migration has been used as an opportunity to change the layout of the source directories.
... for
nspr, "mozilla/
nsprpub" has been removed from the directory hierarchy, all files now live in the top directory of the
nspr repository.
...And 3 more matches
Setting up the Gecko SDK
this window is where you add the include paths to the gecko sdk as well as two preprocessor defines: xpcom_glue mozilla_strict_api at a minimum, you must include the
nspr, the embedstring and string include directories, and the xpcom include subdirectory.
... assuming you are using the example location for your project, these paths are the following: c:\gecko-sdk\embedstring\include c:\gecko-sdk\xpcom\include c:\gecko-sdk\
nspr\include c:\gecko-sdk\string\include under the c++ language category, disable exception handling.
...in this panel, instead of linking to the include subdirectories of the
nspr, embedstring, and xpcom directories, add the paths to the bin subdirectories.
...And 3 more matches
Creating a Cookie Log
change to your firefox directory (usually c:\program files\mozilla firefox) type "set
nspr_log_file=c:\temp\cookie-log.txt", enter type "set
nspr_log_modules=cookie:4" and press enter run firefox by typing "firefox.exe" and pressing enter.
... type "export
nspr_log_file=~/cookie-log.txt" and press enter.
... type "export
nspr_log_modules=cookie:4" and press enter.
...And 2 more matches
Locks
this chapter describes the
nspr api for creation and manipulation of a mutex of type prlock.
... lock type lock functions in
nspr, a mutex of type prlock controls locking, and associated condition variables communicate changes in state among threads.
...in addition to prlock,
nspr provides another mutex type, prmonitor, which is reentrant and can have only one associated condition variable.
...And 2 more matches
PRErrorCode
syntax #include <prerror.h> typedef print32 prerrorcode description the service
nspr offers in this area is the ability to associate a thread-specific condition with an error number.
...
nspr assumes error numbers starting at -6000 (decimal) and progressing towards zero.
...if
nspr's error handling is adopted by calling clients, then some sort of partitioning of the namespace will have to be employed.
...And 2 more matches
PR_AttachThread
description you use pr_attachthread when you want to use nss functions on the native thread that was not created with
nspr.
... pr_attachthread informs
nspr about the new thread by associating a prthread object with the native thread.
... note: as of
nspr release v3.0, pr_attachthread and pr_detachthread are obsolete.
...And 2 more matches
PR_DetachThread
description this function detaches the
nspr thread from the currently executing native thread.
...the call returns after the
nspr thread object is destroyed.
... note: as of
nspr release v3.0, pr_attachthread and pr_detachthread are obsolete.
...And 2 more matches
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.
...when creating the network socket for data exchange, note that you must use the operating system independent apis provided by
nspr and nss.
... it might be interesting to mention a property of the
nspr file descriptors, which are stacked in layers.
...And 2 more matches
NSS 3.12.4 release notes
nss 3.12.4 requires
nspr 4.8.
...our qa tested nss 3.12.4 with
nspr 4.8, but it should work with
nspr 4.7.1 or later.
... you can check out the source from cvs by cvs co -r
nspr_4_8_rtm
nspr cvs co -r nss_3_12_4_rtm nss see the documentation section for the build instructions.
...And 2 more matches
NSS 3.19.2.1 release notes
nss 3.19.2.1 requires
nspr 4.10.10 or newer.
... nss 3.19.2.1 and
nspr 4.10.10 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_19_2_1_rtm/src/ https://ftp.mozilla.org/pub/
nspr/releases/v4.10.10/src/ security advisories the following security-relevant bugs have been resolved in nss 3.19.2.1.
... the following security-relevant bugs have been resolved in
nspr 4.10.10, which affect nss.
...And 2 more matches
NSS 3.19.4 release notes
nss 3.19.4 requires
nspr 4.10.10 or newer.
... nss 3.19.4 and
nspr 4.10.10 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_19_4_rtm/src/ https://ftp.mozilla.org/pub/
nspr/releases/v4.10.10/src/ security advisories the following security-relevant bugs have been resolved in nss 3.19.4.
... the following security-relevant bugs have been resolved in
nspr 4.10.10, which affect nss.
...And 2 more matches
NSS 3.20.1 release notes
nss 3.20.1 requires
nspr 4.10.10 or newer.
... nss 3.20.1 and
nspr 4.10.10 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_20_1_rtm/src/ https://ftp.mozilla.org/pub/
nspr/releases/v4.10.10/src/ security advisories the following security-relevant bugs have been resolved in nss 3.20.1.
... the following security-relevant bugs have been resolved in
nspr 4.10.10, which affect nss.
...And 2 more matches
Index
94 xpcom thread synchronization thread_synchronization, threads, xpcom xpcom thread synchronization primitives have the same semantics as those in
nspr, and each method of these synchronization objects (e.g.
... mutex::lock()) has a matching function in
nspr (pr_lock()).
... this is no accident, as mozilla:: primitives are merely bare-minimum wrappers around
nspr's.
...And 2 more matches
nsILocalFile
prfiledescstar open
nsprfiledesc(in long flags, in long mode); native code only!
... constants constant value description delete_on_close 0x80000000 optional parameter used by open
nsprfiledesc().
... open
nsprfiledesc returns the result of pr_open() on the file.
...And 2 more matches
Signing an XPI - Archive of obsolete content
download the latest netscape portable runtime from the mozilla ftp site: http://ftp.mozilla.org/pub/mozilla.org/
nspr/releases/.
... for windows you'll want the
nspr-4.6.zip package in the v4.6/winnt5.0_opt.obj/ folder.
...in my case it's c:\apps\
nspr-4.6\ add path add the nss tools bin/ and lib/, and the
nspr lib/ directories to the system path.
... c:\> set path=c:\apps\nss-3.11.4\bin\;c:\apps\nss-3.11.4\lib\;c:\apps\
nspr-4.6\lib\;%path% an easier way is to copy everything from your new directories c:\apps\nss-3.11.4\ and c:\apps\
nspr-4.6\ including sub directories to the same directory - fx c:\apps\codesigning\ - and then run every command from that.
Desktop gamepad controls - Game development
first, we need an event listener to listen for the connection of the new device: window.addeventlistener("gamepadconnected", gamepadhandler); it's executed once, so we can create some variables we will need later on for storing the controller info and the pressed buttons: var controller = {}; var butto
nspressed = []; function gamepadhandler(e) { controller = e.gamepad; output.innerhtml = "gamepad: " + controller.id; } the second line in the gamepadhandler function shows up on the screen when the device is connected: we can also show the id of the device — in the case above we're using the xbox 360 wireless controller.
... to update the state of the gamepad's currently pressed buttons we will need a function that will do exactly that on every frame: function gamepadupdatehandler() { butto
nspressed = []; if(controller.buttons) { for(var b=0; b<controller.buttons.length; b++) { if(controller.buttons[b].pressed) { butto
nspressed.push(b); } } } } we first reset the butto
nspressed array to get it ready to store the latest info we'll write to it from the current frame.
... then, if the buttons are available we loop through them; if the pressed property is set to true, then we add them to the butto
nspressed array for later processing.
... next, we'll consider the gamepadbuttonpressedhandler() function: function gamepadbuttonpressedhandler(button) { var press = false; for(var i=0; i<butto
nspressed.length; i++) { if(butto
nspressed[i] == button) { press = true; } } return press; } the function takes a button as a parameter; in the loop it checks if the given button's number is among the currently pressed buttons available in the butto
nspressed array.
Choosing the right memory allocator
nspr memory allocators you should only use the
nspr allocators within
nspr or the security code located in the /security/ subtree of the source code.
... js_malloc() js_realloc() js_free() js_strdup() arena allocators
nspr exposes arena allocators that can be used to efficiently allocate lots of small, uniformly sized objects.
... presshell arena nsipresshell::allocateframe() and
nsprescontext::allocatefromshell() can be used to allocate memory from an arena maintained by the presshell.
... the corresponding deallocators are nsipresshell::freeframe() and
nsprescontext::freetoshell().
Anonymous Shared Memory
this chapter describes the
nspr api for anonymous shared memory.
... anonymous memory protocol anonymous shared memory functions anonymous memory protocol
nspr provides an anonymous shared memory based on
nspr's prfilemap type.
...
nspr provides two protocols.
...
nspr provides helper functions for extracting data from the prfilemap object.
Interval Timing
nspr defines a platform-dependent type, printervaltime, for timing intervals of fewer than approximately 6 hours.
... this chapter describes printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in
nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
...such parameters are common in
nspr functions such as those used for i/o operations and operations on condition variables.
...
nspr 2.0 provides interval times that are efficient in terms of performance and storage requirements.
Memory Management Operations
nspr provides heap-based memory management functions that map to the familiar malloc(), calloc(), realloc(), and free().
... memory allocation functions memory allocation macros memory allocation functions
nspr has its own heap, and these functions act on that heap.
... libraries built on top of
nspr, such as the netscape security libraries, use these functions to allocate and free memory.
... if you are allocating memory for use by such libraries or freeing memory that was allocated by such libraries, you must use these
nspr functions rather than the libc equivalents.
Introduction to Network Security Services
figure 1, below, shows a simplified view of the relationships among the three shared libraries listed above and
nspr, which provides low-level cross platform support for operations such as threading and i/o.
... (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.
... as mentioned above, nss is built on top of
nspr.
... the api documentation for
nspr is available at
nspr api reference.
JSS FAQ
you will need jdk 1.4 or higher and all the 64 bit versions of
nspr, and nss.
...
nspr makes use of nt vs.
...many netscape products, including nss, have nt and windows builds that are essentially the same except one difference: one is linked with the nt version of
nspr and the other is linked with the windows version of
nspr.
...either use the win 95 version of
nspr/nss/jss components (essentially all non-fiber builds) or set the environment variable
nspr_native_threads_only=1.
NSS_3.12.1_release_notes.html
nss 3.12.1 requires
nspr 4.7.1.
...the tar.gz or zip file expands to an nss-3.12.1 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the
nspr 4.7.1 binary distributions to get the
nspr 4.7.1 header files and shared libraries, which nss 3.12.1 requires.
...
nspr 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/
nspr/releases/v4.7.1/.
... values bug 434187: fix the gcc compiler warnings in nss/lib bug 434398: libpkix cannot find issuer cert immediately after checking it with ocsp bug 434808: certutil -b deadlock when importing two or more roots bug 434860: coverity 1150 - dead code in ocsp_createcertid bug 436428: remove unneeded assert from sec_pkcs7encryptlength bug 436430: make nss public headers compilable with no_
nspr_10_support defined bug 436577: uninitialized variable in sec_pkcs5createalgorithmid bug 438685: libpkix doesn't try all the issuers in a bridge with multiple certs bug 438876: signtool is still using static libraries.
NSS_3.12.2_release_notes.html
nss 3.12.2 requires
nspr 4.7.1.
...the tar.gz or zip file expands to an nss-3.12.2 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin< - nss tools and test programs you also need to download the
nspr 4.7.1 binary distributions to get the
nspr 4.7.1 header files and shared libraries, which nss 3.12.2 requires.
...
nspr 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/
nspr/releases/v4.7.1/.
... bug 456854: cert_decodecertpackage does not set
nspr error code upon error bug 457980: hundreds of kilobytes of useless strings in libpkix bug 457984: enable pkcs11 module logging in optimized builds bug 458905: memory leaks in pkix bridge certificates.
NSS 3.12.6 release notes
nss 3.12.6 requires
nspr 4.8.4.
... you also need to download the
nspr 4.8.4 binary distributions to get the
nspr 4.8.4 header files and shared libraries, which nss 3.12.6 requires.
...
nspr 4.8.4 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/
nspr/releases/v4.8.4/.
...nore all bytes after an embedded null bug 536474: add support for logging pre-master secrets bug 537356: implement new safe ssl3 & tls renegotiation bug 537795: nss_initcontext does not work with nss_registershutdown bug 537829: allow nss to build for android bug 540304: implement ssl_handshakenegotiatedextension bug 541228: remove an obsolete
nspr version check in lib/util/secport.c bug 541231: nssinit.c doesn't need to include ssl.h and sslproto.h.
NSS_3.12_release_notes.html
nss 3.12 requires
nspr 4.7.1.
...the tar.gz or zip file expands to an nss-3.12 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the
nspr 4.7.1 binary distributions to get the
nspr 4.7.1 header files and shared libraries, which nss 3.12 requires.
...
nspr 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/
nspr/releases/v4.7.1/.
...bug 401610: shared db fails on iopr tests bug 388120: build error due to sec_begin_protos / sec_end_protos are undefined bug 415264: make security use of new
nspr rotate macros bug 317052: lib/base/what
nspr.c is obsolete bug 317323: set
nspr31_lib_prefix to empty explicitly for win95 and wince builds bug 320336: secitem_allocitem returns a non-null pointer if the allocation of its 'data' buffer fails bug 327529: can't pass 0 as an unnamed null pointer argument to cert_createrdn bug 334683: extraneous semicolons cause empty declaration compiler warnings bug...
NSS 3.47 release notes
nss 3.47 requires
nspr 4.23 or newer.
... removal constant time bug 1589120 - more cbc padding tests bug 1465613 - add ability to distrust certificates issued after a certain date for a specified root cert bug 1588557 - bad debug statement in tls13con.c bug 1579060 - mozilla::pkix tag definitions for issueruniqueid and subjectuniqueid shouldn't have the constructed bit set bug 1583068 - nss 3.47 should pick up fix from bug 1575821 (
nspr 4.23) bug 1152625 - support aes hw acceleration on armv8 bug 1549225 - disable dsa signature schemes for tls 1.3 bug 1586947 - pk11_importandreturnprivatekey does not store nickname for ec keys bug 1586456 - unnecessary conditional in pki3hack, pk11load and stanpcertdb bug 1576307 - check mechanism param and param length before casting to mechanism-specific structs bug 1577953 - support lon...
...utility "derdump" bug 1582343 - soft token mac verification not constant time bug 1578238 - handle invald tag sizes for ckm_aes_gcm bug 1576295 - check all bounds when encrypting with seed_cbc bug 1580286 - nss rejects tls 1.2 records with large padding with sha384 hmac bug 1577448 - create additional nested s/mime test messages for thunderbird bug 1399095 - allow nss-try to be used to test
nspr changes bug 1267894 - libssl should allow selecting the order of cipher suites in clienthello bug 1581507 - fix unportable grep expression in test scripts bug 1234830 - [cid 1242894][cid 1242852] unused values bug 1580126 - fix build failure on aarch64_be while building freebl/gcm bug 1385039 - build
nspr tests as part of nss continuous integration bug 1581391 - fix build on openbsd/arm64 a...
... bug 1542207 - limit policy check on signature algorithms to known algorithms bug 1560329 - drbg: add continuous self-test on entropy source bug 1579290 - asan builds should disable lsan while building bug 1385061 - build
nspr tests with nss make; add gyp parameters to build/run
nspr tests bug 1577359 - build atob and btoa for thunderbird bug 1579036 - confusing error when trying to export non-existent cert with pk12util bug 1578626 - [cid 1453375] ub: decrement nullptr.
NSS sources building testing
because nss depends on the base library
nspr, you should download the archive that combines both nss and
nspr.
... hg clone https://hg.mozilla.org/projects/
nspr hg clone https://hg.mozilla.org/projects/nss after the above commands complete, you should have two local directories, named
nspr and nss, next to each other.
... (historical information:
nspr and nss source code have recently been re-organized into a new directory structure.
...the
nspr base library was located in directory mozilla/
nsprpub.
nss tech note2
to enable this mode, set:
nspr_log_modules=nss_mod_log:1
nspr_log_file=<logfile> the output format is: osthreadid[
nsprthreadid]: c_xxx osthreadid[
nsprthreadid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_initialize 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: rv = 0x0 2.
...to enable this mode, set:
nspr_log_modules=nss_mod_log:3
nspr_log_file=<logfile> the output format is: osthreadid[
nsprthreadid]: c_xxx osthreadid[
nsprthreadid]: arg1 = 0xaaaaaaaa ...
... osthreadid[
nsprthreadid]: argn = 0xaaaaaaaa osthreadid[
nsprthreadid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_initialize 1024[805ef10]: pinitargs = 0x4010c938 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: pinfo = 0xbffff340 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: tokenpresent = 0x0 1024[805ef10]: pslotlist = 0x0 1024[805ef10]: pulcount = 0xbffff33c 1024[805ef10]: *pulcount = 0x2 1024[805ef10]: rv = 0x0 note that when a pkcs #11 function takes a pointer argument for which it will set a value (c_getslotlist above), this mode will display the value upon return.
...to enable this mode, set:
nspr_log_modules=nss_mod_log:4
nspr_log_file=<logfile> the output format is the same as above, but with more information.
Build instructions
build instructions for recent versions (mercurial) clone the
nspr and nss repositories.
... hg clone https://hg.mozilla.org/projects/
nspr hg clone https://hg.mozilla.org/projects/nss if you want to build a releases other than the tips of these repositories, then switch to the release tags: cd
nspr hg update
nspr_4_9_5_rtm cd ../nss hg update nss_3_14_2_rtm cd ..
... cd nss gmake nss_build_all the output of the build will be in the dist directory alongside the
nspr and nss directories.
... check out
nspr and nss: cvs co -r
nspr_4_9_5_rtm
nspr cvs co -r nss_3_14_2_rtm nss set environment variables as described in the mercurial-based instructions.
NSS_3.12.3_release_notes.html
nss 3.12.3 requires
nspr 4.7.4.
...the tar.gz or zip file expands to an nss-3.12.3 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the
nspr 4.7.4 binary distributions to get the
nspr 4.7.4 header files and shared libraries, which nss 3.12.3 requires.
...
nspr 4.7.4 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/
nspr/releases/v4.7.4/.
... bug 426413: audit messages need distinct types bug 438870: free freebl hashing code of dependencies on
nspr and libutil bug 439115: db merge allows nickname conflicts in merged db bug 439199: sse2 instructions for bignum are not implemented on windows 32-bit bug 441321: tolerate incorrect encoding of dsa signatures in ssl 3.0 handshakes bug 444404: libpkix reports unknown issuer for nearly all certificate errors bug 452391: certutil -k incorrectly reports ec private key as an orphan bug 453...
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.
... as a layer of abstraction above the operating system, the
nspr allows gecko applications to be platform independent by providing the following system-level facilities: threads thread synchronization file and network i/o timing and intervals memory management shared library linking the
nspr is included in the gecko sdk.
...on windows or linux, for example, it is possible to multiply a print64 by a long like this: print64 x = 1, y = 2; y = x * 2; however, this same snippet will not compile on a platform like macintosh os 9, where you need to use macros to perform the calculation: print64 x, y, two; ll_i2l(x, 1); ll_i2l(y, 2); ll_i2l(two, 2); ll_mul(y, x, two); a full listing of
nspr's long long support can be found at http://www.mozilla.org/projects/
nspr/.
nsIFile
void normalize(); file openansifiledesc(in string mode); prfiledescstar open
nsprfiledesc(in long flags, in long mode); void renameto(in nsifile newparentdir, in astring newname); void remove(in boolean recursive); void reveal(); void setrelativedescriptor(in nsifile fromfile, in acstring relativedesc); attributes attribute type description directoryentries nsisimpleenumerator returns an enumeration of t...
...the native version of these strings are not guaranteed to be a usable path to pass to
nspr or the c stdlib.
...do not pass to use with
nspr or stdlib!
... delete_on_close 0x80000000 optional parameter used by open
nsprfiledesc methods append() this function is used for constructing a descendant of the current nsifile.
XPCOM Thread Synchronization
xpcom thread synchronization primitives have the same semantics as those in
nspr, and each method of these synchronization objects (e.g.
... mutex::lock()) has a matching function in
nspr (pr_lock()).
... this is no accident, as mozilla:: primitives are merely bare-minimum wrappers around
nspr's.
...for a higher-level introduction to thread synchronization, see introduction_to_
nspr.
Using the Gecko SDK
a frozen gecko api is one that is included in the gecko and marked frozen with the text <tt>@status frozen</tt> (with
nspr as the exception to the rule).
... the frozen gecko api consists of a set of component interfaces (c++ vtables) and <tt>extern "c"</tt> symbols exported from the xpcom library and the
nspr libraries.
...(note:
nspr is the one exception to this rule.
... all
nspr functions are frozen by default and are not marked as such in the respective header files.) the glue library exists to make common tasks easier.
Index of archived content - Archive of obsolete content
lir new security model for web services new skin notes overview of how downloads work plug-n-hack plug-n-hack get involved plug-n-hack phase1 plug-n-hack phase2 plug-n-hack tools supported plugin architecture porting
nspr to unix platforms priority content prism blogposts build bundlelibrary bundles configuration extensions faq hostwindow installer scripting styling proxy ui pydom rdf api ...
... tracevis transforming xml with xslt:mozilla xslt transforming xml with xslt:the netscape xslt treehydra treehydra build instructions treehydra manual tuning pageload urischeme uris and urls uriloader using addresses of stack variables with
nspr threads on win16 using cross commit using gdb on wimpy computers venkman using breakpoints in venkman venkman internals venkman introduction video presentations when to use ifdefs writing textual data xml in mozilla xpinstal...
...ndle supporting private browsing in plugins the first install problem writing a plugin for mac os x xembed extension for mozilla plugins sax security digital signatures encryption and decryption introduction to public-key cryptography introduction to ssl
nspr release engineering guide ssl and tls solaris 10 build prerequisites sunbird theme tutorial table reflow internals tamarin tracing build documentation the basics of web services themes building a theme common firefox theme issues and solutions creating a skin ...
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...
...if it's
nspr that's failing to build, take a look at config/your_platform.mk, as
nspr still uses the classic build system.
...if not, post to netscape.public.mozilla.builds problems of this sort are currently most likely to happen in
nspr, as it still uses the classic build system.
Logging Multi-Process Plugins - Archive of obsolete content
this is done using
nspr logging.
...from within a command prompt: c:\> set
nspr_log_modules=ipcplugins:5 c:\> set
nspr_log_file=c:\plugins.log c:\> cd c:\program files\mozilla firefox c:\> firefox.exe the log file will be saved to c:\plugins.log (or wherever
nspr_log_file is set).
...from within a bash shell: $ export
nspr_log_modules=ipcplugins:5 $ export
nspr_log_file=~/plugins.log $ /usr/bin/firefox the file will be saved to ~/plugins.log (or wherever
nspr_log_file is set).
Atomic Operations
on systems that do not provide direct access to atomic operators,
nspr emulates the capabilities by using its own locking mechanisms.
... for such systems,
nspr performs atomic operations just as efficiently as the client could.
... therefore, to preserve portability, it is recommended that clients use the
nspr api for atomic operations.
Condition Variables
for an introduction to
nspr thread synchronization, including locks and condition variables, see introduction to
nspr.
... for reference information on
nspr locks, see locks.
...
nspr provides a special type, prmonitor, for use with java.
Monitors
in addition to the mutex type prlock,
nspr provides a special type, prmonitor, for use in java programming.
... this chapter describes the
nspr api for creation and manipulation of a mutex of type prmonitor.
... for an introduction to
nspr thread synchronization, including locks and condition variables, see introduction to
nspr.
PRExplodedTime
on input to
nspr functions, only the essential members of prexplodedtime must be specified.
... the two nonessential members (day of week and day of year) are ignored by
nspr functions as input.
... when an
nspr function returns a prexplodedtime object or sets a prexplodedtime object as output, all of the prexplodedtime members are set, including the nonessential members.
PRIntervalTime
a platform-dependent type that represents a monotonically increasing integer--the
nspr runtime clock.
... the reserved constants pr_interval_no_wait and pr_interval_no_timeout have special meaning for
nspr.
...
nspr guarantees that there will be at least 1000 ticks per second and not more than 100000.
PRNetAddr
nspr supports only the internet address family.
... by default,
nspr is built to support only ipv4, but it's possible to build the
nspr library to support both ipv4 and ipv6.
... therefore, the family field can be pr_af_inet only for default
nspr, and can also be pr_af_inet6 if the binary supports ipv6.
PRThreadType
the type of an
nspr thread, specified as a parameter to pr_createthread.
... pr_system_thread
nspr ignores threads of type pr_system_thread when determining when a call to pr_cleanup should return.
...
nspr allows the client to synchronize the termination of all user threads and ignores those created as system threads.
PR_CreateThread
nspr does not assess the type or the validity of the value passed in this parameter.
...however,
nspr may override this preference if necessary.
...for more information on locks and thread synchronization, see introduction to
nspr.
Process Management and Interprocess Communication
this chapter describes the
nspr routines that deal with processes.
...
nspr provides routines to create a new process and to wait for the termination of another process.
...
nspr does not provide an equivalent of the unix fork().
String Operations
this chapter describes some of the key
nspr functions for manipulating strings.
... libraries built on top of
nspr, such as the netscape security libraries, use these functions to manipulate strings.
... if you are copying or examining strings for use by such libraries or freeing strings that were allocated by such libraries, you must use these
nspr functions rather than the libc equivalents.
Thread Pools
this chapter describes the
nspr api thread pools.
... note: this api is a preliminary version in
nspr 4.0 and is subject to change.
...
nspr's thread pool is modeled on the thread pools described by david r.
Building NSS
get the source nss and
nspr use mercurial for source control like other mozilla projects.
... to check out the latest sources for nss and
nspr--which may not be part of a stable release--use the following commands: hg clone https://hg.mozilla.org/projects/
nspr hg clone https://hg.mozilla.org/projects/nss to get the source of a specific release, see nss releases.
... build build nss using our build script: nss/build.sh this builds both
nspr and nss.
Build instructions for JSS 4.3.x
build instructions for jss 4.3.x newsgroup: mozilla.dev.tech.crypto before building jss, you need to set up your system as follows: build
nspr/nss by following the
nspr/nss build instructions, to check that nss built correctly, run all.sh (in mozilla/security/nss/tests) and examine the results (in mozilla/test_results/security/computername.#/results.html.
... unix setenv java_home /usr/local/jdk1.5.0 (or wherever your jdk is installed) windows set java_home=c:\programs\jdk1.5.0 (or wherever your jdk is installed) windows (cygnus) java_home=/cygdrive/c/programs/jdk1.5.0 (or wherever your jdk is installed) export java_home windows build configurations winnt vs win95 as of nss 3.15.4,
nspr/nss/jss build generates a "win95" configuration by default on windows.
...to generate a "winnt" configuration, set os_target=winnt and build
nspr/nss/jss win95.
NSS Memory allocation
nss makes extensive use of
nspr's plarenapools for memory allocation.
...see the prototype at http://mxr.mozilla.org/
nspr/source/n.../ds/plarenas.h a program should call that function at the very end, after having shutdown nss and
nspr, to really free the contents of the free list.
...to accomplish that, set an environment variable prior to the initialization of nss and
nspr.
NSS_3.11.10_release_notes.html
nss 3.11.10 requires
nspr 4.7.1.
...the tar.gz or zip file expands to an nss-3.11.10 directory containing three subdirectories: include - nss header files lib - nss shared libraries bin - nss tools and test programs you also need to download the
nspr 4.7.1 binary distributions to get the
nspr 4.7.1 header files and shared libraries, which nss 3.11.10 requires.
...
nspr 4.7.1 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/
nspr/releases/v4.7.1/.
NSS 3.12.9 release notes
nss 3.12.9 requires
nspr 4.8.7.
... you also need to download the
nspr 4.8.7 binary distributions to get the
nspr 4.8.7 header files and shared libraries, which nss 3.12.9 requires.
...
nspr 4.8.7 binary distributions are in https://ftp.mozilla.org/pub/mozilla.org/
nspr/releases/v4.8.7/.
NSS 3.55 release notes
nss 3.55 requires
nspr 4.27 or newer.
...
nspr dependency updated to 4.27.
... bug 1652331 - update nss 3.55
nspr version to 4.27.
NSS 3.56 release notes
nss 3.56 requires
nspr 4.28 or newer.
... notable changes in nss 3.56
nspr dependency updated to 4.28.
... bug 1656519 - update
nspr dependency to 4.28.
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.
... like nss,
nspr has been battle-tested in multiple products.
... for more information, see the
nspr project page.
Component; nsIPrefBranch
there are 3 approaches which have been implemented in an attempt to avoid these situations: the
nsprefbranch object supports nsisupportsweakreference.
... the
nsprefbranch object listens for xpcom-shutdown and frees all of the objects currently in its observer list.
... the list of registered observers may be changed during the dispatch of
nspref:changed notification.
nsIPrefBranch2
there are 3 approaches which have been implemented in an attempt to avoid these situations: the
nsprefbranch object supports nsisupportsweakreference.
... the
nsprefbranch object listens for xpcom-shutdown and frees all of the objects currently in its observer list.
... the list of registered observers may be changed during the dispatch of
nspref:changed notification.
XPCOM
like the standard libraries, xpcom must be a fairly self-contained library, so as not to encumber clients with any unnecessary external dependencies.xpcom thread synchronizationxpcom thread synchronization primitives have the same semantics as those in
nspr, and each method of these synchronization objects (e.g.
... mutex::lock()) has a matching function in
nspr (pr_lock()).
... this is no accident, as mozilla:: primitives are merely bare-minimum wrappers around
nspr's.xptcall faqxptcall is a small low level xpcom method call library.
Preferences - Archive of obsolete content
you can look up their implementations in
nsprefbranch.cpp.
... var prefservice = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice); this._branch = prefservice.getbranch(branch_name); this._branch.queryinterface(components.interfaces.nsiprefbranch2); this._callback = callback; } preflistener.prototype.observe = function(subject, topic, data) { if (topic == '
nspref:changed') this._callback(this._branch, data); }; /** * @param {boolean=} trigger if true triggers the registered function * on registration, that is, when this method is called.
getAttributeNS - Archive of obsolete content
ng searched (escape period since only character (besides colon) allowed in an xml name which needs escaping) for (var j = 0; j < attrs.length; j++) { // thisitem's atts // e.g., abc:href, xlink:href while (((result = prefixatt.exec(attrs[j].nodename)) !== null) && thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { var xml
nsprefix = new regexp('^xmlns:'+result[1]+'$'); // e.g., xmnls:xl, xmlns:xlink // check higher up for xmlns:prefix // check the current node and if necessary, check for the next matching local name up in the hierarchy (until reaching the document root) while (thisitem.nodename !== '#document' && thisitem.nodename !== '#document-fragment') { attrs2 = t...
...hisitem.attributes; for (var i = 0; i < attrs2.length; i++) { // search for any prefixed xmlns declaration on thisitem which match prefixes found above with desired local name if (attrs2[i].nodename.match(xml
nsprefix) && attrs2[i].nodevalue === ns ) { // e.g., 'xmlns:xlink' and 'http://www.w3.org/1999/xlink' return attrs[j].nodevalue; } } thisitem = thisitem.parentnode; } } } return ''; // if not found (some implementations return 'null' but this is not standard) } alert(getattributenswrapper (someelement, 'http://www.w3.org/1999/xlink', 'href')); // gets xlink:href, xl:href, etc.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
nspr).
...op_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk is_component = 1 module = myextension library_name = myextension use_static_libs = 1 xpi_name = myextension cppsrcs = \ myfirstcomponent.cpp \ mysecondcomponent.cpp \ myextension.cpp \ $(null) include $(topsrcdir)/config/rules.mk extra_dso_ldopts += \ $(moz_component_libs) \ $(
nspr_libs) \ $(null) in this example, the first two files contain the implementation of the extension's two components.
Adding preferences to an extension - Archive of obsolete content
observe: function(subject, topic, data) { if (topic != "
nspref:changed") { return; } switch(data) { case "symbol": this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.refreshinformation(); break; } }, the topic parameter indicates what type of event occurred.
... if it's not
nspref:changed, we simply ignore the event, since all we're interested in is changes to the values of our preferences.
No Proxy For configuration - Archive of obsolete content
the relevant code lives in
nsprotocolproxyservice.cpp.
...
nsprotocolproxyservice::prefschanged - loads preferences
nsprotocolproxyservice::loadfilters - parses filters
nsprotocolproxyservice::examineforproxy - decides to check filters if configuration is "manual"
nsprotocolproxyservice::canuseproxy - performs url vs.
JSS build instructions for OSX 10.6 - Archive of obsolete content
ftp://ftp.mozilla.org/pub/mozilla.org/ <componente> /releases http://www.mozilla.org/projects/secu...using_jss.html steps: export all this: build_opt="1" cvsroot=":pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot" java_home=$(/usr/libexec/java_home") no_mdupdate="1" nsdistmode="copy" ns_use_gcc="1" create working dir: mkdir nss-jss cd nss-jss obtain source: altought manual said
nspr_4_6_4_rtm, nss_3_11_4_rtm, jss_4_2_5_rtm, they didnt work for osx, giving many compiling errors.
... cvs login cvs co -r
nspr_4_8_7_rtm
nspr cvs co -r nss_3_12_9_with_ckbi_1_82_rtm nss cvs co -r jss_4_3_2_rtm jss build nss for 32 and 64: cd mozilla/security/nss make nss_build_all cc="gcc -arch i386" ccc="g++ -arch i386" make nss_build_all use_64=1 build jss for 32 and 64: cd ../jss make cc="gcc -arch i386" ccc="g++ -arch i386" make use_64=1 on osx, java.library.path doesnt seem to have /usr/lib or other paths.
MacFAQ - Archive of obsolete content
global/content/nsusersettings.js" /> <script><![cdata[ function debug(alogstring) { var mconsoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice) mconsoleservice.logstringmessage("myxul: " + alogstring + "\n"); } function checkotherwindows() { var singletonwindowtype =
nspreferences.copyunicharpref("toolkit.singletonwindowtype"); var windowmediator = components.classes["@mozilla.org/appshell/window-mediator;1"] .getservice(components.interfaces.nsiwindowmediator); var win = windowmediator.getmostrecentwindow(singletonwindowtype); if (win) { window.close(); win.focus(); } } if (window.arg...
...uments && window.arguments[0]){ try { var cmdline = window.arguments[0] .queryinterface(components.interfaces.nsicommandline); for (var i = 0; i < cmdline.length; ++i) { debug(cmdline.getargument(i)) } } catch(ex) { debug(window.arguments[0]) // do something with window.arguments[0] //
nspreferences.setunicharpref("myxul.cmdlinevalue", window.arguments[0]) } window.addeventlistener("load", checkotherwindows , false); } ]]></script> </window> ...
Archived Mozilla and build documentation - Archive of obsolete content
porting
nspr to unix platforms last modified 16 july 1998 priority content update: i've removed documents from this list that have been migrated into the wiki.
...resources are identified by uri "uniform resource identifier" (taken from rfc 2396): urischeme list of mozilla supported uri schemes using addresses of stack variables with
nspr threads on win16 this is a cautionary note that may be old information for some of you.
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.
... due to a limitation of the present implementation of
nspr io on nt, programs must follow the following guideline: using ssh to connect to cvs using web standards in your web pages using workers in extensions this article shows you how to use worker threads in extensions to perform tasks in the background without blocking the user interface.
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.
...typically, the traversal order looks something like base,
nspr, nss, js, platform, app.
Gecko Logging
it is enabled for all builds, thread-safe, and the preferred alternative to
nspr logging.
... some other mostly-useless information on logging can be found on the
nspr logging page.
Hash Tables
this chapter describes the hash table functions in the plds (portable library — data structures) library of
nspr.
... warning: the
nspr hash table library functions are not thread safe.
IPC Semaphores
this chapter describes the
nspr api for using interprocess communication semaphores.
...
nspr provides an interprocess communication mechanism using a counting semaphore model similar to that which is provided in unix and windows platforms.
Long Long (64-bit) Integers
where 64-bit integers are desired, use of
nspr's implementation is recommended to ensure cross-platform compatibility.
... 64-bit integer types
nspr provides two types to represent 64-bit integers: print64 pruint64 64-bit integer functions the api defined for the 64-bit integer functions is consistent across all supported platforms.
Named Shared Memory
the chapter describes the
nspr api for named shared memory.
...the
nspr shared memory api provides a cross-platform named shared-memory interface that is modeled on similar constructs in the unix and windows operating systems.
Network Addresses
this chapter describes the
nspr types and functions used to manipulate network addresses.
... all
nspr functions that require prnetaddr as an argument accept either an ipv4 or ipv6 version of the address.
PRThread
an
nspr thread.
... syntax #include <prthread.h> typedef struct prthread prthread; description in
nspr, a thread is represented by a pointer to an opaque structure of type prthread.
PRThreadPriority
pr_priority_last placeholder description in general, an
nspr thread of higher priority has a statistically better chance of running relative to threads of lower priority.
... however, because of the multiple strategies
nspr uses to implement threading on various host platforms,
nspr priorities are not precisely defined.
PRTime
syntax #include <prtime.h> typedef print64 prtime; description this type is a 64-bit integer representing the number of microseconds since the
nspr epoch, midnight (00:00:00) 1 january 1970 coordinated universal time (utc).
... in
nspr, we use the more familiar term greenwich mean time (gmt) in place of utc.
PR_Cleanup
coordinates a graceful shutdown of
nspr.
... syntax #include <prinit.h> prstatus pr_cleanup(void); returns the function returns one of the following values: if
nspr has been shut down successfully, pr_success.
PR_GetError
nspr provides no direct interpretation of the number's value.
...
nspr does use pr_seterror to set error numbers defined in error codes.
PR_Interrupt
in all
nspr implementations, the maximum delay is at most five seconds.
...unfortunately the standard input, output, and error streams are treated as files by
nspr, so a pr_read call on pr_stdin cannot be interrupted even though it may block indefinitely.
PR_SetError
syntax #include <prerror.h> void pr_seterror(prerrorcode errorcode, print32 oserr) parameters the function has these parameters: errorcode the
nspr (platform-independent) translation of the error.
... description
nspr does not validate the value of the error number or os error number being specified.
PR_SetErrorText
the new value is copied into storage allocated and owned by
nspr and remains there until the next call to pr_seterror or another call to pr_seterrortext.
...
nspr makes no use of this function.
PR_SetLogBuffering
returns nothing description this function sets the size of the buffer used in
nspr logging.
... ordinarily, a user application need not use this function, as
nspr initializes logging at
nspr startup.
Process Initialization
this chapter describes the
nspr api for versioning, process initialization, and shutdown of
nspr.
... identity and versioning initialization and cleanup module initialization identity and versioning name and version constants pr_name pr_version pr_versioncheck initialization and cleanup
nspr detects whether the library has been initialized and performs implicit initialization if it hasn't.
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.
... jss 4.3.1 requires
nspr 4.7.1 or higher though
nspr 3.13 is recommended.
NSS 3.12.5 release_notes
nss 3.12.5 requires
nspr 4.8.
... you can check out the source from cvs by cvs co -r
nspr_4_8_rtm
nspr cvs co -r nss_3_12_5_rtm nss see the documentation section for the build instructions.
NSS 3.16 release notes
nss 3.16 requires
nspr 4.10.3 or newer.
...(this requires
nspr 4.10.4.) to build for the linux x32 target, set the environment variable use_x32=1 when building nss.
NSS 3.22.1 release notes
nss 3.22.1 requires
nspr 4.12 or newer.
... notable changes in nss 3.22.1 bug 1194680: nss has been changed to use the pr_getenvsecure function that was made available in
nspr 4.12 compatibility nss 3.22.1 shared libraries are backward compatible with all older nss 3.22 shared libraries.
NSS 3.44 release notes
nss 3.44 requires
nspr 4.21 or newer.
...entication break when using record layer separation 1521578 - x25519 support in pk11pars.c 1540205 - freebl build fails with -dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc/cxx variables passed to
nspr 1543545 - allow to build nss as a static library 1487597 - early data that arrives before the handshake completes can be read afterwards 1548398 - freebl_gtest not building on linux/mac 1548722 - fix some coverity warnings 1540652 - softoken/sdb.c: logically dead code 1549413 - android log lib is not included in build 1537927 - ipsec usage is too restrictive for existing deployments 15496...
NSS 3.48 release notes
nss 3.48 requires
nspr 4.24 or newer.
... bugs fixed in nss 3.48 bug 1600775 - require
nspr 4.24 for nss 3.48 bug 1593401 - fix race condition in self-encrypt functions bug 1599545 - fix assertion and add test for early key update bug 1597799 - fix a crash in nssckfwobject_getattributesize bug 1591178 - add entrust root certification authority - g4 certificate to nss bug 1590001 - prevent negotiation of versions lower than 1.3 after helloretryrequest bug 1596450 - added a simplifi...
NSS 3.50 release notes
nss 3.50 requires
nspr 4.25 or newer.
... bug 1547639 - update zlib in nss to 1.2.11 bug 1609181 - detect arm (32-bit) cpu features on freebsd bug 1602386 - fix build on freebsd/powerpc* bug 1608151 - introduce nss_disable_altivec bug 1612623 - depend on
nspr 4.25 bug 1609673 - fix a crash when nss is compiled without libnssdbm support, but the nssdbm shared object is available anyway.
NSS 3.54 release notes
nss 3.54 requires
nspr 4.26 or newer.
... bug 1640516 - nss 3.54 should depend on
nspr 4.26.
NSS Developer Tutorial
the exact-width integer types in
nspr should be used, in preference to those declared in <stdint.h> (which will be used by
nspr in the future).
... update nss in mozilla-inbound and mozilla-central the procedure is documented at https://developer.mozilla.org/docs/updating_
nspr_or_nss_in_mozilla-central.
NSS Sample Code Sample_3_Basic Encryption and MACing
sample code 3 /*
nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #...
...*/ /*
nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute ret...
NSS environment variables
the trace information is written to the file pointed by
nspr_log_file (default stderr).
... before 3.0 use_pthreads boolean (1 to enable) on platforms where posix threads are available, but are not the os'es preferred threads library, this tells nss and
nspr to build using pthreads.
NSS tools : modutil
the installer obtains these values from
nspr.
...
nspr supports these platforms: o aix (rs6000) o bsdi (x86) o freebsd (x86) o hpux (hppa1.1) o irix (mips) o linux (ppc, alpha, x86) o macos (powerpc) o ncr (x86) o nec (mips) o os2 (x86) o osf (alpha) o reliantunix (mips) o sco (x86) o solaris (sparc) o sony (mips) o sunos (sparc) o unixware (x86) o win16 (x86) o win95 (x86) o winnt (x86) for example: irix:6.2:mips sunos:5.5.1:sparc linux:2.0.32:x86 win95::x86 the module information is defined independently for each platform in the modulename, modulefile, and files attributes.
OLD SSL Reference
pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_isreadonly pk11_setpasswordfunc chapter 8 nss and ssl error codes nss error codes are retrieved using the
nspr function pr_geterror.
... in addition to the error codes defined by
nspr, pr_geterror retrieves the error codes described in this chapter.
gtstd.html
figure 2.1 illustrates the relationships between
nspr, ssl, pkcs #11, and the available cryptographic modules.
... ssl is built on top of
nspr, which handles sockets, threads, and related low-level os operations.
sslerr.html
upgraded documentation may be found in the current nss reference nss and ssl error codes chapter 8 nss and ssl error codes nss error codes are retrieved using the
nspr function pr_geterror.
... in addition to the error codes defined by
nspr, pr_geterror retrieves the error codes described in this chapter.
NSS Tools modutil
the installer obtains these values from
nspr.
...the following system names and platforms are currently defined by
nspr: aix (rs6000) bsdi (x86) freebsd (x86) hpux (hppa1.1) irix (mips) linux (ppc, alpha, x86) macos (powerpc) ncr (x86) nec (mips) os2 (x86) osf (alpha) reliantunix (mips) sco (x86) solaris (sparc) sony (mips) sunos (sparc) unixware (x86) win16 (x86) win95 (x86) winnt (x86) here are some examples of valid platform strings: irix:6.2:mipssunos:5.5.1:sparclinux:2.0.32:x86win95::x86.
NSS tools : modutil
the installer obtains these values from
nspr.
...
nspr supports these platforms: o aix (rs6000) o bsdi (x86) o freebsd (x86) o hpux (hppa1.1) o irix (mips) o linux (ppc, alpha, x86) o macos (powerpc) o ncr (x86) o nec (mips) o os2 (x86) o osf (alpha) o reliantunix (mips) o sco (x86) o solaris (sparc) o sony (mips) o sunos (sparc) o unixware (x86) o win16 (x86) o win95 (x86) o winnt (x86) for example: irix:6.2:mips sunos:5.5.1:sparc linux:2.0.32:x86 win95::x86 the module information is defined independently for each platform in the modulename, modulefile, and files attributes.
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.
...
nspr reference
nspr api documentation.
Future directions
nspr the plan is to make spidermonkey not depend on
nspr.
... no fundamental blockers currently exist, but ctypes is still using
nspr's runtime library loading facilities.
SpiderMonkey 1.8.5
to enable js-ctypes in your embedding, you must configure with the --enable-ctypes option and choose one of the configuration options to enable
nspr (e.g.
... --with-system-
nspr).
SpiderMonkey 1.8.7
to enable js-ctypes in your embedding, you must configure with the --enable-ctypes option and choose one of the configuration options to enable
nspr (e.g.
... --with-system-
nspr).
SpiderMonkey 31
on posix platforms, building a threadsafe shell no longer requires
nspr.
... embedders still need to build with
nspr, as the new wrappers require using spidermonkey internal functions which are not exposed to the public api.
Mozilla internal string guide
nsprintfcstring- derived from nscstring, this string behaves like an nsautocstring.
... nssubstringtuple - created via string concatenation nsdependentsubstring - created through substring
nspromiseflatstring - created through promiseflatstring() nsliteral[c]string - created through the ""_ns and u""_ns user-defined literals of course, there are times when it is necessary to reference these string classes in your code, but as a general rule they should be avoided.
nsIDocShell
allowd
nsprefetch boolean attribute that determines whether dns prefetch is allowed for this subtree of the docshell tree.
...obsolete since gecko 1.8 prescontext
nsprescontext presentation context for the currently loaded document.
Troubleshooting XPCOM components registration
if the error appears, you can use
nspr logging to see additional information about the failure by running firefox from a command prompt: rem close all firefox windows!
... set
nspr_log_modules=nsnativemoduleloader:5 set
nspr_log_file=c:\path\to\logfile "c:\program files\mozilla firefox\firefox.exe" examining this log for warning and errors may provide valuable clues why the component failed to load.
Debugger.Object - Firefox Developer Tools
extensio
nsprevented(frame) the referent has been made non-extensible, as if by a call to object.preventextensions.
...ifhandler is null, the property is no longer watched.handler is as described for debugger.object.prototype.setobjectwatchpoint, except that it does not receive extensio
nsprevented events.
io/file - Archive of obsolete content
apart from these options, this api always passes the following options: create_file, truncate (see //github.com/realityripple/uxp/blob/master/
nsprpub/pr/include/prio.h#550).
Using Dependent Libraries In Extension Components - Archive of obsolete content
srcdir = @srcdir@ topsrcdir = @top_srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = bsmedberg library_name = bsmedberg_stub is_component = 1 force_shared_lib = 1 requires = \ xpcom \ string \ $(null) cppsrcs = bdsstubloader.cpp extra_dso_ldopts += \ $(dist)/lib/$(lib_prefix)xpcomglue_s.$(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(
nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" extensions/stub/bdsstubloader.cpp // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { // depend...
List of Mozilla-Based Applications - Archive of obsolete content
e-learning authoring system about 200 users imvu 3d chat client incredimail 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 ...
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
1" ); defaultpref("mail.accountmanager.defaultaccount", "account1" ); defaultpref("mail.smtp.defaultserver", "smtp1" ); defaultpref("mail.smtpservers", "smtp1" ); // close the try, and call the catch() } catch(e) { displayerror("lockedpref", e); } test autoconfig debug to check that our autoconfig works fine, we just set to env variable to check the read of thunderbird.cfg file: $ export
nspr_log_modules=mcd:5 $ export
nspr_log_file=/tmp/thunderbird-log.txt when thunderbird has started, you should read: $ cat /tmp/thunderbird-log.txt -1209403040[808a788]: general.config.filename = thunderbird.cfg -1209403040[808a788]: evaluating .cfg file thunderbird.cfg with obscurevalue 0 clean then, to be sure to start with a fresh thunderbird account, don't do this if you already have one ...
Building TransforMiiX standalone - Archive of obsolete content
this will pull the necessary subtree with mozilla/client.mk mozilla/build/unix/modules.mk mozilla/build mozilla/config mozilla/expat mozilla/extensions/transformiix mozilla/include mozilla/allmakefiles.sh mozilla/client.mk mozilla/aclocal.m4 mozilla/configure mozilla/configure.in mozilla/makefile.in plus
nspr and xpcom from the cvs repository.
Mozilla Application Framework in Detail - Archive of obsolete content
or; scalable 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 ss...
Using LDAP XPCOM with XULRunner - Archive of obsolete content
srcdir = @srcdir@ topsrcdir = @top_srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = mozldapstub library_name = mozldap_stub is_component = 1 force_shared_lib = 1 requires = \ xpcom \ string \ $(null) cppsrcs = ldapstubloader.cpp extra_dso_ldopts += \ $(dist)/lib/$(lib_prefix)xpcomglue_s.$(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(
nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" ldapstubloader.cpp: // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { #ifdef ns_win32 moz_dl...
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.
Using workers in extensions - Archive of obsolete content
observe: function(subject, topic, data) { if (topic != "
nspref:changed") { return; } switch(data) { case "symbol": this.tickersymbol = this.prefs.getcharpref("symbol").touppercase(); this.worker.postmessage(this.tickersymbol); break; } }, the key here is line 10, which sends the new ticker symbol to monitor to the ticker thread by calling its postmessage() method.
Makefile - variables
dest=$(moz_objdir)/$project moz_current_project moz_debug moz_enable_xremote moz_feeds moz_help_viewer moz_native_
nspr moz_metro moz_pkg_mainfest moz_preflight_all moz_rdf moz_toolkit_search moz_url_classifier moz_widget_toolkit android, beos, cocoa, gtk2, os2, qt, windows moz_xpctools moz_xul ...
Interface Compatibility
jsapi,
nspr, nss, and other libraries which are currently shipped as separate shared libraries may be integrated into libxul, and extension authors should avoid linking against them.
Gecko SDK
contents of the sdk the sdk contains the following: 1.9.2 idl files for frozen interfaces (under idl/) header files for frozen interfaces, xpcom functions, and
nspr functions (under include/) import libraries or shared libraries (under lib/) static utility libraries (under lib/) various tools (under bin/) for more information about safely linking xpcom components using the xpcom "glue" library, see xpcom glue.
mozilla::CondVar
please see introduction_to_
nspr for a high-level summary of its semantics.
mozilla::Monitor
please see introduction_to_
nspr for a high-level summary of its semantics.
mozilla::Mutex
please see introduction_to_
nspr for a high-level summary of its semantics.
BloatView
textimpl 265440 81.19% 283584 -26.99% ctoken 236500 17.32% 306676 20.64% nsstr 217760 14.94% 5817060 7.63% nsxulattribute 113048 -70.92% 113568 -71.16% literalimpl 53280 26.62% 75840 19.40% nsxulelement 51648 0.00% 51648 0.00%
nsprofile 51224 0.00% 51224 0.00% nsframe 47568 -26.15% 48096 -50.49% cssdeclarationimpl 42984 0.67% 43488 0.67% this "delta report" shows the leak offenders, sorted from most leaks to fewest.
Leak-hunting strategies and tips
some places you can do this are: layout engine define debug_tracemalloc_framearena where it is commented out in layout/base/
nspresshell.cpp glib set the environment variable g_slice=always-malloc other references performance tools leak debugging screencasts (dbaron) leakingpages - a list of pages known to leak mdc:performance - contains documentation for all of our memory profiling and leak detection tools ...
Leak Gauge
nspr_log_modules=domleak:5,documentleak:5,nsdocshellleak:5,nodeinfomanagerleak:5
nspr_log_file=
nspr.log # or any other filename of your choice this will overwrite any existing file called
nspr.log.
TimerFirings logging
nspr_log_modules=timerfirings:4 output once enabled, timerfirings will print one line of logging output per timer fired.
Dynamic Library Linking
this section describes
nspr's programming interface to load, unload and resolve symbols in dynamic libraries.
Linked Lists
this chapter describes the
nspr api for managing linked lists.
PL_strdup
returns a pointer to a new memory node in the
nspr heap containing a copy of a specified string.
PRCondVar
syntax #include <prcvar.h> typedef struct prcondvar prcondvar; description an
nspr condition variable is an opaque object identified by a pointer.
PRDescIdentity
there are three well-known identities: pr_invalid_io_layer, an invalid layer identity, for error return pr_top_io_layer, the identity of the top of the stack pr_
nspr_io_layer, the identity used by
nspr proper layers are created by pr_getuniqueidentity.
PRFileDesc
description the fields of this structure are significant only if you are implementing a layer on top of
nspr, such as ssl.
PRFloat64
the
nspr floating-point type is always 64 bits.
PRHostEnt
for valid
nspr usage, this field must have a value indicating either an ipv4 or an ipv6 address.
PRLock
syntax #include <prlock.h> typedef struct prlock prlock; description
nspr represents a lock as an opaque entity to clients of the functions described in "locks".
PRSockOption
description the prsockoption enumeration consists of all the socket options supported by
nspr.
PRThreadPrivateDTOR
if the data associated with the index is not null,
nspr passes a reference to the data to the destructor function when the thread terminates.
PR_AttachSharedMemory
syntax #include <prshm.h>
nspr_api( void * ) pr_attachsharedmemory( prsharedmemory *shm, printn flags ); /* define values for pr_attachsharedmemory(...,flags) */ #define pr_shm_readonly 0x01 parameters the function has these parameters: shm the handle returned from pr_opensharedmemory.
PR_CALLBACK
syntax #include <prtypes.h>type pr_callbackimplementation description functions that are implemented in an application (or shared library) that are intended to be called from another shared library (such as
nspr) must be declared with the pr_callback attribute.
PR_CancelJob
syntax #include <prtpool.h>
nspr_api(prstatus) pr_canceljob(prjob *job); parameter the function has the following parameter: job a pointer to a prjob structure returned by a pr_queuejob function representing the job to be cancelled.
PR_CloseSemaphore
syntax #include <pripcsem.h>
nspr_api(prstatus) pr_closesemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_CloseSharedMemory
syntax #include <prshm.h>
nspr_api( prstatus ) pr_closesharedmemory( prsharedmemory *shm ); parameter the function has these parameter: shm the handle returned from pr_opensharedmemory.
PR_CreateThreadPool
syntax #include <prtpool.h>
nspr_api(prthreadpool *) pr_createthreadpool( print32 initial_threads, print32 max_threads, pruint32 stacksize ); parameters the function has the following parameters: initial_threads the number of threads to be created within this thread pool.
PR_DeleteSemaphore
syntax #include <pripcsem.h>
nspr_api(prstatus) pr_deletesemaphore(const char *name); parameter the function has the following parameter: name the name of a semaphore that was previously created via a call to pr_opensemaphore.
PR_DeleteSharedMemory
syntax #include <prshm.h>
nspr_api( prstatus ) pr_deletesharedmemory( const char *name ); parameter the function has these parameter: shm the handle returned from pr_opensharedmemory.
PR_DestroyPollableEvent
syntax
nspr_api(prstatus) pr_destroypollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
PR_DetachSharedMemory
syntax #include <prshm.h>
nspr_api( prstatus ) pr_detachsharedmemory( prsharedmemory *shm, void *addr ); parameters the function has these parameters: shm the handle returned from pr_opensharedmemory.
PR_ExportFileMapAsString
syntax #include <prshma.h>
nspr_api( prstatus ) pr_exportfilemapasstring( prfilemap *fm, prsize bufsize, char *buf ); define pr_filemap_string_bufsize 128 parameters the function has the following parameters: fm a pointer to the prfilemap to be represented as a string.
PR_GetInheritedFileMap
syntax #include <prshma.h>
nspr_api( prfilemap *) pr_getinheritedfilemap( const char *shmname ); parameter the function has the following parameter: shmname the name provided to pr_processattrsetinheritablefilemap.
PR_GetRandomNoise
syntax #include <prrng.h>
nspr_api(prsize) pr_getrandomnoise( void *buf, prsize size ); parameters the function has these parameters: buf a pointer to a caller-supplied buffer to contain the generated random number.
PR_ImportFileMapFromString
syntax #include <prshma.h>
nspr_api( prfilemap * ) pr_importfilemapfromstring( const char *fmstring ); parameter the function has the following parameter: fmstring a pointer to string created by pr_exportfilemapasstring.
PR_Init
description
nspr is now implicitly initialized, usually by the first
nspr function called by a program.
PR_Initialize
description pr_initialize initializes the
nspr runtime and places
nspr between the caller and the runtime library.
PR_IntervalNow
returns the value of
nspr's free-running interval timer.
PR_JoinJob
syntax #include <prtpool.h>
nspr_api(prstatus) pr_joinjob(prjob *job); parameter the function has the following parameter: job a pointer to a prjob structure returned by a pr_queuejob function representing the job to be cancelled.
PR_JoinThreadPool
syntax #include <prtpool.h>
nspr_api(prstatus) pr_jointhreadpool( prthreadpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_NAME
syntax #include <prinit.h> #define pr_name "
nspr" description
nspr name.
PR_NetAddrToString
description the network address to be converted (addr) may be either an ipv4 or ipv6 address structure, assuming that the
nspr library and the host system are both configured to utilize ipv6 addressing.
PR_NewLogModule
if the environment variable
nspr_log_modules contains the specified name, then the associated level value from the variable is associated with the new prlogmoduleinfo structure.
PR_Now
description pr_now() returns the current time as number of microseconds since the
nspr epoch, which is midnight (00:00:00) 1 january 1970 utc.
PR_OpenAnonFileMap
creates or opens a named semaphore with the specified name syntax #include <prshma.h>
nspr_api( prfilemap *) pr_openanonfilemap( const char *dirname, prsize size, prfilemapprotect prot ); parameters the function has the following parameters: dirname a pointer to a directory name that will contain the anonymous file.
PR_OpenSemaphore
syntax #include <pripcsem.h> #define pr_sem_create 0x1 /* create if not exist */ #define pr_sem_excl 0x2 /* fail if already exists */
nspr_api(prsem *) pr_opensemaphore( const char *name, printn flags, printn mode, pruintn value ); parameters the function has the following parameters: name the name to be given the semaphore.
PR_OpenSharedMemory
syntax #include <prshm.h>
nspr_api( prsharedmemory * ) pr_opensharedmemory( const char *name, prsize size, printn flags, printn mode ); /* define values for pr_opensharememory(...,create) */ #define pr_shm_create 0x1 /* create if not exist */ #define pr_shm_excl 0x2 /* fail if already exists */ parameters the function has the following parameters: name the name of the shared memory segment.
PR_PostSemaphore
syntax #include <pripcsem.h>
nspr_api(prstatus) pr_postsemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
PR_ProcessAttrSetInheritableFileMap
syntax #include <prshma.h>
nspr_api(prstatus) pr_processattrsetinheritablefilemap( prprocessattr *attr, prfilemap *fm, const char *shmname ); parameters the function has the following parameters: attr pointer to a prprocessattr structure used to pass data to pr_createprocess.
PR_QueueJob
syntax #include <prtpool.h>
nspr_api(prjob *) pr_queuejob( prthreadpool *tpool, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Accept
syntax #include <prtpool.h>
nspr_api(prjob *) pr_queuejob_accept( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Connect
syntax #include <prtpool.h>
nspr_api(prjob *) pr_queuejob_connect( prthreadpool *tpool, prjobiodesc *iod, const prnetaddr *addr, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Read
syntax #include <prtpool.h>
nspr_api(prjob *) pr_queuejob_read( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Timer
syntax #include <prtpool.h>
nspr_api(prjob *) pr_queuejob_timer( prthreadpool *tpool, printervaltime timeout, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Write
syntax #include <prtpool.h>
nspr_api(prjob *) pr_queuejob_write( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_ReadDir
the flags parameter is an enum of type prdirflags: typedef enum prdirflags { pr_skip_none = 0x0, pr_skip_dot = 0x1, pr_skip_dot_dot = 0x2, pr_skip_both = 0x3, pr_skip_hidden = 0x4 } prdirflags; the memory associated with the returned prdirentry structure is managed by
nspr.
PR_SetConcurrency
description setting concurrency controls the number of virtual processors that
nspr uses to implement its m x n threading model.
PR_SetIPv6Enable
this function was removed in
nspr 4.0 and does not exist any more.
PR_SetLogFile
ordinarily, a user application need not use this function, as
nspr initializes logging at
nspr startup.
PR_SetPollableEvent
syntax
nspr_api(prstatus) pr_setpollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
PR_SetThreadPrivate
description if the thread already has non-null private data associated with it, and if the destructor function for the index is known (not null),
nspr calls the destructor function associated with the index before setting the new data value.
PR_ShutdownThreadPool
syntax #include <prtpool.h>
nspr_api(prstatus) pr_shutdownthreadpool( prthreadpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_StringToNetAddr
if the
nspr library and the host are configured to support ipv6, both formats are supported.
PR_TicksPerSecond
this value is platform-dependent and does not change after
nspr is initialized.
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_WaitForPollableEvent
syntax
nspr_api(prstatus) pr_waitforpollableevent(prfiledesc *event); parameter the function has the following parameter: event pointer to a prfiledesc structure previously created via a call to pr_newpollableevent.
PR_WaitSemaphore
syntax #include <pripcsem.h>
nspr_api(prstatus) pr_waitsemaphore(prsem *sem); parameter the function has the following parameter: sem a pointer to a prsem structure returned from a call to pr_opensemaphore.
Encrypt Decrypt MAC Keys As Session Objects
*/ /*
nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header ...
Encrypt and decrypt MAC using token
*/ /*
nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_heade...
JSS
jss requires
nspr and nss.
Enc Dec MAC Output Public Key as CSR
*/ /*
nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include #include #include #include #include #include #include #include #include #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #defi...
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
*/ /*
nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* he...
Encrypt Decrypt_MAC_Using Token
*/ /*
nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_heade...
NSS Sample Code Sample_1_Hashing
sample code 1 /*
nspr headers */ #include <prprf.h> #include <prtypes.h> #include <plgetopt.h> #include <prio.h> /* nss headers */ #include <secoid.h> #include <secmodt.h> #include <sechash.h> typedef struct { const char *hashname; secoidtag oid; } nametagpair; /* the hash algorithms supported */ static const nametagpair hash_names[] = { { "md2", sec_oid_md2 }, { "md5", sec_oid_md5 }, { "sha1", sec_oid_sha1 }, { "sha256", sec_oid_sha256 }, { "sha384", sec_oid_sha384 }, { "sha512", sec_oid_sha512 } }; /* * maps a hash name to a secoidtag.
NSS Sample Code Sample_2_Initialization of NSS
sample code 1 /*
nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prprf.h> /* nss headers */ #include <nss.h> #include <pk11func.h> #include "util.h" /* print a usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d <dbdirpath> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\n\...
Hashing - sample 1
*/ /*
nspr headers */ #include <prprf.h> #include <prtypes.h> #include <plgetopt.h> #include <prio.h> /* nss headers */ #include <secoid.h> #include <secmodt.h> #include <sechash.h> #include <nss.h> typedef struct { const char *hashname; secoidtag oid; } nametagpair; /* the hash algorithms supported */ static const nametagpair hash_names[] = { { "md2", sec_oid_md2 }, { "md5", sec_oid_md5 }, { "sha1", sec_oid_...
EncDecMAC using token object - sample 3
*/ /*
nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----be...
sample1
/*
nspr headers */ #include <prprf.h> #include <prtypes.h> #include <plgetopt.h> #include <prio.h> #include <prprf.h> /* nss headers */ #include <secoid.h> #include <secmodt.h> #include <sechash.h> typedef struct { const char *hashname; secoidtag oid; } nametagpair; /* the hash algorithms supported */ static const nametagpair hash_names[] = { { "md2", sec_oid_md2 }, { "md5", sec_oid_md5 }, { "sha1", sec_oid_sha1 }, { "sha256", sec_oid_sha256 }, { "sha384", sec_oid_sha384 }, { "sha512", sec_oid_sha512 } }; /* maps a hash name to a secoidtag.
sample2
*/ /*
nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <cryptohi.h> #include <keyhi.h> #include <pk11priv.h> #include <cert.h> #include <base64.h> #include <secerr.h> #include <secport.h> #include <secoid.h> #include <secmodt.h> #include <secoidt.h> #include <sechash.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_...
Installation guide
nspr: lib
nspr4.so libplds4.so libplc4.so nss: (note the use of * for libfreebl -- some platforms have multiple ones) libfreebl*3.so libfreebl*3.chk libsoftokn3.so libsoftokn3.chk libnss3.so libsmime3.so libssl3.so libnssckbi.so ...
Sample manual installation
after building nss with "gmake nss_build_all", the resulting build can be found in the nss source tree as follows: nss header files: mozilla/dist/public/nss
nspr header files: mozilla/dist/<obj-dir>/include
nspr/nss shared libs: mozilla/dist/<obj-dir>/lib nss binary executables: mozilla/dist/<obj-dir>/bin.
NSS reference
pher sec_pkcs12encode sec_pkcs12destroyexportcontext sec_pkcs12decoderstart sec_pkcs12decoderimportbags sec_pkcs12decoderupdate sec_pkcs12decoderfinish sec_pkcs12decodervalidatebags sec_pkcs12decoderverify sec_pkcs12decodergetcerts sec_pkcs12decodersettargettokencas sec_pkcs12decoderiterateinit sec_pkcs12decoderiteratenext sec_pkcs12isencryptionallowed sec_pkcs12setpreferredcipher
nspr functions a small number of
nspr functions are required for using the certificate verification and ssl functions in nss.
sslcrt.html
for more information, see the
nspr header pr_time.h.
ssltyp.html
some of these functions also use types defined by
nspr and described in the
nspr reference.
NSS Tools
eliminate use of getopt() and replace with
nspr calls to get command options (to eliminate platform dependencies with getopt()).
Necko Architecture
dependencies necko requires the following libraries for linking:
nspr xpcom original document information author(s): jud valeski last updated date: november 8, 1999 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Necko FAQ
currently you'd need to get the mozilla tree and at least build
nspr, and xpcom.
FOSS
python http://pypi.python.org/pypi/python-spidermonkey wxwidgets gluescript (formerly wxjavascript) code generators jsapigen - generates bindings for embedding spidermonkey in c applications extensions http://code.google.com/p/jslibs/ - zlib, sqlite,
nspr, ode, libpng, libjpeg, libffi, (...) libraries for spidermonkey http://www.jsdb.org/ - a js shell with native objects for files, networks, databases, compression, email, etc.
Mozilla Projects
nspr netscape portable runtime (
nspr) provides a platform-neutral api for system level and libc-like functions.
How to build a binary XPCOM component using Visual Studio
then make the following tweaks: add "..\gecko-sdk\include" to additional include directories add "..\gecko-sdk\lib" to additional library directories add "
nspr4.lib xpcom.lib xpcomglue_s.lib" to additional dependencies add "xp_win;xp_win32″ to preprocessor definitions turn off precompiled headers (just to keep it simple) use a custom build step for the xpcom idl file (spawns xpidl-build.bat to process the idl with mozilla toolset, not midl) vc++ express project: xpcom-test.zip note: the project uses xpcom_glue.
nsACString_internal
g/en/nsfixedcstring" shape="rect" title="nsfixedcstring"> <area alt="" coords="315,197,437,245" href="http://developer.mozilla.org/en/nsxpidlcstring" shape="rect" title="nsxpidlcstring"> <area alt="" coords="461,197,611,245" href="http://developer.mozilla.org/en/nsdependentcstring" shape="rect" title="nsdependentcstring"> <area alt="" coords="635,197,787,245" href="http://developer.mozilla.org/en/
nspromiseflatcstring" shape="rect" title="
nspromiseflatcstring"> <area alt="" coords="173,293,285,341" href="http://developer.mozilla.org/en/nscautostring" shape="rect" title="nscautostring"> <area alt="" coords="5,389,227,437" href="http://developer.mozilla.org/en/ns_lossyconvertutf16toascii" shape="rect" title="ns_lossyconvertutf16toascii"> <area alt="" coords="251,389,435,437" href="http://develope...
nsAString_internal
lla.org/en/nsfixedstring" shape="rect" title="nsfixedstring"> <area alt="" coords="284,197,396,245" href="http://developer.mozilla.org/en/nsxpidlstring" shape="rect" title="nsxpidlstring"> <area alt="" coords="420,197,559,245" href="http://developer.mozilla.org/en/nsdependentstring" shape="rect" title="nsdependentstring"> <area alt="" coords="583,197,727,245" href="http://developer.mozilla.org/en/
nspromiseflatstring" shape="rect" title="
nspromiseflatstring"> <area alt="" coords="152,293,253,341" href="http://developer.mozilla.org/en/nsautostring" shape="rect" title="nsautostring"> <area alt="" coords="5,389,192,437" href="http://developer.mozilla.org/en/ns_convertasciitoutf16" shape="rect" title="ns_convertasciitoutf16"> <area alt="" coords="216,389,400,437" href="http://developer.mozilla.org/...
XPCOM glue classes
these routines allow easy access to xpcom's global nsimemory implementation without having to go through the service manager to get it.
nspromiseflatcstringclass declaration
nspromiseflatstringclass declarationnsrefptrrefptr (formerly known as nsrefptr, see bug 1207245) is a general class to implement reference counting pointers for objects.
nsISocketTransport
status_waiting_for 0x804b000a status_receiving_from 0x804b0006 connection flags values for the connectionflags attribute constant value description bypass_cache 0 when making a new connection bypass_cache will force the necko dns cache entry to be refreshed with a new call to
nspr if it is set before opening the new stream.
nsIThread
last changed in gecko 1.9 (firefox 3) inherits from: nsieventtarget method overview void shutdown() boolean haspendingevents() boolean processnextevent(in boolean maywait) attributes attribute type description prthread prthread the
nspr thread object corresponding to the nsithread.
NS_ASSERTION
in a debug build the failure text is written to console (stderr), into the
nspr debug log, and on windows a dialog box is opened.
NS_ERROR
summary macro throws a assertion (ns_assertion) with the text "error: (error text)", so writes this text to console (stderr) and to debug logs (
nspr logging).
NS_WARNING
summary macro shows a warning on the console (stderr) and in debug logs (
nspr logging).
XPCOM reference
rss feeds are implemented by nslocalmailfolder.ns ensure successmacrons ensure truemacrons_abort_if_falsethis was removed in bug 1127201ns_addrefmacrons_assertionmacrons_ensure_arg_pointermacrons_errorthrows a assertion (ns_assertion) with the text "error: (error text)", so writes this text to console (stderr) and to debug logs (
nspr logging).
Animation.finished - Web APIs
syntax var animatio
nspromise = animation.finished; value a promise object which will resolve once the animation has finished running.
font-variant-numeric - CSS: Cascading Style Sheets
al">1st, 2nd, 3rd, 4th, 5th</p> css /* this example uses the source sans pro opentype font, developed by adobe and used here under the terms of the sil open font license, version 1.1: http://scripts.sil.org/cms/scripts/page.php?item_id=ofl_web */ @font-face { font-family: "source sans pro"; font-style: normal; font-weight: 400; src: url("https://mdn.mozillademos.org/files/15757/sourcesa
nspro-regular.otf") format("opentype"); } .ordinal { font-variant-numeric: ordinal; font-family: "source sans pro"; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-numeric' in that specification.