Open Bug 1181740 Opened 5 years ago Updated 10 months ago

Replace nsAutoMicroTask with a class that does both a microtask and an entry script that takes ownership of error reporting

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

Tracking Status
firefox42 --- affected

People

(Reporter: bzbarsky, Unassigned)

References

Details

This is a followup for bug 1181619.

There shouldn't be any cases in which we do a microtask but not an autoentryscript, in practice.  We should enforce that.

This does require that we stop using nsAutoMicroTask manually around calls to XPCOM callbacks or something.  I'm not quite sure how to do that in practice for XPCOM callbacks not backed by a scripted thing, or whether that's even important.  The most obvious case here, of course, is calling an XPCOM event listener not implemented as XPCWrappedJS that then internally happens to call into script.  Is it OK for a microtask checkpoint to happen at that internal call?
Flags: needinfo?(bugs)
Depends on: 1181619
"There shouldn't be any cases in which we do a microtask but not an autoentryscript" sounds ok.


You mean some C++ event listener which calls into JS? Some example please
Flags: needinfo?(bugs)
> You mean some C++ event listener which calls into JS? 

Yes.

> Some example please

I don't have one offhand.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.