Closed Bug 1731886 Opened 3 years ago Closed 3 years ago

Use release asserts for WebIDL union getters

Categories

(Core :: DOM: Bindings (WebIDL), enhancement)

enhancement

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox-esr91 --- fixed
firefox94 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

This is easy to do (I have already written a patch) and would let us avoid some bad behavior in certain cases. Nika pointed out that the performance cost probably won't be high because most of the time it'll end up as a redundant check the compiler can easily eliminate:

if (aFoo.IsBar()) {
   ... aFoo.GetAsBar() ...
}
Type: defect → enhancement
Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5d74bd11ae89 Use release asserts for WebIDL union getters. r=peterv
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

Comment on attachment 9242368 [details]
Bug 1731886 - Use release asserts for WebIDL union getters.

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is a low-risk way to fix an entire class of security issues, sort of like release-mode array bounds checks.
  • User impact if declined: Theoretically there could be some security issues we have failed to find.
  • Fix Landed on Version: 94
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The risk is that we'd hit this crash frequently. Though that would mean we have some easy to find security issues that we haven't fixed, so crashing is probably better. This has been on Nightly for a few weeks, and on Beta for a few days, without any noticeable impact on stability.
  • String or UUID changes made by this patch: none
Attachment #9242368 - Flags: approval-mozilla-esr91?

Comment on attachment 9242368 [details]
Bug 1731886 - Use release asserts for WebIDL union getters.

Approved for 91.3esr.

Attachment #9242368 - Flags: approval-mozilla-esr91? → approval-mozilla-esr91+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: