Closed Bug 1352277 Opened 7 years ago Closed 7 years ago

stylo: our font size implementation isn't thread safe

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1351200

People

(Reporter: manishearth, Unassigned)

References

Details

I added font-size pref fetching support in bug 1341775

However, GetBaseSize sometimes hits prefs, which isn't thread safe. The following document will cause a crash

    <body style="font-family: fixed"><span lang="ar">text</span></body>



    Assertion failure: NS_IsMainThread(), at /Users/manishearth/mozilla/higgsino/modules/libpref/prefapi.cpp:784
    #01: PREF_CopyCharPref[/Users/manishearth/mozilla/higgsino/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x14ca40]
    #02: mozilla::Preferences::GetCString(char const*)[/Users/manishearth/mozilla/higgsino/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x152ec1]
    #03: mozilla::StaticPresData::GetFontPrefsForLangHelper(nsIAtom*, mozilla::LangGroupFontPrefs const*) const[/Users/manishearth/mozilla/higgsino/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2e15896]
    #04: Gecko_nsStyleFont_GetBaseSize[/Users/manishearth/mozilla/higgsino/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x2c6dc07]
    #05: _$LT$style..properties..longhands..font_size..KeywordSize$u20$as$u20$style..values..computed..ToComputedValue$GT$::to_computed_value::hffb0d80dd214b7d7[/Users/manishearth/mozilla/higgsino/obj-x86_64-apple-darwin15.6.0/dist/NightlyDebug.app/Contents/MacOS/XUL +0x51b86c4]


Not sure what we should do here.
Isn't this just a duplicate of bug 1351200?
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
heh, I recaleld discussing this but couldn't find the bug so thought it was on IRC.
You need to log in before you can comment on or make changes to this bug.