stylo: Assertion failure: nsContentUtils::IsSafeToRunScript() in nsPresContext::MediaFeatureValuesChanged

RESOLVED FIXED in Firefox 51

Status

()

Core
CSS Parsing and Computation
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: bholley, Assigned: bholley)

Tracking

(Blocks: 1 bug)

unspecified
mozilla51
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Looks like updating incubator pulled in bug 1241867, which broke stylo. CI can't come soon enough.
(Assignee)

Comment 1

2 years ago
Stack:

Assertion failure: nsContentUtils::IsSafeToRunScript(), at /files/mozilla/repos/qq/layout/base/nsPresContext.cpp:1903
#01: nsPresContext::MediaFeatureValuesChanged(nsRestyleHint, nsChangeHint)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x50afa01]
#02: nsPresContext::SetOverrideDPPX(float)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5078d77]
#03: nsDocumentViewer::InitPresentationStuff(bool)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x507774f]
#04: nsDocumentViewer::InitInternal(nsIWidget*, nsISupports*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, bool, bool, bool)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x5077374]
#05: nsDocumentViewer::Init(nsIWidget*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x50768d6]
#06: nsDocShell::SetupNewViewer(nsIContentViewer*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x58e4d4f]
#07: nsDocShell::Embed(nsIContentViewer*, char const*, nsISupports*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x58e3bbb]
#08: nsDocShell::CreateContentViewer(nsACString_internal const&, nsIRequest*, nsIStreamListener**)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x58b6b00]
#09: nsDSURIContentListener::DoContent(nsACString_internal const&, bool, nsIRequest*, nsIStreamListener**, bool*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x58b55c2]
#10: nsDocumentOpenInfo::TryContentListener(nsIURIContentListener*, nsIChannel*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x1a3a05e]
#11: nsDocumentOpenInfo::DispatchContent(nsIRequest*, nsISupports*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x1a385d4]
#12: nsDocumentOpenInfo::OnStartRequest(nsIRequest*, nsISupports*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x1a37e4a]
#13: nsBaseChannel::OnStartRequest(nsIRequest*, nsISupports*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x31f165]
#14: nsInputStreamPump::OnStateStart()[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x354405]
#15: nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x353f2d]
#16: nsInputStreamReadyEvent::Run()[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x190899]
#17: nsThread::ProcessNextEvent(bool, bool*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x1c5499]
#18: NS_ProcessPendingEvents(nsIThread*, unsigned int)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2509ec]
#19: nsBaseAppShell::NativeEventCallback()[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4b03e7e]
#20: nsAppShell::ProcessGeckoEvents(void*)[/files/mozilla/repos/qq/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x4b9b642]
#21: __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0xaa881]
(Assignee)

Comment 2

2 years ago
Created attachment 8786953 [details] [diff] [review]
Tweak stylo path for nsPresContext::HasCachedStyleData to avoid triggering operations too early during bootstrapping. v1
(Assignee)

Updated

2 years ago
Attachment #8786953 - Flags: review?(ecoal95)
Comment on attachment 8786953 [details] [diff] [review]
Tweak stylo path for nsPresContext::HasCachedStyleData to avoid triggering operations too early during bootstrapping. v1

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

::: layout/base/nsPresContext.cpp
@@ +2503,5 @@
>    if (!styleSet) {
>      // XXXheycam ServoStyleSets do not use the rule tree, so just assume for now
> +    // that we need to restyle when e.g. dppx changes assuming we're sufficiently
> +    // bootstrapped.
> +    return mShell && mShell->DidInitialize();

You don't need the null-check, it's checked above. r=me without it.
Attachment #8786953 - Flags: review?(ecoal95) → review+

Comment 4

2 years ago
Pushed by bholley@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/659772c16de7
Tweak stylo path for nsPresContext::HasCachedStyleData to avoid triggering operations too early during bootstrapping. r=emilio

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/659772c16de7
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.