Closed Bug 1402366 Opened 7 years ago Closed 7 years ago

stylo: panicked at 'Resolving style on <html> without current styles

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- disabled
firefox57 --- fixed
firefox58 --- fixed

People

(Reporter: truber, Assigned: emilio)

References

(Blocks 2 open bugs)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase.html
The attached testcase causes an assertion in m-c rev 20170922-5a63d8457a2a. thread '<unnamed>' panicked at 'Resolving style on <html> (0x7fb769535a20) without current styles: ElementData { styles: ElementStyles { primary: Some(Some(StrongRuleNode { p: 0x7fb76b3a9880 })), pseudos: EagerPseudoStyles(None) }, damage: GeckoRestyleDamage(nsChangeHint(0)), hint: RESTYLE_SELF | RESTYLE_DESCENDANTS, flags: TRAVERSED_WITHOUT_STYLING }', /builds/worker/workspace/build/src/servo/ports/geckolib/glue.rs:3067 #0: mozalloc_abort, at memory/mozalloc/mozalloc_abort.cpp:33 #1: abort, at memory/mozalloc/mozalloc_abort.cpp:80 #2: panic_abort::__rust_start_panic, at src/libpanic_abort/lib.rs:61 #3: std::panicking::rust_panic, at src/libstd/panicking.rs:580 #4: std::panicking::rust_panic_with_hook, at src/libstd/panicking.rs:565 #5: std::panicking::begin_panic<collections::string::String>, at src/libstd/panicking.rs:511 #6: std::panicking::begin_panic_fmt, at src/libstd/panicking.rs:495 #7: geckoservo::glue::Servo_ResolveStyle, at servo/ports/geckolib/glue.rs:3067 #8: mozilla::ServoStyleSet::ResolveServoStyle, at layout/style/ServoStyleSet.cpp:1297 #9: mozilla::ServoStyleSet::ResolveStyleFor, at layout/style/ServoStyleSet.cpp:350 #10: mozilla::StyleSetHandle::Ptr::ResolveStyleFor, at layout/style/StyleSetHandleInlines.h:95 #11: nsCSSFrameConstructor::ConstructDocElementFrame, at layout/base/nsCSSFrameConstructor.cpp:2567 #12: nsCSSFrameConstructor::ContentRangeInserted, at layout/base/nsCSSFrameConstructor.cpp:8098 #13: nsCSSFrameConstructor::RecreateFramesForContent, at layout/base/nsCSSFrameConstructor.cpp:10085 #14: mozilla::RestyleManager::ProcessRestyledFrames, at layout/base/RestyleManager.cpp:1515 #15: mozilla::ServoRestyleManager::DoProcessPendingRestyles, at layout/base/ServoRestyleManager.cpp:1138 #16: mozilla::PresShell::DoFlushPendingNotifications, at layout/base/PresShell.cpp:4170 #17: mozilla::PresShell::DoFlushPendingNotifications, at layout/base/PresShell.cpp:4043 #18: nsDocument::FlushPendingNotifications, at dom/base/nsDocument.cpp:8374 #19: nsDocLoader::DocLoaderIsEmpty, at uriloader/base/nsDocLoader.cpp:703 #20: nsDocLoader::OnStopRequest, at uriloader/base/nsDocLoader.cpp:632 #21: mozilla::net::nsLoadGroup::RemoveRequest, at netwerk/base/nsLoadGroup.cpp:629 #22: nsDocument::DoUnblockOnload, at dom/base/nsDocument.cpp:9202 #23: nsDocument::UnblockOnload, at dom/base/nsDocument.cpp:9124 #24: nsDocument::DispatchContentLoadedEvents, at dom/base/nsDocument.cpp:5599 #25: mozilla::detail::RunnableMethodImpl<nsDocument*, void (nsDocument::*)(), true, (mozilla::RunnableKind)0u>::Run, at xpcom/threads/nsThreadUtils.h:1142 #26: mozilla::SchedulerGroup::Runnable::Run, at xpcom/threads/SchedulerGroup.cpp:396 #27: nsThread::ProcessNextEvent, at xpcom/threads/nsThread.cpp:1039 #28: NS_ProcessNextEvent, at xpcom/threads/nsThreadUtils.cpp:521 #29: mozilla::ipc::MessagePump::Run, at ipc/glue/MessagePump.cpp:97 #30: MessageLoop::RunInternal, at ipc/chromium/src/base/message_loop.cc:326 #31: MessageLoop::Run, at ipc/chromium/src/base/message_loop.cc:319 #32: nsBaseAppShell::Run, at widget/nsBaseAppShell.cpp:158 #33: XRE_RunAppShell, at toolkit/xre/nsEmbedFunctions.cpp:880 #34: mozilla::ipc::MessagePumpForChildProcess::Run, at ipc/glue/MessagePump.cpp:269 #35: MessageLoop::RunInternal, at ipc/chromium/src/base/message_loop.cc:326 #36: MessageLoop::Run, at ipc/chromium/src/base/message_loop.cc:319 #37: XRE_InitChildProcess, at toolkit/xre/nsEmbedFunctions.cpp:705 #38: content_process_main, at ipc/contentproc/plugin-container.cpp:63 #39: main, at browser/app/nsBrowserApp.cpp:285 #40: libc-2.26.so+0x20f6a #41: MOZ_ReportAssertionFailure, at mfbt/Assertions.h:165
Flags: in-testsuite?
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Comment on attachment 8911317 [details] Bug 1402366: Mark datetimebox as not needing xul.css. https://reviewboard.mozilla.org/r/182800/#review188078 Seems reasonable to me. Hopefully Jessica can say whether there was any reason for doing it this way?
Attachment #8911317 - Flags: review?(bobbyholley) → review+
Priority: -- → P2
Comment on attachment 8911317 [details] Bug 1402366: Mark datetimebox as not needing xul.css. https://reviewboard.mozilla.org/r/182800/#review188212 Oh, I remember adding it because I was hitting the assertion "Unexpected XUL element in non-XUL doc", but looks like we don't need to load xul.css, so looks good to me. Thanks!
Attachment #8911317 - Flags: review?(jjong) → review+
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5b642e09aacd Mark datetimebox as not needing xul.css. r=bholley,jessica
Request uplift?
Flags: needinfo?(emilio)
Comment on attachment 8911317 [details] Bug 1402366: Mark datetimebox as not needing xul.css. Approval Request Comment [Feature/Bug causing the regression]: none [User impact if declined]: Broken invariants and inefficiency. [Is this code covered by automated tests?]: Yes [Has the fix been verified in Nightly?]: No [Needs manual test from QE? If yes, steps to reproduce]: no [List of other uplifts needed for the feature/fix]: none [Is the change risky?]: not risky [Why is the change risky/not risky?]: Just avoids adding an stylesheet to the document during layout, which breaks some invariants. We have no proof of those invariants being broken turning into correctness issues or crashes, but not proof of the opposite either. [String changes made/needed]: none
Flags: needinfo?(emilio)
Attachment #8911317 - Flags: approval-mozilla-beta?
Comment on attachment 8911317 [details] Bug 1402366: Mark datetimebox as not needing xul.css. Fix a panic in stylo, taking it. Should be in 57b4
Attachment #8911317 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(In reply to Emilio Cobos Álvarez [:emilio] from comment #8) > [Is this code covered by automated tests?]: Yes > [Has the fix been verified in Nightly?]: No > [Needs manual test from QE? If yes, steps to reproduce]: no Setting qe-verify- based on Emilio's assessment on manual testing needs and the fact that this fix has automated coverage.
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: