Closed
Bug 267990
Opened 20 years ago
Closed 20 years ago
crash [@ nsXFormsModelElement::DocumentChanged]
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.8beta1
People
(Reporter: darin.moz, Assigned: darin.moz)
References
()
Details
(Keywords: crash)
Crash Data
Attachments
(3 files)
crash [@ nsXFormsModelElement::DocumentChanged]
will attach stack trace
here's where we crash:
186 nsIScriptGlobalObject *window = doc->GetScriptGlobalObject();
187
188 nsCOMPtr<nsIDOMEventTarget> targ = do_QueryInterface(window);
189 targ->AddEventListener(NS_LITERAL_STRING("load"), this, PR_TRUE);
|targ| is null when we get to line 189. it is null because |window| is null.
to repro, browse to the given URL.
Assignee | ||
Comment 1•20 years ago
|
||
Assignee | ||
Comment 2•20 years ago
|
||
If I hack around the problem with a 'NS_ENSURE_TRUE(window);', I then crash
inside nsXFormsInstanceElement::GetModel, which is being called by
nsXFormsInstanceElement::Load.
Assignee | ||
Comment 3•20 years ago
|
||
save this attachment locally as 'crash-bug-267990.xhtml', and then load it to
reproduce this crash.
Assignee | ||
Comment 4•20 years ago
|
||
this crash only appears to occur when the instance data is the document
containing the xforms. is it possible that we crash because we are trying to
evaluate xforms in the instance document?
Assignee | ||
Comment 5•20 years ago
|
||
Alex:
Should XTF restrict bindings to cases where XML content is actually loading in a
browser window? Or, how can we make sure that XForms is only invoked when
loading content in a browser window?
Assignee | ||
Comment 6•20 years ago
|
||
Here's a solution for this crash that only involves changes to XForms. I've
added some null checks, and added a check to ensure that we only load external
instance documents when the <instance> element lives in a document w/ an
associated DOM window.
Assignee: bryner → darin
Status: NEW → ASSIGNED
Assignee | ||
Updated•20 years ago
|
Target Milestone: --- → mozilla1.8beta
Assignee | ||
Updated•20 years ago
|
Attachment #166916 -
Flags: review?(bryner)
Comment 7•20 years ago
|
||
Comment on attachment 166916 [details] [diff] [review]
v1 patch
>+ // Do not try to load an instance document if the current document
>+ // is not associated with a DOM window. This could happen if some
>+ // XForms document loaded itself as instance data. Yes, it does
Really if it loaded any XML document that has XForms elements... doesn't need
to be itself. r=me with a slight comment clarification.
Attachment #166916 -
Flags: review?(bryner) → review+
Assignee | ||
Comment 8•20 years ago
|
||
fixed-on-trunk with tweak to comment.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Severity: major → critical
Comment 9•20 years ago
|
||
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041201
Firefox/1.0+
No crash with the test case
Updated•14 years ago
|
Crash Signature: [@ nsXFormsModelElement::DocumentChanged]
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•