Open Bug 565152 Opened 14 years ago Updated 2 years ago

Make nsCSSFrameConstructor::ProcessChildren correctly handle the case where CreateAnonymousContent fails

Categories

(Core :: Layout, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: ehsan.akhgari, Unassigned)

References

()

Details

Follow-up from bug 534785 comment 15. Currently, ProcessChildren goes ahead and creates a frame even if CreateAnonymousContent fails for some reason. This doesn't seem to be right, and it violates the assumption that some frames make (that they have frames for their anonymous content, for example), which could lead to crashes, or worse.
So the only ways I see for CreateAnonymousContent to fail are: 1) The create->CreateAnonymousContent call fails. 2) BindToTree fails. Can either of these fail in sane situations? That is, can we just make either one failing fatal?
I think we should ensure that neither one fails.
...but yes, I think we should probably make failing fatal in both cases - after going through all the CreateAnonymousContent methods.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.