Debugger: Difference between revisions

873 bytes removed ,  16 December 2011
→‎Accessor Properties of the Debugger.Script Prototype Object: Remove Debugger.Script.prototype.live --- all scripts have GC-like lives now.
(Move watchpoint API to Debugger.Object; define full-object watchpoints; fix watchpoint handler method return values; add extensionsPrevented.)
(→‎Accessor Properties of the Debugger.Script Prototype Object: Remove Debugger.Script.prototype.live --- all scripts have GC-like lives now.)
Line 404: Line 404:
<dt>lineCount
<dt>lineCount
<dd>The number of lines this script's code occupies, within the file or document named by <code>url</code>.
<dd>The number of lines this script's code occupies, within the file or document named by <code>url</code>.
<dt>live
<dd>True if the script this <code>Debugger.Script</code> instance refers to still exists in the debuggee; false if it has been destroyed.
For most scripts, this property is always true. However, when a call to <code>eval</code> or a similar feature returns, the script representing the top-level code may be deleted. When this occurs, the script's <code>live</code> property becomes false, and accessing its other properties or calling its methods throws an exception. Scripts are only deleted when the debuggee is running; the debugger need not worry that a script will be deleted by garbage collection or some other asynchronous activity. SpiderMonkey may elect to cache scripts for eval code and re-use them when equivalent code is evaluated later, so it is not correct to assume that every eval script will certainly be deleted when its execution completes.


<dt>strictMode
<dt>strictMode
Confirmed users
497

edits