93
edits
(→Memory Profiling Globals: added more documentation.) |
(→Memory Profiling Globals: added more documentation.) |
||
| Line 141: | Line 141: | ||
'''getObjectInfo'''(''idOrName'') | '''getObjectInfo'''(''idOrName'') | ||
Returns a JSON-able object containing metadata for the object in the target runtime with the given numeric ID or string name. | Returns a JSON-able object containing metadata for the object in the target runtime with the given numeric ID or string name. The object may contain any of the following keys: | ||
::<code>id</code> - The numeric ID of the object. | |||
::<code>nativeClass</code> - The name of the <code>JSClass</code> used by the object. | |||
::<code>size</code> - The size of the object, as reported by <code>JS_GetObjectTotalSize()</code>. | |||
::<code>parent</code> - The object's <code>__parent__</code> property (i.e., its global scope). | |||
::<code>prototype</code> - The object's <code>__proto__</code> property. | |||
::<code>wrappedObject</code> - The object ID of the object that this object wraps. | |||
::<code>outerObject</code> - The object ID for this object's outer half, if it's the inner half of a [https://developer.mozilla.org/En/SpiderMonkey/Split_object split object]. | |||
::<code>innerObject</code> - The object ID for this object's inner half, if it's the outer half of a [https://developer.mozilla.org/En/SpiderMonkey/Split_object split object]. | |||
::<code>children</code> - An array of object IDs corresponding to all the objects that this object references. Note that these aren't really "children" in a hierarchical sense, but rather in a heap-tracing sense. | |||
::<code>functionSize</code> - If this object corresponds to a function, this is the value returned by <code>JS_GetFunctionTotalSize()</code> on the object. | |||
::<code>scriptSize</code> - If this object corresponds to a function, this is the value returned by <code>JS_GetScriptTotalSize()</code> on the object. | |||
::<code>name</code> - If this object corresponds to a function, this is the function's name. | |||
::<code>filename</code> - If this object corresponds to a function, this is the filename in which the function is defined. | |||
::<code>lineStart</code> - If this object corresponds to a function, this is the line at which the function's code begins. | |||
::<code>lineEnd</code> - If this object corresponds to a function, this is the line at which the function's code ends. | |||
'''getNamedObjects'''() | '''getNamedObjects'''() | ||
Returns a JSON-able object containing a mapping of names to numeric object IDs; this is the "mirror" of the ''namedObjects'' parameter passed to ''nsJetpack.''<code>profileMemory()</code> in the memory profiling runtime. | Returns a JSON-able object containing a mapping of names to numeric object IDs; this is the "mirror" of the ''namedObjects'' parameter passed to ''nsJetpack.''<code>profileMemory()</code> in the memory profiling runtime. | ||
'''TODO:''' Document TCB functions. | |||
== Miscellaneous Functions == | == Miscellaneous Functions == | ||
edits