What's the point of jsdebug.c?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

What's the point of jsdebug.c?

John J Barton
Does anyone understand why jsdebug.c exists? It has functions like
---
  JSD_PUBLIC_API(JSBool)
  JSD_SetScriptHook(JSDContext* jsdc, JSD_ScriptHookProc hook, void*
callerdata)
  {
      JSD_ASSERT_VALID_CONTEXT(jsdc);
      return jsd_SetScriptHook(jsdc, hook, callerdata);
  }
----
Why?

jjb
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: What's the point of jsdebug.c?

Boris Zbarsky
On 12/8/09 1:25 PM, John J Barton wrote:
> Does anyone understand why jsdebug.c exists?

To give a C api to jsd that someone can link to as desired, as far as I
can see.

-Boris
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: What's the point of jsdebug.c?

Colin Fraser-2
Hi,

"Boris Zbarsky" <[hidden email]> wrote:
>
> To give a C api to jsd that someone can link to as desired, as far as I
> can see.

I imagine it could be used when embedding Spidermonkey and a debugger in a
non-browser environment, although I've only used Spidermonkey's jsdbgapi.h
rather than anything from jsd to do this.

Is jsd active?  I thought I'd read that it was no longer being maintained,
but I may be mistaken.

Colin


_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: What's the point of jsdebug.c?

John Bandhauer
In reply to this post by John J Barton
jsdebug.[h,c] exists for the same reason that jsapi.[h,c] exists... To
create a clear and well defined delineation between the relatively
static public API and the private parts of the module and to supply a
layer where calls from the outside can be sanity checked before
proceeding into the internal code. The idea is (or, was 13 years ago)
that external callers need only include jsdebug.h and interact with code
there and need not use any lower level code in jsd directly. "External
callers" also includes the implementation of layers like the old Java
and currently used C++ xpcom interface to jsd. Though you might think of
the xpcom interface to jsd as *being* jsd, in fact it is just a layer
around the core functionality supplied by jsdebug (and the engine's
jsdbgapi).

John.

John J Barton wrote:

> Does anyone understand why jsdebug.c exists? It has functions like
> ---
>  JSD_PUBLIC_API(JSBool)
>  JSD_SetScriptHook(JSDContext* jsdc, JSD_ScriptHookProc hook, void*
> callerdata)
>  {
>      JSD_ASSERT_VALID_CONTEXT(jsdc);
>      return jsd_SetScriptHook(jsdc, hook, callerdata);
>  }
> ----
> Why?
>
> jjb
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: What's the point of jsdebug.c?

John J Barton
In reply to this post by Colin Fraser-2
Colin Fraser wrote:
...
> Is jsd active?  I thought I'd read that it was no longer being maintained,
> but I may be mistaken.

I work on Firebug which uses jsd extensively. I would say jsd is being
maintained, but at a design for a browser from a previous century. It is
in quite sad shape for today. Its limitations are the number one reason
Firebug is falling behind other browser development tools.

There has been a little encouraging activity recently. I have also
started working on it, even though that means less Firebug work.

jjb
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: What's the point of jsdebug.c?

John J Barton
John J. Barton wrote:
> Colin Fraser wrote:
> ...
>> Is jsd active?  I thought I'd read that it was no longer being
>> maintained, but I may be mistaken.
>
> I work on Firebug which uses jsd extensively. I would say jsd is being
> maintained, but at a design for a browser from a previous century. It is
> in quite sad shape for today. Its limitations are the number one reason
> Firebug is falling behind other browser development tools.

eg
http://code.google.com/webtoolkit/speedtracer/

jjb
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger