Search completed in 1.26 seconds.
Using XPCOM Utilities to Make Things Easier
to begin with, the first section describesc++
macros that can replace a lot of the code in weblock1.cpp.
... xpcom
macros the xpcom framework includes a number of
macros for making c++ development easier.
... though they overlap somewhat (e.g., high-level
macros expand to other
macros), they fall into the following general categories.
...And 24 more matches
Mozilla DOM Hacking Guide
the array uses two
macros to define its items: ns_define_classinfo_data and ns_define_classinfo_data_with_name.
...the
macros for those flags are defined nsdomclassinfo.cpp.
...there we have a long list of
macros.
...And 7 more matches
Mozilla Framework Based on Templates (MFBT)
the mozilla framework based on templates ("mfbt") is the central repository for
macros, functions, and data structures used throughout mozilla code, including in the javascript engine.
... core types.h further provides
macros to define imported and exported c symbols.
... attributes.h implements various function and class attribute
macros.
...And 5 more matches
Implementing QueryInterface
some alternatives the ns_impl_query_interface[012]
macros the sample above implements two xpcom interfaces in addition to nsisupports.
... the ns_impl_query_interface2 macro can write this function for you (though it pains me to recommend
macros), e.g., ns_impl_query_interface2(nsmyimplementation, nsix, nsiy) // implements |nsmyimplementation::queryinterface| as above ns_impl_query_interface1(nsfoo, nsifoo) // |nsfoo::queryinterface| provides |nsifoo| and |nsisupports| ns_impl_query_interface0(nsbar) // |nsbar::queryinterface| can only provide an |nsisupports| similarly, you can use the macro ns_impl_query_interface1 when you implement only one additional interface; and ns_impl_query_interface0 when you only implement nsisupports.
... these
macros will be invoked for you if you use the ns_impl_isupports*
macros, which give the corresponding queryinterface implementation, plus an addref and a release.
...And 3 more matches
nss tech note1
rather, the goal here is to explain what type of tags the decoder supports and which
macros should be used when defining tags in decoder templates.
...you can specify the class of the tag using the
macros sec_asn1_universal, sec_asn1_application, sec_asn1_context_specific and sec_asn1_private.
...if you you are using a tag of a different classes, you can define your own tag number
macros or specify the tag value within the template definition.
...And 3 more matches
SpiderMonkey Internals
106 => line 28 line 29 => pc 127 => line 29 line 30 => pc 154 => line 21 line 31 => pc 154 => line 21 line 32 => pc 161 => line 32 line 33 => pc 172 => line 33 line 34 => pc 172 => line 33 line 35 => pc 172 => line 33 line 36 => pc 172 => line 33 line 37 => pc 172 => line 33 line 38 => pc 172 => line 33 line 39 => pc 172 => line 33 line 40 => pc 172 => line 33 jsconfig.h various configuration
macros defined as 0 or 1 depending on how js_version is defined (as 10 for javascript 1.0, 11 for javascript 1.1, etc.).
... not all
macros are tested around related code yet.
... jsarena.cpp, jsarena.h last-in-first-out allocation
macros that amortize malloc costs and allow for en-masse freeing.
...And 3 more matches
Starting WebLock
recall from using xpcom utilities to make things easier that implementing these basic interfaces can be easy and straightforward if you use the
macros and other utilities that xpcom provides.
... declaration
macros the class declaration for the weblock class that implements these three interfaces is as follows: class weblock: public nsiobserver, public iweblock { public: weblock(); virtual ~weblock(); ns_decl_isupports ns_decl_nsiobserver ns_decl_iweblock }; note that we derive from the nsiobserver interface as well as the iweblock class.
... we do not need to explicitly derive from nsisupports as both of these two other interfaces are already subclasses of nsisupports: interface hierarchy for weblock the body of the class declaration uses declaration
macros that are generated from an xpidl interface file.
...And 3 more matches
Using RAII classes in Mozilla
we have a set of
macros that will cause a class to assert when it is instantiated at a temporary.
... these
macros are provided in guardobjects.h.
... in the common case, using these
macros involves these three additions to a class: class moz_raii nsautoscriptblocker { public: explicit nsautoscriptblocker(jscontext *cx moz_guard_object_notifier_param) { // note: no ',' before macro moz_guard_object_notifier_init; nscontentutils::addscriptblocker(cx); } ~nsautoscriptblocker() { nscontentutils::removescriptblocker(); } private: moz_decl_use_guard_object_notifier }; moz_guard_object_notifier_param is added to the end of the constructor's parameter list.
...And 2 more matches
An Overview of XPCOM
when you implement the nsisupports class (and you'll see in the chapter using xpcom utilities to make things easier how
macros can make this process much easier), you must make sure the class methods return a valid result when the client calls queryinterface with the nsisupports iid.
... writing components in other languages though you do not have access to some of the tools that xpcom provides for c++ developers (such as
macros, templates, smart pointers, and others) when you create components in other languages, you may be so comfortable with the language itself that you can eschew c++ altogether and build, for example, python-based xpcom components that can be used from javascript or vice versa.
... xpcom types there are many xpcom declared types and simple
macros that we will use in the following samples.
...And 2 more matches
Index
27 components.results xpcom:language bindings, xpconnect components.results is a read-only object whose properties are the names listed as the first parameters of the
macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.
... 141 ns ensure success xpcom, xpcom_
macros macro 142 ns ensure true xpcom, xpcom_
macros macro 143 ns_abort_if_false this was removed in bug 1127201 144 ns_addref xpcom, xpcom_
macros macro 145 ns_assertion xpcom, xpcom_
macros macro 146 ns_ensure_arg_pointer xpcom, xpcom_
macros macro 147 ns_error xpcom, xpcom_
macros...
... 148 ns_if_addref xpcom, xpcom_
macros macro 149 ns_if_release xpcom, xpcom_
macros macro 150 ns_release xpcom, xpcom_
macros macro 151 ns_warning xpcom, xpcom_
macros macro 152 standard xpcom components components, landing, mozilla, needscontent, xpcom there are a number of components provided in the standard implementation of xpcom; these are as follows.
...And 2 more matches
Interfacing with the XPCOM cycle collector
how to make your classes participate the interface between the cycle collector and your classes can be accessed directly using the contents of xpcom/base/nscyclecollector.h, but there are convenience
macros for annotating your classes in xpcom/glue/nscyclecollectionparticipant.h that are much easier to use.
...for example, your class may have multiple nsisupports base classes, which requires the use of some *_ambiguous
macros that perform a disambiguating downcast.
... or your class may have a complicated ownership structure, such that the simple ns_impl_cycle_collection_n
macros are insufficient; in this case you might need to implement the traverse and unlink methods of your helper class manually.
...And 2 more matches
Modularization techniques - Archive of obsolete content
the convenience
macros ns_addref() and ns_release() are preferred over calling addref and release directly.
... in debug builds, these
macros provide useful reference counting logs.
... /* * the nsisupports interface */ class nsisupports { public: ns_imethod queryinterface(const nsiid &aiid, void **aresult) = 0; ns_imethod_(nsrefcnt) addref(void) = 0; ns_imethod_(nsrefcnt) release(void) = 0; }; the ns_imethod and ns_imethod_(type)
macros are basically shorthand for virtual nsresult and virtualtype.
...you can manually assemble interfaces using function tables and
macros, but you'd be simply doing by hand what a c++ compiler can do for you automatically.
Linked Lists
the api is a set of
macros for initializing a circular (doubly linked) list, inserting and removing elements from the list.
... the
macros are not thread safe.
... linked list types linked list
macros linked list types the prclist type represents a circular linked list.
... linked list
macros macros that create and operate on linked lists are: pr_init_clist pr_init_static_clist pr_append_link pr_insert_link pr_next_link pr_prev_link pr_remove_link pr_remove_and_init_link pr_insert_before pr_insert_after pr_clist_is_empty pr_list_head pr_list_tail ...
NSPR Types
for information on naming conventions for nspr types, functions, and
macros, see nspr naming conventions.
...since the types (long long versus struct longlong) are not type compatible, nspr defines
macros to manipulate 64-bit numeric fields.
... these
macros are defined in prlong.h.
... conscientious use of these
macros ensures portability of code to all the platforms supported by nspr and still provides optimal behavior on those systems that treat long long values directly.
NSS API Guidelines
public
macros should have the form layer_body(), where layer is an all caps prefix for what layer the macro lives in, and body is english words, all in upper case, separated by underscores.
... enum members have the same standard as public
macros (minus the '()' of course).
...pointers to context-style functions should be checked using special debug
macros.
... these
macros only define code when debug is turned on, providing a way for systems to register, deregister, and check valid pointers.
How to embed the JavaScript engine
spidermonkey 24 // following code might be needed in some case // #define __stdc_limit_
macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
...atescript(cx, global, script, strlen(script), filename, lineno, rval.address()); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 31 // following code might be needed in some case // #define __stdc_limit_
macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
... js_evaluatescript(cx, global, script, strlen(script), filename, lineno, &rval); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 38 // following code might be needed in some case // #define __stdc_limit_
macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object.
... bool ok = js::evaluate(cx, global, opts, script, strlen(script), &rval); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 45 // following code might be needed in some case // #define __stdc_limit_
macros // #include <stdint.h> #include "jsapi.h" #include "js/initialization.h" /* the class of the global object.
Index
106 jsfastnative jsapi reference, obsolete, spidermonkey the callback should use the following
macros to access the fields of vp: 107 jsfinalizeop jsapi reference, reference, référence(2), spidermonkey the jsfinalizeop is analogous to java finalizers or c++ destructors.
... the preferred way to implement a function is to use the js::callargs structure defined there; the
macros providing equivalent functionality are deprecated.
... 268 js_fs jsapi reference, spidermonkey use these
macros to define an array of jsfunctionspecs to pass to js_definefunctions or js_initclass.
... 423 js_psgs jsapi reference, reference, référence(2), spidermonkey these
macros encapsulate the definition of jsnative-backed jspropertyspecs, by defining the jsnativewrappers for them.
JSAPI reference
24 js::undefinedhandlevalue added in spidermonkey 24 js::truehandlevalue added in spidermonkey 38 js::falsehandlevalue added in spidermonkey 38 jsval constants: jsval_null obsolete since jsapi 42 jsval_void obsolete since jsapi 42 jsval_true obsolete since jsapi 42 jsval_false obsolete since jsapi 42 jsval_zero obsolete since jsapi 42 jsval_one obsolete since jsapi 42 function and
macros for checking the type of a jsval: enum jstype js_typeofvalue all of the following are deprecated.
...etofunction js_valuetoobject js_valuetosource js_convertvalue js_valuetoboolean obsolete since jsapi 28 js_valuetoecmaint32 obsolete since jsapi 26 js_valuetoecmauint32 obsolete since jsapi 28 js_valuetoint32 obsolete since jsapi 28 js_valuetonumber obsolete since jsapi 27 js_valuetostring obsolete since jsapi 28 js_valuetouint16 obsolete since jsapi 28 fast, unchecked type-casting
macros.
... these
macros must not be applied to values that are not known to be the right type.
...
macros js_default_xml_namespace_id obsolete since jsapi 21 jsfun_bound_method obsolete since javascript 1.8.5 jsfun_getter obsolete since javascript 1.8.5 jsfun_setter obsolete since javascript 1.8.5 jsfun_global_parent obsolete since javascript 1.8.5 jsfun_heavyweight obsolete since jsapi 19 jsfun_lambda obsolete since jsapi 19 c++ features class jsautorequest class jsautolocalrootscope ...
Introduction to XPCOM for the DOM
the numerous
macros and facilities brought by the dom, as well as nscomptr's, make our life much easier.
... the three
macros are explained in detail in section 1.e.d.
... important note: the nsisupports interface, implemented by all the dom classes, cannot be implemented with forwarding or declaration
macros.
... special
macros are provided to implement nsisupports this closes this tutorial about how to add a new interface.
MMgc - Archive of obsolete content
class mymanagedclass : public mmgc::gcobject { // mymanagedclass is a gcobject, and // avmplus::stringp is a rcobject, so use drcwb drcwb(stringp) mystring; }; when are the
macros not needed?
...see if there are missing drc
macros that need to be put in.
...if you crash with a dangling pointer to a rc object, check for dwb
macros that need to be drcwb.
Gecko Logging
lazyloglodule provides a conversion operator to logmodule* and is suitable for passing into the logging
macros detailed below.
... #include "mozilla/logging.h" static mozilla::lazylogmodule sfoolog("foo"); logging interface a basic interface is provided in the form of 2
macros and an enum class.
... mozilla logging
macros moz_log(module, level, message) outputs the given message if the module has the given log level enabled.
Logging
nspr also provides "assert"-style
macros and functions to aid in application debugging.
... conditional compilation and execution log types and variables logging functions and
macros use example conditional compilation and execution nspr's logging facility is conditionally compiled in and enabled for applications using it.
... log types and variables two types supporting nspr logging are exposed in the api: prlogmoduleinfo prlogmodulelevel two environment variables control the behavior of logging at execution time: nspr_log_modules nspr_log_file logging functions and
macros the functions and
macros for logging are: pr_newlogmodule pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_static_assert (new in nspr 4.6.6xxx this hasn't been released yet; the number is a logical guess) pr_not_reached use example the following sample code fragment demonstrates use of the logging and debugging aids.
Memory Management Operations
this chapter describes the global functions and
macros you use to perform memory management.
... memory allocation functions memory allocation
macros memory allocation functions nspr has its own heap, and these functions act on that heap.
... memory allocation
macros macro versions of the memory allocation functions are available, as well as additional
macros that provide programming convenience: pr_malloc pr_new pr_realloc pr_calloc pr_newzap pr_delete pr_freeif ...
NSS_3.12_release_notes.html
.h) secmod_deletemoduleex (see secmod.h) sec_getregisteredhttpclient (see ocsp.h) sec_pkcs5isalgorithmpbealgtag (see secpkcs5.h) vfy_createcontextdirect (see cryptohi.h) vfy_createcontextwithalgorithmid (see cryptohi.h) vfy_verifydatadirect (see cryptohi.h) vfy_verifydatawithalgorithmid (see cryptohi.h) vfy_verifydigestdirect (see cryptohi.h) vfy_verifydigestwithalgorithmid (see cryptohi.h) new
macros for camellia support (see blapit.h): nss_camellia nss_camellia_cbc camellia_block_size new
macros for rsa (see blapit.h): rsa_max_modulus_bits rsa_max_exponent_bits new
macros in certt.h: x.509 v3 ku_encipher_only cert_max_serial_number_bytes cert_max_dn_bytes pkix cert_rev_m_do_not_test_using_this_method cert_rev_m_test_using_this_method cert_rev_m_allow_network_fetching cert_rev_m_forb...
... in pkcs11n.h, all the _netscape_
macros are renamed with _nss_ for example, cko_netscape_crl becomes cko_nss_crl.
...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/whatnspr.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 335275: compi...
SpiderMonkey 1.8.5
this affects
macros like double_to_jsval and jsval_to_double, which now operate directly on jsdouble rather than jsdouble pointers.
...
macros must be used instead.
...the jsval_to_double and double_to_jsval
macros have been updated to work directly on jsdoubles rather than their pointers, and the js_newdoublevalue and js_newdouble interfaces have been removed.
SpiderMonkey 1.8.7
this affects
macros like double_to_jsval and jsval_to_double, which now operate directly on jsdouble rather than jsdouble pointers.
...
macros must be used instead.
...the jsval_to_double and double_to_jsval
macros have been updated to work directly on jsdoubles rather than their pointers, and the js_newdoublevalue and js_newdouble interfaces have been removed.
Creating Custom Events That Can Pass Data
if you peruse nsdomclassinfoclasses.h you'll see of list of
macros of the form domci_class(foo).
...mozilla/dom/src/base/nsdomclassinfo.cpp mozilla contains many convenience
macros to make changes like the one you're making easier.
NSPR API Reference
network addresses network address types and constants network address functions atomic operations pr_atomicincrement pr_atomicdecrement pr_atomicset interval timing interval time type and constants interval functions date and time types and constants time parameter callback functions functions memory management operations memory allocation functions memory allocation
macros string operations pl_strlen pl_strcpy pl_strdup pl_strfree floating point number to string conversion pr_strtod pr_dtoa pr_cnvtf long long (64-bit) integers bitmaps formatted printing linked lists linked list types prclist linked list
macros pr_init_clist pr_init_static_clist pr_append_link pr_insert_link pr_next_link pr_prev_link pr_rem...
... 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 protocol anonymous shared memory functions ipc semaphores ipc se...
NSS 3.24 release notes
new elements this section lists and briefly describes the new functions, types, and
macros in nss 3.24.
... new
macros in pkcs11t.h ckm_tls12_mac in secoidt.h sec_oid_tls_ecdhe_psk - this oid governs the use of the tls_ecdhe_psk_with_aes_128_gcm_sha256 cipher suite, which is used only for session resumption in tls 1.3.
NSS 3.31 release notes
new
macros in pkcs11uri.h several new
macros that start with pk11uri_pattr_ for path attributes defined in rfc7512.
... several new
macros that start with pk11uri_qattr_ for query attributes defined in rfc7512.
SpiderMonkey Build Documentation
for example, if you're using the gnu toolchain, the following will pass the -g3 flag to the compiler, causing it to emit debug information about
macros.
... then you can use those
macros in gdb commands: $ cxxflags=-g3 $src/configure ...
JSFastNative
vp jsval * the arguments, including the this argument, the return-value slot, and the callee function object are accessible through this pointer using
macros described below.
... description the callback should use the following
macros to access the fields of vp: macro name description js_callee(cx, vp) returns the function object that was called, as a jsval.
JSNative
vp js::value * the arguments, the this argument, the return-value slot, and the callee function object are accessible through this pointer using
macros described below.
... the preferred way to implement a function is to use the js::callargs structure defined there; the
macros providing equivalent functionality are deprecated.
JS_FS
macros for describing functions, for use with js_defineproperties and js_initclass.
... description use these
macros to define an array of jsfunctionspecs to pass to js_definefunctions or js_initclass.
JS_PSGS
this article covers features introduced in spidermonkey 17
macros for describing properties, for use with js_defineproperties and js_initclass.
... description these
macros encapsulate the definition of jsnative-backed jspropertyspecs, by defining the jsnativewrappers for them.
Creating the Component Code
using xpcom utilities to make things easier shows some simpler and more elegant ways to create an xpcom component using generic
macros, and this chapter is more about learning the basics.
...they define the module and factory interfaces, and they contain a couple of important
macros as well (see the following chapter for information about using these
macros).
Creating XPCOM components
de what we'll be working on component registration the regxpcom program registration alternatives overview of the weblock module source digging in: required includes and constants identifiers in xpcom coding for the registration process the registration methods creating an instance of your component weblock1.cpp using xpcom utilities to make things easier xpcom
macros generic xpcom module
macros common implementation
macros declaration
macros weblock2.cpp string classes in xpcom using strings nsembedstring and nsembedcstring smart pointers starting weblock getting called at startup registering for notifications getting access to the category manager providing access to weblock creating the weblock programming interfa...
...ce defining the weblock interface in xpidl the xpidl syntax scriptable interfaces subclassing nsisupports the web locking interface implementing weblock declaration
macros representing return values in xpcom xpidl code generation getting the weblock service from a client implementing the iweblock interface the directory service modifying paths with nsifile manipulating files with nsifile using nsilocalfile for reading data processing the white list data iweblock method by method lock and unlock addsite removesite setsites getnext getsites hasmoreelements finishing the component using frozen interfaces copying interfaces into your build environment implementing the nsicontentpolicy interface receiving notifications ...
Weak reference
neither inheritance, nor templates, nor
macros can help automatically forward all the method calls to the real object.
...}; // ...if you used the table
macros to implement |queryinterface|, add an entry ns_interface_map_begin(nsfoo) // ...
XPCOM tasks
a first step is moving all qi implementations to the table-like
macros already in place (and some slight modifications to those
macros).
...
macros in "nsisupportsutils.h".
Treehydra Manual - Archive of obsolete content
de = node.next) { let fn = node.decl; if (decl_struct_function(fn)) { // fn has a body print(fn); let cfg = function_decl_cfg(fn); } } gimple reference for a detailed description of gimple see gcc/tree.def and gcc/cp/operators.def see also treehydra.js, gcc_compat.js, gcc_util.js, and gcc_print.js in the treehydra libs directory, which have many ports of gcc
macros and other functions for conveniently accessing gimple data in javascript.
NPVariant - Archive of obsolete content
l number npvarianttype_int32 or npvarianttype_double string npvarianttype_string all other types npvarianttype_object functions npn_releasevariantvalue() npn_getstringidentifier() npn_getstringidentifiers() npn_getintidentifier() npn_identifierisstring() npn_utf8fromidentifier() npn_intfromidentifier()
macros plugin developers are not expected to directly manipulate or access the members of the npvariant instance, instead, the function npn_releasevariantvalue(), and the following
macros are provided: npvariant_is_void() evaluates to true if v is of type npvarianttype_void.
Configuring Build Options
if you want to use the build regularly, you will want a release build without extra debugging information; if you are a developer who wants to hack the source code, you probably want a non-optimized build with extra debugging
macros.
Eclipse CDT
you'd select "c/c++ general > prepocessor include paths,
macros etc.", and select "gnu c++" and "cdt user settings entries".
Eclipse CDT Manual Setup
select "c/c++ general > preprocessor include paths,
macros, and so on." select the providers tab.
BloatView
by default, those
macros support refcnt logging directly.
DMD
dmd only knows about heap blocks that are measured via a function created with one of the following two
macros: moz_define_malloc_size_of moz_define_malloc_size_of_on_alloc fortunately, most of the existing memory reporters do this.
NSPR Contributor Guide
provide header file descriptions that fully document your public typedefs, enums,
macros and functions.
Date and Time
macros for time unit conversion types and constants time parameter callback functions functions
macros for time unit conversion
macros for converting between seconds, milliseconds, microseconds, and nanoseconds.
Introduction to NSPR
nspr naming conventions naming of nspr types, functions, and
macros follows the following conventions: types exported by nspr begin with pr and are followed by intercap-style declarations, like this: print, prfiledesc function definitions begin with pr_ and are followed by intercap-style declarations, like this: pr_read, pr_jointhread preprocessor
macros begin with the letters pr and are followed by all uppercase characters separated with the underscore char...
NSPR Error Handling
error type error functions error codes for information on naming conventions for nspr types, functions, and
macros, see nspr naming conventions.
PRNetAddr
(note that prnetaddr does not have the length field that is present in struct sockaddr_in on some unix platforms.) the
macros pr_af_inet, pr_af_inet6, pr_inaddr_any, pr_inaddr_loopback are defined if prio.h is included.
JSS 4.4.0 Release Notes
jss 4.4.0 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/jss/releases/jss_4_4_0_rtm/src/ new in jss 4.40 new functionality new functions new
macros notable changes in jss 4.40 picks up work done downstream for fedora and rhel and used by various linux distributions with includes:.
NSS 3.12.5 release_notes
bug 510435: remove unused make variable dso_ldflags bug 510436: add
macros for build numbers (4th component of version number) to nssutil.h bug 511227: firefox 3.0.13 fails to compile on freebsd/powerpc bug 511312: nss fails to load softoken, looking for sqlite3.dll bug 511781: add new tls 1.2 cipher suites implemented in windows 7 to ssltap bug 516101: if pk11_importcert fails, it leaves the certificate undiscoverable by cert_pkixverifycert bug 518443: pk11_import...
NSS 3.15 release notes
new
macros in ssl.h ssl_enable_ocsp_stapling - used with ssl_optionset to configure tls client sockets to request the certificate_status extension (eg: ocsp stapling) when set to pr_true notable changes in nss 3.15 secitem_reallocitem is now deprecated.
NSS 3.16.1 release notes
new
macros in secmod.h public_mech_ecc_flag - a public mechanism flag for elliptic curve cryptography (ecc) operations.
NSS 3.16.2 release notes
new
macros in sslerr.h ssl_error_next_protocol_no_callback - an ssl error code that means the next protcol negotiation extension was enabled, but the callback was cleared prior to being needed.
NSS 3.17.1 release notes
new
macros in ssl.h ssl_enable_fallback_scsv - an ssl socket option that enables tls_fallback_scsv.
NSS 3.17 release notes
new
macros in ssl.h ssl_reuse_server_ecdhe_key notable changes in nss 3.17 the manual pages for the certutil and pp tools have been updated to document the new parameters that had been added in nss 3.16.2.
NSS 3.20 release notes
new types in sslt.h ssldhegrouptype - enumerates the set of dhe parameters embedded in nss that can be used with function ssl_dhegroupprefset new
macros in ssl.h ssl_enable_server_dhe - a socket option user to enable or disable dhe ciphersuites for a server socket notable changes in nss 3.20 the tls library has been extended to support dhe ciphersuites in server applications.
NSS 3.21 release notes
d_mac_derive ck_tls_kdf_params{_ptr} - parameters {or pointer} for ckm_tls_kdf ck_tls_mac_params{_ptr} - parameters {or pointer} for ckm_tls_mac in sslt.h sslhashtype - identifies a hash function sslsignatureandhashalg - identifies a signature and hash function sslpreliminarychannelinfo - provides information about the session state prior to handshake completion new
macros in nss.h nss_rsa_min_key_size - used with nss_optionset and nss_optionget to set or get the minimum rsa key size nss_dh_min_key_size - used with nss_optionset and nss_optionget to set or get the minimum dh key size nss_dsa_min_key_size - used with nss_optionset and nss_optionget to set or get the minimum dsa key size in pkcs11t.h ckm_tls12_master_key_derive - derives t...
NSS 3.22 release notes
new
macros in nss.h nss_rsa_min_key_size nss_dh_min_key_size nss_dsa_min_key_size nss_tls_version_min_policy nss_tls_version_max_policy nss_dtls_version_min_policy nss_dtls_version_max_policy in pkcs11t.h ckp_pkcs5_pbkd2_hmac_gostr3411 - prf based on hmac with gostr3411 for pbkdf (not supported) ckp_pkcs5_pbkd2_hmac_sha224 - prf based on hmac with sha-224 for pbkdf ...
NSS 3.30 release notes
new
macros in ciferfam.h pkcs12_aes_cbc_128, pkcs12_aes_cbc_192, pkcs12_aes_cbc_256 - cipher family identifiers corresponding to the pkcs#5 v2.1 aes based encryption schemes used in the pkcs#12 support in nss in pkcs11n.h cka_nss_mozilla_ca_policy - identifier for a boolean pkcs#11 attribute, that should be set to true, if a ca is present because of it's acceptance according to the moz...
NSS 3.38 release notes
new functions in secitem.h secitem_makeitem - allocate and make an item with the requested contents new
macros in ssl.h ssl_record_size_limit - used to control the tls record size limit extension notable changes in nss 3.38 fixed cve-2018-0495 in bug 1464971.
Python binding for NSS
error_message (optional detailed message) error_code (alias for errno) error_desc (alias for strerror) certverifyerror derived from nsprerror, extends with: usages (bitmask of returned usages) log (certverifylog object) expose error lookup to sibling modules use
macros for bitmask_to_list functions to reduce code duplication and centralize logic.
NSS_3.12.3_release_notes.html
new korean seed cipher: new
macros for seed support: in blapit.h: nss_seed nss_seed_cbc seed_block_size seed_key_length in pkcs11t.h: ckk_seed ckm_seed_key_gen ckm_seed_ecb ckm_seed_cbc ckm_seed_mac ckm_seed_mac_general ckm_seed_cbc_pad ckm_seed_ecb_encrypt_d...
Installing Pork
build and install mcpp mcpp generates macro expansion comments that allow pork's elsa to undo
macros, which is necessary in order to get exact position information.
JSErrorReport
macros name description jsreport_is_warning(flags) returns true if flags has jsreport_warning.
JSVAL_TO_GCTHING
this macro is exposed in jsapi.h because other jsapi
macros make use of it.
SpiderMonkey 1.8
new
macros js_fs, js_fn, and js_fs_end are recommended for populating jsfunctionspec arrays.
Web Replay
new redirections can be added to toolkit/recordreplay/processredirectdarwin.cpp, adding just a few lines for functions with simple interfaces using the various rrfunction
macros.
Secure Development Guidelines
be set in windows int main(int argc, char **argv, char **envp) { int fd = open("/etc/shadow", o_rdwr); setreuid(getuid(), getuid()); excve("/bin/sh", argv, envp); } suid root applications file i/o: file descriptors and handles potential overflows when using select fd_set struct, static length, holds a bitmask of fds manipulated with fd_set, fd_isset, fd_clr and fd_zero
macros fd_set’s size depends on the operating system if the os allows opening more fds, then fd_set can hold could overflow fd_set file i/o: file descriptors and handles good solution: dynamically allocate fd_set structs int main(void) { int i, fd; fd_set fdset; for( i = 0; i < 2000; i++) { fd = open("/dev/null", o_rdwr); } fd_set(fd, &fdset); } file i/o: rac...
Component Internals
following this initial, verbose demonstration of the apis, we will introduce a faster more generic way of implementing the module and factory code using
macros, which can make components much easier to create.
Preface
use c++
macros, special string classes and smart pointers to optimize your code.
Mozilla internal string guide
nowadays, all supported platforms have 16-bit literals using u""_ns, so we longer need to rely on
macros for portability.
Components.results
components.results is a read-only object whose properties are the names listed as the first parameters of the
macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.
Language bindings
the scriptable methods on the nsicomponentmanager interface can be called directly on this object.components.resultscomponents.results is a read-only object whose properties are the names listed as the first parameters of the
macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.components.returncodecomponents.stackcomponents.stack is a read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
nsIDebug
inherits from: nsisupports last changed in gecko 1.7 note: c/c++ consumers who are planning to use the nsidebug interface with the @mozilla.org/xpcom;1 contract should use ns_debugbreak() from xpcom glue instead, or alternatively the ns_abort, ns_assertion, ns_break, and ns_warning
macros, which also call ns_debugbreak() if used in a debugging build.