Hi all,

I am currently working on races that can happen across asynchronous event 
callbacks. I started investigating the Mozilla source code hoping that I can 
find a concrete event loop and queue implementation as discussed in 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/EventLoop. 

But it seems like this is not the case. So I wanted to learn if you can help 
with the problems at hand:

  - Is it possible to have access to the async. event callbacks that are 
waiting to be executed at a given time?  
  - I have investigated nsEventQueue and nsThreadPool from XPCOM but at this 
level all events are wrapped with nsRunnable s which won't give me much 
regarding the event types etc. and it seems to be used for any kind of event 
not just user defined but also browser related ones. So is there a way to 
distinguish if an event is user defined or system related event?
  - Lately, I looked into a higher level of events in EventDispatcher and 
EventListenerManager which seems to be related to user defined events and 
corresponding event handlers (async. callbacks). Is it possible to use these 
for checking which async. callbacks are triggered during event execution? 

I am having difficulty understanding the general execution flow of a web page. 
So my guess is if I create a button with a callback or a setTimeout on the 
window object, these callbacks append a event listener for the corresponding 
event and triggered if they are dispatched from EventDispatcher. 

Sorry for the long post but I am new to Firefox hacking and will be really 
grateful if you can help me with the problems or at least direct me to some 
documentation that can. 

Cheers,

Erdal
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to