Closed Bug 1379893 Opened 7 years ago Closed 7 years ago

stylo: Crash in Gecko_GetStyleContext

Categories

(Core :: CSS Parsing and Computation, defect, P1)

54 Branch
Unspecified
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox-esr52 --- unaffected
firefox54 --- unaffected
firefox55 --- unaffected
firefox56 --- fixed

People

(Reporter: cpeterson, Assigned: bholley)

References

(Blocks 1 open bug)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is report bp-938fcefe-9f19-4297-944c-df6700170710. ============================================================= 9 crashes in Nightly 56.
From the stack, I guess it crashes at https://searchfox.org/mozilla-central/rev/5dadcbe55b4ddd1e448c06c77390ff6483aa009b/layout/style/ServoBindings.cpp#346 likely that GetShell() returns nullptr, and we tries to call GetPresContext() on that nullptr. We should probably null-check GetShell since it's prefixed Get.
I cannot reproduce with just browsing that site. If it is really because GetShell() returns nullptr, then it might relate more to the site you just navigate from, rather than the site you are browsing.
This code will go away with bug 1367904. That said, we should probably just land the null-check. I'll attach a patch.
Assignee: nobody → bobbyholley
MozReview-Commit-ID: EWTmhXnl64P
Attachment #8885372 - Flags: review?(emilio+bugs)
Attachment #8885372 - Flags: review?(emilio+bugs) → review+
Pushed by bholley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6accdcc2c44 Null-check the presshell in Gecko_GetStyleContext. r=emilio
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: