Closed Bug 1401416 Opened 2 years ago Closed 2 years ago

[intersection-observer] Missing null check on do_QueryFrame result

Categories

(Core :: Layout, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- fixed
firefox58 --- fixed

People

(Reporter: tschneider, Assigned: tschneider)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

The return value of do_QueryFrame can be null. We should make sure to check it to not run into issues in the future.
Attached patch Null check do_QueryFrame result (obsolete) — Splinter Review
Blocks: 1381574
Attachment #8910064 - Flags: review?(dholbert)
Preventive fix. Was noticed while inspecting the code. There is one crash that looks related, even tho not clear yet in what exact scenario (assuming XUL related): https://crash-stats.mozilla.com/report/index/1602aafc-f48e-44ae-95c9-d5e660170823.
More context, better commit message, comments.
Attachment #8910064 - Attachment is obsolete: true
Attachment #8910064 - Flags: review?(dholbert)
Attachment #8910090 - Flags: review?(dholbert)
Comment on attachment 8910090 [details] [diff] [review]
Let intersection rect be empty if do_QueryFrame(rootFrame) returns null

Review of attachment 8910090 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8910090 - Flags: review?(dholbert) → review+
Assignee: nobody → tschneider
Status: NEW → ASSIGNED
Pushed by tschneider@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/90be30b5206c
[intersection-observer] Let intersection rect be empty if do_QueryFrame(rootFrame) returns null. r=dholbert
https://hg.mozilla.org/mozilla-central/rev/90be30b5206c
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
What do we want to do wrt 57 and this bug?
Flags: needinfo?(tschneider)
Comment on attachment 8910090 [details] [diff] [review]
Let intersection rect be empty if do_QueryFrame(rootFrame) returns null

Approval Request Comment
[Feature/Bug causing the regression]: 1314032
[User impact if declined]: Potential crashes like https://crash-stats.mozilla.com/report/index/1602aafc-f48e-44ae-95c9-d5e660170823
[Has the fix been verified in Nightly?]: Yes
[Is the change risky?]: No
Flags: needinfo?(tschneider)
Attachment #8910090 - Flags: approval-mozilla-beta?
Comment on attachment 8910090 [details] [diff] [review]
Let intersection rect be empty if do_QueryFrame(rootFrame) returns null

Fix crashes, taking it
should be in 57b4
Attachment #8910090 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.