Closed Bug 9713 Opened 26 years ago Closed 25 years ago

Fix copy/pasted DOM event handling code in gfx (was: DOM needs to use new JSContext stack)

Categories

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

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: brendan, Assigned: bugzilla)

References

Details

All DOM levels, really. V needs to use jband's nsIJSContextStack service around control flows into window-specific code, so XPConnected JavaScript can use the right JSContext when called from C++. /be
Do we need this for beta?
Target Milestone: M15
Moving all non-DOM[012], non-crash bugs to M15.
Target Milestone: M15 → M11
Norris and jband say vidur did the basics here (push and pop around event handler and script eval dispatch, see http://lxr.mozilla.org/seamonkey/search?string=ThreadJSContextStack). Should I mark this fixed? /be
Assignee: vidur → ducarroz
Wait -- what the heck is this stuff: http://lxr.mozilla.org/seamonkey/ident?i=ExecuteScriptEventHandler JS_CallFunctionValue should be called in one place only, the DOM event handler dispatch code around which vidur added the necessary push and pop of the thread-private JSContext stack. Reassigning to ducarroz, I'm happy to help or even take the bug. /be
I did this stuff for the autocompletion text widget which need some new events (which are created dynamically, like properties). As I did not want to pollute the whole product with those events, I wrote my own function. Now, what should I do? I am a little bit lost!
This was a DUP of 10592 which I closed a while ago. The nsGfxAutoTextControlFrame stuff is most definitely bogus and ducarroz should definitely talk to Brendan or me.
Assignee: ducarroz → brendan
There's a reason for layers in our system, including the DOM/Layout event handler dispatching. It funnels control flow to get security right, which entails pushing and popping the ThreadJSContextStack and passing the right principals. It also needs to worry about resetting a backward-branch counter used to police infinite JS loops and to schedule the JS GC. If it's all right with you, I'm going to take this bug back and whack all code that calls JS_CallFunctionValue and JS_CompileUCFunctionForPrincipals to go thru central routines. I'll mail you with diffs for review. /be
FIne with me, thanks for taking care of it.
Status: NEW → ASSIGNED
Actually, I'll attach diffs here and post to the .xpfe and .dom newsgroups. /be
Blocks: 13218
Summary: DOM needs to use new JSContext stack → Fix copy/pasted DOM event handling code in gfx (was: DOM needs to use new JSContext stack)
Target Milestone: M11 → M12
nsGfxAutoTextControlFrame seems to be unused. If true, I'll cvs remove it and close this bug. In any case, not M11. /be
Hi Brendan, nsGfxAutTextControlFrame is needed by the autocomplete feature which has been moved post beta. Therefore It's not used today but will be soon. However, I may remove those custom event handlers and use instead a listener function. What I propose you do to for now is to keep nsGfxAutTextControlFrame and just out commented all the event handler relative code. The code doesn't need to be in a working stage.
Assignee: brendan → ducarroz
Status: ASSIGNED → NEW
Hoping to reassign to ducarroz, he said he'd fix by using event listeners soon (already fixed? Pls. close if so). /be
Status: NEW → ASSIGNED
No fixed yet and will not be soon... What I can do temporary is to just coment out my code.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I have temporary commented out the offending code.
Jean-Francois, could you verify this one ?
Status: RESOLVED → VERIFIED
sure. Bug verified.
You need to log in before you can comment on or make changes to this bug.