Open Bug 1543259 Opened 5 years ago Updated 2 years ago

Annotate NewXULOrHTMLElement() callers MOZ_CAN_RUN_SCRIPT and consider annotating NewXULOrHTMLElement MOZ_CAN_RUN_SCRIPT

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox68 --- affected

People

(Reporter: karlt, Unassigned)

References

(Blocks 1 open bug)

Details

Whether NewXULOrHTMLElement() runs script or not depends on the value passed for the parameter aFromParser. A caller could potentially pass dom::FROM_PARSER_FRAGMENT to ensure that this function does not run script.

I don't see any immediate callers doing that, but I haven't chased all the call paths to find if there are any ancestors making that assumption. If not, then NewXULOrHTMLElement() could be MOZ_CAN_RUN_SCRIPT. Existing call paths are missing this annotation.

Type: defect → enhancement
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.