Closed Bug 1582196 Opened 5 years ago Closed 5 years ago

Get rid of NS_ERROR_RANGE_ERR

Categories

(Core :: DOM: Core & HTML, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

It's causing us to have spec-compliance bugs because people get confused and use NS_ERROR_RANGE_ERR when they're supposed to throw a RangeError.

For example, ImageBitmap::Create throws this instead of an actual RangeError.

Assignee: nobody → bzbarsky

The changes to the return type of MerchantValidationEvent::init are because
Result doesn't allow having an ErrorResult (or any other type without a copy
constructor) as its error type. Plus we would have had the impedance mismatch
between Result<Ok, nsresult> (which is what URL resolution on the document
returns) and Result<Ok, ErrorResult> anyway.

The two remaining consumers don't seem to depend on actually using this
specific nsresult in any way.

Blocks: 927610
Type: defect → task
Attachment #9093896 - Attachment description: Bug 1582196 part 3. Stop using NS_ERROR_RANGE_ERR in PaymentRequest. r=edenchuang → Bug 1582196 part 3. Stop using NS_ERROR_RANGE_ERR and NS_ERROR_TYPE_ERR in payments code. r=edenchuang
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/05a8a4e72917
part 1.  Stop using NS_ERROR_RANGE_ERR in createImageBitmap.  r=baku
https://hg.mozilla.org/integration/autoland/rev/4bf2eafe1afd
part 2.  Stop using NS_ERROR_RANGE_ERR in SVGTransform.  r=jwatt
https://hg.mozilla.org/integration/autoland/rev/7a73a025a5ab
part 3.  Stop using NS_ERROR_RANGE_ERR and NS_ERROR_TYPE_ERR in payments code.  r=edenchuang
https://hg.mozilla.org/integration/autoland/rev/8357c5978e4c
part 4.  Get rid of NS_ERROR_RANGE_ERR.  r=peterv
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/19231 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: