Platform/JSDebugv2: Difference between revisions

Jump to navigation Jump to search
Line 107: Line 107:


<dl>
<dl>
<dt>JS_CopyScript JSAPI function <i>(8 days)</i>
<dt>JS_CopyScript JSAPI function <i>(8 days)</i>
<dd>Implement, document, and test a function that makes a fresh, deep copy
<dd>Implement, document, and test a function that makes a fresh, deep copy
of a JSScript object, suitable for execution in a thread or global object
of a JSScript object, suitable for execution in a thread or global object
Line 119: Line 117:
embedders to comply with it by providing a function which copies a JSScript
embedders to comply with it by providing a function which copies a JSScript
object.
object.
<dt>Associate JSScripts with specific global objects <i>(5 days)</i>
<dt>Associate JSScripts with specific global objects <i>(5 days)</i>
<dd>Add a 'global' field to JSScript, and change JS_ExecuteScript to clone
<dd>Add a 'global' field to JSScript, and change JS_ExecuteScript to clone
JSScript objects if necessary to match the global object passed.
JSScript objects if necessary to match the global object passed.
Line 131: Line 126:
JS_ExecuteScript use copies of JSScripts owned by globals other than the
JS_ExecuteScript use copies of JSScripts owned by globals other than the
one passed to it.
one passed to it.
<dt>Change <span>JSRuntime::scriptFilenameTable</span> to use <span>js::HashMap</span> <i>(3 days)</i>
<dt>Change <span>JSRuntime::scriptFilenameTable</span> to use <span>js::HashMap</span> <i>(3 days)</i>
<dd>Since subsequent tasks will involve changing the data structures used
<dd>Since subsequent tasks will involve changing the data structures used
to store script source URLs, we should grant ourselves the benefits of
to store script source URLs, we should grant ourselves the benefits of
strict typing provided by the new js::HashMap template.
strict typing provided by the new js::HashMap template.
<dt>Create name-to-script mapping <i>(8 days)</i>
<dt>Create name-to-script mapping <i>(8 days)</i>
<dd>Adapt the existing hash table of script names to also function as a
<dd>Adapt the existing hash table of script names to also function as a
map from script names to scripts. This entails adding links to
map from script names to scripts. This entails adding links to
Line 147: Line 136:
head chains of scripts, and having garbage collection properly remove
head chains of scripts, and having garbage collection properly remove
scripts from their names' lists.
scripts from their names' lists.
<dt>Script URL enumeration <i>(5 days)</i>
<dt>Script URL enumeration <i>(5 days)</i>
<dd>Define a function to enumerate the URLs of all scripts associated
<dd>Define a function to enumerate the URLs of all scripts associated
with a given global object.
with a given global object.
Line 159: Line 145:
These lists should include only those scripts in use by the page or
These lists should include only those scripts in use by the page or
origin being debugged.
origin being debugged.
<dt>Draft C++ <span>js::dbg2</span> breakpoint API <i>(3 days)</i>
<dt>Draft C++ <span>js::dbg2</span> breakpoint API <i>(3 days)</i>
<dd>Write a C++ API declaring:
<dd>Write a C++ API declaring:
<ul>
<ul>
<li>A class representing a position at which a breakpoint can be set,
<li>A class representing a position at which a breakpoint can be set,
expressed in terms of textual positions (URL, line, and column) or in terms
expressed in terms of textual positions (URL, line, and column) or in terms
Line 186: Line 168:
for use by the js::dbg2 stack frame type to represent source positions; we
for use by the js::dbg2 stack frame type to represent source positions; we
should not need two distinct types that represent locations in source code.
should not need two distinct types that represent locations in source code.
<li>A class representing a breakpoint, js::dbg2::Breakpoint, which can be
<li>A class representing a breakpoint, js::dbg2::Breakpoint, which can be
inserted in or removed from a debugging sphere. This API will not be
inserted in or removed from a debugging sphere. This API will not be
concerned with breakpoint conditions, ignore counts, and such; those
concerned with breakpoint conditions, ignore counts, and such; those
behaviors must be implemented by the client of the js::dbg2 interface.
behaviors must be implemented by the client of the js::dbg2 interface.
<li>A stub js::dbg2::Sphere class, sufficient for bootstrapping,
<li>A stub js::dbg2::Sphere class, sufficient for bootstrapping,
constructed from a given global object.
constructed from a given global object.
<li>Debugging sphere member functions for enumerating the currently
<li>Debugging sphere member functions for enumerating the currently
inserted breakpoints.
inserted breakpoints.
</ul>
</ul>
<dt>Implement Breakpoint Location Classes <i>(5 days)</i>
<dt>Implement Breakpoint Location Classes <i>(5 days)</i>
<dd>Implement the classes described above describing breakpoint locations.
<dd>Implement the classes described above describing breakpoint locations.
There may be some tricky work here, as we want to have entries in the
There may be some tricky work here, as we want to have entries in the
Line 208: Line 183:
breakpoint location objects, not scripts, and have entries cleaned up as
breakpoint location objects, not scripts, and have entries cleaned up as
appropriate.
appropriate.
<dt>Implement <span>js::dbg2::Breakpoint</span><i>(15 days)</i>
<dt>Implement <span>js::dbg2::Breakpoint</span><i>(15 days)</i>
<dd>Implement the js::dbg2::Breakpoint class, including insertion and
<dd>Implement the js::dbg2::Breakpoint class, including insertion and
removal. This entails:
removal. This entails:
Line 222: Line 195:
in functions that have JM frames on the stack
in functions that have JM frames on the stack
</ul>
</ul>
</dl>
</dl>


Confirmed users
496

edits

Navigation menu