Closed
Bug 1365362
Opened 7 years ago
Closed 7 years ago
stylo: Gecko_AtomAttrValue usage is a bit bogus
Categories
(Core :: CSS Parsing and Computation, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla55
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file)
1.25 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
Testcase: <style type="text/css"> #foo {} </style> <body id> </body> This triggers: ###!!! ASSERTION: wrong type: 'Type() == eAtom', file ../../../mozilla/dom/base/nsAttrValue.h, line 494 with a callstack pointing to Gecko_AtomAttrValue. In Gecko, id attributes are stored as atoms _except_ if the value is empty; that case is stored as a string, effectively. Now it happens to be the case that an empty string is stored as a null pointer in nsAttrValue, so when that gets returned as nsIAtom* servo sees a null there and treats that as None. Anyway, in terms of fixes, seems like we should just check attr->Type() == nsAttrValue::eAtom and return null if so.
Assignee | ||
Comment 1•7 years ago
|
||
MozReview-Commit-ID: Btf7ZI4ZdMX
Attachment #8868253 -
Flags: review?(emilio+bugs)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 2•7 years ago
|
||
Comment on attachment 8868253 [details] [diff] [review] Make Gecko_AtomAttrValue work correctly when the attr's value is not an atom Review of attachment 8868253 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for catching this :)
Attachment #8868253 -
Flags: review?(emilio+bugs) → review+
Assignee | ||
Comment 3•7 years ago
|
||
Well, the assert got hit a bunch when I loaded <https://addons.mozilla.org/en-US/firefox/>... ;)
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/159f82e6813c Make Gecko_AtomAttrValue work correctly when the attr's value is not an atom. r=emilio
Comment 5•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/159f82e6813c
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•