Closed Bug 1221104 Opened 9 years ago Closed 8 years ago

Reject Permission API promises with TypeError

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox45 --- affected
firefox46 --- fixed

People

(Reporter: poiru, Assigned: poiru)

References

Details

Attachments

(2 files)

`navigator.permissions.query({ name: "foo" })` is rejected with a Exception instead of TypeError.
Blocks: 1221106
According to the spec, we should reject unsupported permissions with a
TypeError. This merely removes the 'midi' entry entirely so that we get the
expected behaviour.
Attachment #8699473 - Flags: review?(amarchesini)
This is merely for clarity. The spec does not require a TypeError to be thrown here.
Attachment #8699474 - Flags: review?(amarchesini)
Attachment #8699473 - Flags: review?(amarchesini) → review+
Attachment #8699474 - Flags: review?(amarchesini) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/8feecfc42ddde37ac5273b98c9f9ce114b86c897
Bug 1221104 - Revoke 'midi' permission queries with TypeError. r=baku

https://hg.mozilla.org/integration/mozilla-inbound/rev/bd9a30ae129298318684ec889b2833e6ccd86dc7
Bug 1221104 - Throw NS_ERROR_NOT_IMPLEMENTED instead of NS_ERROR_UNEXPECTED for PushPermissionDescriptor.userVisible. r=baku
https://hg.mozilla.org/mozilla-central/rev/8feecfc42ddd
https://hg.mozilla.org/mozilla-central/rev/bd9a30ae1292
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: