Exception: Unable to get jsdIDebuggerService.flags in FF 4.0?

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

Exception: Unable to get jsdIDebuggerService.flags in FF 4.0?

coupon deal
Hello,

I would greatly appreciate if anyone here could help me.

Normally, the jsdIDebuggerService should have a "flags" attribute.
Developers can either get it or set it. And I have been successfully
doing so prior to 3.6.

Roughly, my code looks like:
var jsdService = Cc["@mozilla.org/js/jsd/debugger-service;
1"].getService(Ci.jsdIDebuggerService);
jsdService.asyncOn(........);
jsdService.flags |= Ci.jsdIDebuggerService.COLLECT_PROFILE_DATA;
......

Although it works in 3.6 or earlier versions, the last line of the
code above doesn't work in FF 4.0.

What it says is a "NOT_AVAILABLE" exception:

[Exception... "Component returned failure code: 0x80040111
(NS_ERROR_NOT_AVAILABLE) [jsdIDebuggerService.flags]"
nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  ]

Could any one help me answer: How to set the debugging flags in FF
4.0?
_______________________________________________
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: Exception: Unable to get jsdIDebuggerService.flags in FF 4.0?

John J Barton
coupon deal wrote:

> Hello,
>
> I would greatly appreciate if anyone here could help me.
>
> Normally, the jsdIDebuggerService should have a "flags" attribute.
> Developers can either get it or set it. And I have been successfully
> doing so prior to 3.6.
>
> Roughly, my code looks like:
> var jsdService = Cc["@mozilla.org/js/jsd/debugger-service;
> 1"].getService(Ci.jsdIDebuggerService);
> jsdService.asyncOn(........);

Here's a hint^^^^^^^

> jsdService.flags |= Ci.jsdIDebuggerService.COLLECT_PROFILE_DATA;

At this point jsdService is not on, so the flags...

> ......
>
> Although it works in 3.6 or earlier versions, the last line of the
> code above doesn't work in FF 4.0.
>
> What it says is a "NOT_AVAILABLE" exception:
>
> [Exception... "Component returned failure code: 0x80040111
> (NS_ERROR_NOT_AVAILABLE) [jsdIDebuggerService.flags]"
> nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  ]
>

... are not a available

> Could any one help me answer: How to set the debugging flags in FF
> 4.0?

Set the flags in the call back from the asyncOn().

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: Exception: Unable to get jsdIDebuggerService.flags in FF 4.0?

coupon deal
When I put the flag setters into the callback, it works.

Thanks!

On Apr 4, 6:24 pm, John J Barton <[hidden email]> wrote:

> coupon deal wrote:
> > Hello,
>
> > I would greatly appreciate if anyone here could help me.
>
> > Normally, the jsdIDebuggerService should have a "flags" attribute.
> > Developers can either get it or set it. And I have been successfully
> > doing so prior to 3.6.
>
> > Roughly, my code looks like:
> > var jsdService = Cc["@mozilla.org/js/jsd/debugger-service;
> > 1"].getService(Ci.jsdIDebuggerService);
> > jsdService.asyncOn(........);
>
> Here's a hint^^^^^^^
>
> > jsdService.flags |= Ci.jsdIDebuggerService.COLLECT_PROFILE_DATA;
>
> At this point jsdService is not on, so the flags...
>
> > ......
>
> > Although it works in 3.6 or earlier versions, the last line of the
> > code above doesn't work in FF 4.0.
>
> > What it says is a "NOT_AVAILABLE" exception:
>
> > [Exception... "Component returned failure code: 0x80040111
> > (NS_ERROR_NOT_AVAILABLE) [jsdIDebuggerService.flags]"
> > nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  ]
>
> ... are not a available
>
> > Could any one help me answer: How to set the debugging flags in FF
> > 4.0?
>
> Set the flags in the call back from the asyncOn().
>
> jjb

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