Last Comment Bug 339104 - Any event listener inside a repeat crashes 1_8_0
: Any event listener inside a repeat crashes 1_8_0
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core
Classification: Components
Component: XForms (show other bugs)
: Trunk
: All All
: -- critical (vote)
: ---
Assigned To: Olli Pettay [:smaug]
: Stephen Pride
Mentors:
http://www.w3.org/TR/xforms/
Depends on:
Blocks: 339087
  Show dependency treegraph
 
Reported: 2006-05-24 07:28 PDT by Allan Beaufour
Modified: 2006-06-06 07:06 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase (crasher) (618 bytes, application/xhtml+xml)
2006-05-24 07:29 PDT, Allan Beaufour
no flags Details
proposed patch (6.85 KB, patch)
2006-05-24 08:48 PDT, Olli Pettay [:smaug]
allan: review+
doronr: review+
Details | Diff | Review

Description Allan Beaufour 2006-05-24 07:28:39 PDT
With the sync from bug 339087, any event listener inside repeat content makes firefox (1_8_0) crash on exit. For example:

<xf:repeat nodeset="x">
  <xf:message ev:event="foo-bar" level="modal">
  </xf:message>
</xf:repeat>
Comment 1 Allan Beaufour 2006-05-24 07:29:58 PDT
Created attachment 223180 [details]
Testcase (crasher)

On exit, this crashes on 1_8_0. At least on localhost. Let's see if it does from bugzilla too...
Comment 2 Allan Beaufour 2006-05-24 07:49:19 PDT
Is this bug 330526?
Comment 3 Allan Beaufour 2006-05-24 07:54:50 PDT
(In reply to comment #2)
> Is this bug 330526?

It is. Aïe, why has it not been brought to 1_8_0?

*** This bug has been marked as a duplicate of 330526 ***
Comment 4 Olli Pettay [:smaug] 2006-05-24 08:38:25 PDT
I'm opening this because we can have a workaround for 1.8
Comment 5 Olli Pettay [:smaug] 2006-05-24 08:48:39 PDT
Created attachment 223183 [details] [diff] [review]
proposed patch

Allan, could you test this with 1.8.x branch.
When I took out the patch for 330526, I could reproduce the
crash also in trunk but this patch helped for that.
Comment 6 Olli Pettay [:smaug] 2006-05-24 08:50:53 PDT
And note, RemoveModelFromDocument() is not needed in nsXFormsModelElement::OnDestroyed() because it is already 
called in nsXFormsModelElement::WillChangeDocument
Comment 7 Allan Beaufour 2006-05-24 09:18:59 PDT
(In reply to comment #5)
> Created an attachment (id=223183) [edit]
> proposed patch
> 
> Allan, could you test this with 1.8.x branch.
> When I took out the patch for 330526, I could reproduce the
> crash also in trunk but this patch helped for that.

It fixes 1_8_0! Say joy!!

But could you include the same fix-approach for the focus listener in contextcontainer too? I fear that it might lead to the same crash one day.
Comment 8 Allan Beaufour 2006-05-24 09:24:48 PDT
Comment on attachment 223183 [details] [diff] [review]
proposed patch

(In reply to comment #7)
> (In reply to comment #5)
> > Created an attachment (id=223183) [edit]
> > proposed patch
> > 
> > Allan, could you test this with 1.8.x branch.
> > When I took out the patch for 330526, I could reproduce the
> > crash also in trunk but this patch helped for that.
> 
> It fixes 1_8_0! Say joy!!
> 
> But could you include the same fix-approach for the focus listener in
> contextcontainer too? I fear that it might lead to the same crash one day.

Ah, got it. It was not because we did not remove the listener, but when we did it.

Thanks Olli!

r=me

Note You need to log in before you can comment on or make changes to this bug.