Closed Bug 458493 Opened 16 years ago Closed 16 years ago

Crash [@ nsSVGEffects::RemoveRenderingObserver]

Categories

(Core :: SVG, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: longsonr)

References

Details

(Keywords: crash, testcase)

Crash Data

Attachments

(2 files, 5 obsolete files)

Attached image testcase (crashes Firefox when loaded) (deleted) —
Crash [@ nsSVGEffects::RemoveRenderingObserver]
Attached patch patch (obsolete) (deleted) — Splinter Review
nsSVGRenderingObserver::InvalidateViaReferencedFrame nulls out mReferencedFrame but then calls DoUpdate which, for filters calls UpdateRect which restores the mReferencedFrame that we're supposed to be forgetting.
Assignee: nobody → longsonr
Attachment #341779 - Flags: superreview?(roc)
Attachment #341779 - Flags: review?(roc)
OS: Mac OS X → All
Hardware: PC → All
Attached patch updated patch (obsolete) (deleted) — Splinter Review
This version fixes this bug and also bug 455314 and bug 454945
Attachment #341779 - Attachment is obsolete: true
Attachment #341798 - Flags: superreview?(roc)
Attachment #341798 - Flags: review?(roc)
Attachment #341779 - Flags: superreview?(roc)
Attachment #341779 - Flags: review?(roc)
You forgot to include all files in the patch? I get: nsSVGIntegrationUtils.cpp:275: error: 'struct nsSVGEffects::EffectProperties' has no member named 'GetClipPathFrame'
Blocks: 455314, 454945
Attached patch with missing file added (obsolete) (deleted) — Splinter Review
Attachment #341798 - Attachment is obsolete: true
Attachment #341838 - Flags: superreview?(roc)
Attachment #341838 - Flags: review?(roc)
Attachment #341798 - Flags: superreview?(roc)
Attachment #341798 - Flags: review?(roc)
Thanks Mats.
Attached patch last version broke patterns and gradients (obsolete) (deleted) — Splinter Review
Attachment #341838 - Attachment is obsolete: true
Attachment #341851 - Flags: superreview?(roc)
Attachment #341851 - Flags: review?(roc)
Attachment #341838 - Flags: superreview?(roc)
Attachment #341838 - Flags: review?(roc)
Need better comments to indicate what the semantics of the caching are. For GetReferencedFrame I would say "Get the cached reference frame; will return null if no frame has been acquired by FindReferenceFrame since the last invalidation." But I don't know if this is really the right approach. If something changes in the filter (not frame teardown) we really should recompute mFilterRect using the frame. Seems like with this patch we wouldn't, and mFilterRect just stays wrong. In fact, I think with this patch we won't even set up mFilterRect correctly in the call to UpdateRect from the nsSVGFilterProperty constructor. I guess the need to update mFilterRect right away isn't really compatible with the one-shot invalidation strategy :-(. But it's also not compatible with situations where a frame is temporarily deleted, for example during reframing for style changes, we might delete the filter frame and then create it again, and we don't have any way to be notified when the filter frame has been recreated. I think ideally we'd keep the one-shot approach but add something to asynchronously recompute mFilterRect. So how about this: in nsSVGFilterProperty::DoUpdate, call PresContext()->FrameConstructor()->PostRestyleEvent(content, 0, nsChangeHint_RepaintFrame|nsChangeHint_UpdateEffects) to get the style system to do the work. Now, in nsSVGEffects::UpdateEffects, after deleting the properties we need to check for a filter property and if there is one, get it to update its mFilterRect at that time.
Attached file address review comments (obsolete) (deleted) —
This patch only fixes this bug now.
Attachment #341851 - Attachment is obsolete: true
Attachment #342724 - Flags: superreview?(roc)
Attachment #342724 - Flags: review?(roc)
Attachment #341851 - Flags: superreview?(roc)
Attachment #341851 - Flags: review?(roc)
Attached patch update patch (deleted) — Splinter Review
without the extraneous blank line.
Attachment #342724 - Attachment is obsolete: true
Attachment #342725 - Flags: superreview?(roc)
Attachment #342725 - Flags: review?(roc)
Attachment #342724 - Flags: superreview?(roc)
Attachment #342724 - Flags: review?(roc)
No longer blocks: 454945
No longer blocks: 455314
Comment on attachment 342725 [details] [diff] [review] update patch This looks good. I think as a followup we can remove mFilterRect completely. Also, do markers need similar treatment?
Attachment #342725 - Flags: superreview?(roc)
Attachment #342725 - Flags: superreview+
Attachment #342725 - Flags: review?(roc)
Attachment #342725 - Flags: review+
checked in dad9b46f1cb6 I don't think markers need anything over and above what all rendering observers might need to fix bug 454945 and bug 455314
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Blocks: 461131
Crash Signature: [@ nsSVGEffects::RemoveRenderingObserver]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: