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)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
M12
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
Comment 1•25 years ago
|
||
Do we need this for beta?
Updated•25 years ago
|
Target Milestone: M15
Comment 2•25 years ago
|
||
Moving all non-DOM[012], non-crash bugs to M15.
Reporter | ||
Updated•25 years ago
|
Target Milestone: M15 → M11
Comment 3•25 years ago
|
||
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
Reporter | ||
Updated•25 years ago
|
Assignee: vidur → ducarroz
Comment 4•25 years ago
|
||
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
Assignee | ||
Comment 5•25 years ago
|
||
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!
Comment 6•25 years ago
|
||
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.
Reporter | ||
Updated•25 years ago
|
Assignee: ducarroz → brendan
Comment 7•25 years ago
|
||
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
Assignee | ||
Comment 8•25 years ago
|
||
FIne with me, thanks for taking care of it.
Reporter | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 9•25 years ago
|
||
Actually, I'll attach diffs here and post to the .xpfe and .dom newsgroups.
/be
Reporter | ||
Updated•25 years ago
|
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)
Reporter | ||
Updated•25 years ago
|
Target Milestone: M11 → M12
Reporter | ||
Comment 10•25 years ago
|
||
nsGfxAutoTextControlFrame seems to be unused. If true, I'll cvs remove it and
close this bug. In any case, not M11.
/be
Assignee | ||
Comment 11•25 years ago
|
||
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.
Reporter | ||
Updated•25 years ago
|
Assignee: brendan → ducarroz
Status: ASSIGNED → NEW
Reporter | ||
Comment 12•25 years ago
|
||
Hoping to reassign to ducarroz, he said he'd fix by using event listeners soon
(already fixed? Pls. close if so).
/be
Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 13•25 years ago
|
||
No fixed yet and will not be soon... What I can do temporary is to just coment
out my code.
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 14•25 years ago
|
||
I have temporary commented out the offending code.
Comment 15•25 years ago
|
||
Jean-Francois, could you verify this one ?
Assignee | ||
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Assignee | ||
Comment 16•25 years ago
|
||
sure. Bug verified.
You need to log in
before you can comment on or make changes to this bug.
Description
•