Closed Bug 1046140 Opened 6 years ago Closed 6 years ago

domUtils.getSubpropertiesForCSSProperty("--foo") returns a huge object

Categories

(Core :: CSS Parsing and Computation, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34
Tracking Status
firefox32 --- unaffected
firefox33 + fixed
firefox34 + fixed

People

(Reporter: paul, Assigned: paul)

References

Details

Attachments

(1 file, 1 obsolete file)

This code:
Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils).getSubpropertiesForCSSProperty("--foo")

... returns 6398 sub properties. This makes the devtools go crazy when inspecting variables.
Blocks: 1045616
Attached patch attempt (obsolete) — Splinter Review
I guess that might work...
Yep.

Who could review that?
Attachment #8464718 - Flags: review?(cam)
Can we add a test?  Just running that line from comment 0 in a debug build shows that something is obviously wrong, since it fails a NS_ABORT_IF_FALSE in nsCSSProps::IsShorthand.
Component: DOM → CSS Parsing and Computation
Attached patch v1Splinter Review
Assignee: nobody → paul
Attachment #8464718 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8464718 - Flags: review?(cam)
Attachment #8464737 - Flags: review?(bzbarsky)
Comment on attachment 8464737 [details] [diff] [review]
v1

r=me
Attachment #8464737 - Flags: review?(bzbarsky) → review+
Please talk to Cameron about where this needs to be backported to.
Blocks: 773296
(In reply to Boris Zbarsky [:bz] from comment #7)
> Please talk to Cameron about where this needs to be backported to.

Devtools code started using getSubpropertiesForCSSProperty with CSS variable names only in Firefox 34, and only devtools use this method. So we don't have to backport this code.

Cameron, do you think we should ask for beta and/or aurora approval?
Flags: needinfo?(cam)
Can extensions use things on inDOMUtils?  If so, we should backport to Aurora just in case someone tries to use it.
Flags: needinfo?(cam)
> Can extensions use things on inDOMUtils? 

Absolutely.
[Tracking Requested - why for this release]: Extensions can call code that triggers an NS_ABORT_IF_FALSE.  Although extensions aren't known to be using this API yet, better close off the bug before they do.
Keywords: checkin-needed
Blocks: 1043642
https://hg.mozilla.org/mozilla-central/rev/367a559c6b3b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Comment on attachment 8464737 [details] [diff] [review]
v1

Approval Request Comment
[Feature/regressing bug #]: bug 1006595
[User impact if declined]: Extensions can call code that triggers an NS_ABORT_IF_FALSE.
[Describe test coverage new/current, TBPL]: Automated test added; patch has just landed on mozilla-central.
[Risks and why]: Low, this just causes the method to throw an exception.
[String/UUID change made/needed]: N/A
Attachment #8464737 - Flags: approval-mozilla-aurora?
Attachment #8464737 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.