Closed Bug 1372812 Opened 7 years ago Closed 7 years ago

stylo: Assertion failure: mSource.IsGeckoRuleNode() (This should be used only in Gecko-backed style system!), at layout/style/nsStyleContext.h:167

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: hiro, Assigned: manishearth)

References

Details

Attachments

(1 file)

#0  0x00007fffe1c41d81 in nsStyleContext::GetParent (this=0x7fffaf2a2210) at /home/ikezoe/central/layout/style/nsStyleContext.h:166
#1  0x00007fffe45c5d45 in nsListControlFrame::AboutToDropDown (this=0x7fffaf2a26c8) at /home/ikezoe/central/layout/forms/nsListControlFrame.cpp:1468
#2  0x00007fffe45b3447 in nsComboboxControlFrame::ShowList (this=0x7fffaf2a24a8, aShowList=true) at /home/ikezoe/central/layout/forms/nsComboboxControlFrame.cpp:367
#3  0x00007fffe45b5181 in nsComboboxControlFrame::ShowDropDown (this=0x7fffaf2a24a8, aDoDropDown=true) at /home/ikezoe/central/layout/forms/nsComboboxControlFrame.cpp:929
#4  0x00007fffe45b2ef5 in nsComboboxControlFrame::SetFocus (this=0x7fffaf2a24a8, aOn=true, aRepaint=true) at /home/ikezoe/central/layout/forms/nsComboboxControlFrame.cpp:277
#5  0x00007fffe31dde50 in nsGenericHTMLFormElement::PreHandleEvent (this=0x7fffade98260, aVisitor=...) at /home/ikezoe/central/dom/html/nsGenericHTMLElement.cpp:2025
#6  0x00007fffe2fb608b in mozilla::EventTargetChainItem::PreHandleEvent (this=0x7fffc89bc008, aVisitor=...) at /home/ikezoe/central/dom/events/EventDispatcher.cpp:407
#7  0x00007fffe2fb7709 in mozilla::EventDispatcher::Dispatch (aTarget=0x7fffade98260, aPresContext=0x7fffb00f8000, aEvent=0x7fffffffb310, aDOMEvent=0x0, aEventStatus=0x0, aCallback=
    0x0, aTargets=0x0) at /home/ikezoe/central/dom/events/EventDispatcher.cpp:821
#8  0x00007fffe1f03380 in FocusBlurEvent::Run (this=0x7fffafa9a0b0) at /home/ikezoe/central/dom/base/nsFocusManager.cpp:2044
#9  0x00007fffe1c8acf5 in nsContentUtils::AddScriptRunner (aRunnable=...) at /home/ikezoe/central/dom/base/nsContentUtils.cpp:5630
#10 0x00007fffe1c8ad73 in nsContentUtils::AddScriptRunner (aRunnable=0x7fffafa9a0b0) at /home/ikezoe/central/dom/base/nsContentUtils.cpp:5637

Got this assertion when I clicked "Dots:" select element on a site [1]

This is a regression very recently. 

[1] https://greensock.com/js/speed.html
(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)

> This is a regression very recently. 

I think I was wrong. This is not a recent one.  I can reproduce this assertion with a revision two weeks ago[1].

[1] https://treeherder.mozilla.org/#/jobs?repo=mozilla-central&revision=15e32469eb048957223bac458140776a30251c6b
Priority P2 and block stylo-nightly meta bug because we should fix potential stability issues before enabling Stylo on Nightly.
Priority: -- → P2
Bumping the priority on stability issues.
Priority: P2 → P1
I can't reproduce this anymore, both on tip and on my bug 1373018 branch (which cleans up a lot of this code)
Oh, I noticed an important thing that this assertion does hit only on *non* E10S.
The fix here is probably replacing the two GetParent()s in nsListControlFrame::AboutToDropDown with GetParentAllowServo()
Assignee: nobody → manishearth
Status: NEW → ASSIGNED
The fix worked.
Comment on attachment 8877850 [details]
Bug 1372812 - stylo: Make nsListControlFrame::AboutToDropDown work in servo mode;

https://reviewboard.mozilla.org/r/149280/#review153744

r=me

::: layout/forms/nsListControlFrame.cpp:1468
(Diff revision 2)
>    // color we find underneath until we have an opaque color, or run out of
>    // backgrounds. We compose with the PresContext default background color,
>    // which is always opaque, in case we don't end up with an opaque color.
>    // This gives us a very poor approximation of translucency.
>    nsIFrame* comboboxFrame = do_QueryFrame(mComboboxFrame);
> -  nsStyleContext* context = comboboxFrame->StyleContext()->GetParent();
> +  nsIFrame* parent = comboboxFrame->GetParent();

nit: I'd just call it `frame`. Parent is only a good name the first iteration of the loop :P
Attachment #8877850 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8877850 [details]
Bug 1372812 - stylo: Make nsListControlFrame::AboutToDropDown work in servo mode;

https://reviewboard.mozilla.org/r/149280/#review153746

::: layout/forms/nsListControlFrame.cpp:1471
(Diff revision 2)
>    // This gives us a very poor approximation of translucency.
>    nsIFrame* comboboxFrame = do_QueryFrame(mComboboxFrame);
> -  nsStyleContext* context = comboboxFrame->StyleContext()->GetParent();
> +  nsIFrame* parent = comboboxFrame->GetParent();
>    mLastDropdownBackstopColor = NS_RGBA(0,0,0,0);
> -  while (NS_GET_A(mLastDropdownBackstopColor) < 255 && context) {
> +  while (NS_GET_A(mLastDropdownBackstopColor) < 255 && parent) {
> +    auto context = parent->StyleContext();

One last nit: Please could you use `auto*`, or just `nsStyleContext*`? `auto` to assign to pointers may be a footgun.
Comment on attachment 8877850 [details]
Bug 1372812 - stylo: Make nsListControlFrame::AboutToDropDown work in servo mode;

https://reviewboard.mozilla.org/r/149280/#review153744

> nit: I'd just call it `frame`. Parent is only a good name the first iteration of the loop :P

used "ancestor"
Pushed by manishearth@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/486f15de35dd
stylo: Make nsListControlFrame::AboutToDropDown work in servo mode; r=emilio
https://hg.mozilla.org/mozilla-central/rev/486f15de35dd
Status: ASSIGNED → 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: