We are using Firebug to monitor all JS function calls being made on
any given page. For this, we have hooked into the
jsdIDebuggerService's jsdICallHook interface.
Initially, it seems to be OK. The global JS executes fine when the
page is loaded.
However, when any subsequent JS call activity is triggered (from an
"onclick" event handler callback for e.g.), it causes a crash in
Firefox.
The crash report filed earlier is @
http://crash-stats.mozilla.com/report/index/18be1d90-ff17-4a14-a9f1-adc0d2081204
From Firebug, the JS that is causing the crash is:
function getFrameScopeWindowAncestor(frame) // walk script scope
chain to bottom, null unless a Window
{
var scope = frame.scope; <---
...
}
Where "frame" has been returned by the jsd in the onCall() callback.
When Firefox is hooked to the debugger I can see the scopeChain
property of the topmost JSStackFrame object is null. Is this legal?
Shouldn't there always be a global scope?
Any insight would be appreciated.
Regards,
Manoj
Please ignore the above statement from my previous submission as it
may be misleading. From what I can see, Firebug does not appear to
hook into the jsd until after the document has finished loading.
So the problem may not be limited to just event/timer callbacks.
Regards,
Manoj