Closed Bug 986972 Opened 6 years ago Closed 1 year ago

do_QueryInterface abuse in nsDocument.cpp

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: neil, Unassigned)

References

Details

The code

nsCOMPtr<css::Rule> rule = do_QueryInterface(aNewStyleRule);

which appears several times in nsDocument.cpp is an abuse of do_QueryInterface, since css::Rule is not an interface, so what happens is that aNewStyleRule gets reinterpreted as a css::Rule*.

aNewStyleRule should probably be changed to be a css::Rule* directly.
Blocks: 514280
Sorry, I must have asked the wrong person about whether that bug had been filed already.
Priority: -- → P5
No code matching the description in comment 0 exists now, AFAICT.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.