Name Description Size
AutoMemMap.cpp 3896
AutoMemMap.h 2816
ChromeScriptLoader.cpp 11058
ComponentUtils.jsm Deprecated utilities for JavaScript components loaded by the JS component loader. Import into a JS component using 'Components.utils.import("resource://gre/modules/ComponentUtils.jsm");' Exposing a JS 'class' as a component using these utility methods consists of several steps: 0. Import ComponentUtils, as described above. 1. Declare the 'class' (or multiple classes) implementing the component(s): function MyComponent() { // constructor } MyComponent.prototype = { // properties required for XPCOM registration: classID: Components.ID("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"), // [optional] custom factory (an object implementing nsIFactory). If not // provided, the default factory is used, which returns // |(new MyComponent()).QueryInterface(iid)| in its createInstance(). _xpcom_factory: { ... }, // QueryInterface implementation, e.g. using the generateQI helper QueryInterface: ChromeUtils.generateQI( [Components.interfaces.nsIObserver, Components.interfaces.nsIMyInterface, "nsIFoo", "nsIBar" ]), // The following properties were used prior to Mozilla 2, but are no // longer supported. They may still be included for compatibility with // prior versions of ComponentUtils. In Mozilla 2, this information is // included in the .manifest file which registers this JS component. classDescription: "unique text description", contractID: "@example.com/xxx;1", // ...component implementation... }; 2. Create an array of component constructors (like the one created in step 1): var components = [MyComponent]; 3. Define the NSGetFactory entry point: this.NSGetFactory = ComponentUtils.generateNSGetFactory(components); 4219
IOBuffers.h 3373
moz.build 1302
mozJSComponentLoader.cpp Buffer sizes for serialization and deserialization of scripts. FIXME: bug #411579 (tune this macro!) Last updated: Jan 2008 42934
mozJSComponentLoader.h 6070
mozJSLoaderUtils.cpp 2639
mozJSLoaderUtils.h mozJSLoaderUtils_h 1037
mozJSSubScriptLoader.cpp load() error msgs, XXX localize? 17112
mozJSSubScriptLoader.h 829814d6-1dd2-11b2-8e08-82fa0a339b00 1782
nsImportModule.cpp 2553
nsImportModule.h These helpers make it considerably easier for C++ code to import a JS module and wrap it in an appropriately-defined XPIDL interface for its exports. Typical usage is something like: Foo.jsm: var EXPORTED_SYMBOLS = ["foo"]; function foo(bar) { return bar.toString(); } mozIFoo.idl: interface mozIFoo : nsISupports { AString foo(double meh); } Thing.cpp: nsCOMPtr<mozIFoo> foo = do_ImportModule( "resource://meh/Foo.jsm"); MOZ_TRY(foo->Foo(42)); For JS modules which export all fields within a single named object, a second argument can be passed naming that object. Foo.jsm: var EXPORTED_SYMBOLS = ["Foo"]; var Foo = { function foo(bar) { return bar.toString(); } }; Thing.cpp: nsCOMPtr<mozIFoo> foo = do_ImportModule( "resource:://meh/Foo.jsm", "Foo"); 3836
PrecompiledScript.h 1816
PScriptCache.ipdl 880
script_cache.py Usage: script_cache.py <file.bin> ... Decodes and prints out the contents of a startup script cache file (e.g., startupCache/scriptCache.bin) in human-readable form. 2536
ScriptCacheActors.cpp 2845
ScriptCacheActors.h 1462
ScriptPreloader-inl.h 3630
ScriptPreloader.cpp 42284
ScriptPreloader.h 20335
URLPreloader.cpp 19088
URLPreloader.h A singleton class to manage loading local URLs during startup, recording them, and pre-loading them during early startup in the next session. URLs that are not already loaded (or already being pre-loaded) when required are read synchronously from disk, and (if startup is not already complete) added to the pre-load list for the next session. 10012
XPCOMUtils.jsm Redefines the given property on the given object with the given value. This can be used to redefine getter properties which do not implement setters. 20098