Closed
Bug 229200
Opened 21 years ago
Closed 21 years ago
Assertion botched adding onresize handler [@ js_UnlockScope ]
Categories
(Core :: JavaScript Engine, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.7final
People
(Reporter: neil, Assigned: brendan)
Details
(Keywords: js1.5, regression)
Attachments
(2 files)
1.30 KB,
text/plain
|
Details | |
1.84 KB,
patch
|
shaver
:
review+
chofmann
:
approval1.7+
|
Details | Diff | Splinter Review |
Steps to reproduce problem:
1. Open JS console
2. Type
top.onresize = function() { alert("resize"); }
3. Click Evaluate
Assertion failure: scope->ownercx == NULL, at jslock.c:1084
Reporter | ||
Comment 1•21 years ago
|
||
silver@warwickcompsoc.co.uk also reproduced this on his MingW build - and I also
see a crash (but no assertion) in a 3-week-old MingW build too.
OS: Linux → All
Comment 2•21 years ago
|
||
seems to wfm using FB 20031216 Win2k.
Comment 3•21 years ago
|
||
WFM using a 20031220 Linux CVS build.
Reporter | ||
Comment 4•21 years ago
|
||
Updated•21 years ago
|
Summary: Crash adding onresize handler → Crash adding onresize handler [@ js_UnlockScope ]
Comment 5•21 years ago
|
||
I'm seeing the same problem with onpaint.
I don't think this is a JavaScript engine bug as such. It looks like
nsEventReceiverSH::AddProperty is doing something naughty. Changing component to
DOM:Level 0.
Maybe this is regression caused by bug#147811?
Assignee: general → general
Component: JavaScript Engine → DOM: Level 0
QA Contact: pschwartau → ian
Comment 6•21 years ago
|
||
A couple of observations:
1. This bug seems to occur only when the function to be attached is from a
different JS context. Setting a listener from a html file works fine - see
testcase at http://www.croczilla.com/~alex/onresize.html (the corresponding
testcase for onpaint doesn't work, but that's a different issue, reported in
bug#239074).
2. There is a workaround to prevent the assertion/crash - just set the handler
to some string before attaching the 'real' handler:
top.onresize = "foo";
top.onresize = function() { alert("resize"); }
Comment 7•21 years ago
|
||
Brendan, this is the same thing that we ran into with that Java applet
testcase... Did you have some ideas on what to do about this?
Assignee | ||
Comment 8•21 years ago
|
||
An assertion botch is not a crash bug in release builds. It looks like from the
WFM comments that the release builds have no problem, as expected. Rearranging
keywords and taking the bug.
/be
Assignee | ||
Comment 9•21 years ago
|
||
Anyone who sees a crash in release builds, please tell me more about it -- best
would be to get the line number of the crash, if possible.
/be
Summary: Crash adding onresize handler [@ js_UnlockScope ] → Assertion botched adding onresize handler [@ js_UnlockScope ]
Assignee | ||
Comment 10•21 years ago
|
||
I'm still not happy about it. More thought required, but please test it if you
can and report results here.
/be
Reporter | ||
Comment 11•21 years ago
|
||
Comment on attachment 145068 [details] [diff] [review]
patch to try
WFM for the given testcase.
Assignee | ||
Comment 12•21 years ago
|
||
Comment on attachment 145068 [details] [diff] [review]
patch to try
Shaver, this is all about avoiding assertions in the Mozilla client world.
Maybe I should #ifdef MOZILLA_CLIENT the new code, #else'ing to the assertion
line that's removed by this patch?
/be
Attachment #145068 -
Flags: review?(shaver)
Comment 13•21 years ago
|
||
Comment on attachment 145068 [details] [diff] [review]
patch to try
This asymmetric thread model seems like something that could appear to more
embeddings than just Mozilla's, so I think I'd prefer to add a #define for
something like NESTED_CONTEXTS_PER_THREAD and set that #if MOZILLA_CLIENT, but
now I'm just being picky. The patch looks good, to me.
Attachment #145068 -
Flags: review?(shaver) → review+
Assignee | ||
Comment 14•21 years ago
|
||
> This asymmetric thread model seems like something that could appear to more
> embeddings than just Mozilla's, so I think I'd prefer to add a #define for
> something like NESTED_CONTEXTS_PER_THREAD and set that #if MOZILLA_CLIENT, but
> now I'm just being picky.
It's not just the N:1 context:thread relation in Mozilla, it's the utter lack of
requests being begun and ended, suspended and resumed. I'd hope other
embeddings use requests scrupulously, even if they have N>1.
Still thinking how to tighten this up, but I'd like to get the assertion removal
in for 1.7.
/be
Flags: blocking1.7+
Assignee | ||
Updated•21 years ago
|
Attachment #145068 -
Flags: approval1.7?
Comment 15•21 years ago
|
||
Comment on attachment 145068 [details] [diff] [review]
patch to try
a=chofmann for 1.7
Attachment #145068 -
Flags: approval1.7? → approval1.7+
Assignee | ||
Comment 16•21 years ago
|
||
Fixed.
/be
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•