Closed Bug 1160121 Opened 10 years ago Closed 10 years ago

Report error if JSImplementation is present in WebIDL but no implementation found

Categories

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

37 Branch
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ignisvulpis, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0 Build ID: 20150417180217 Steps to reproduce: Produced a WebIDL like this [JSImplementation="@mozilla.org/credentials/manager;1", NavigatorProperty="credentials", NoInterfaceObject] interface CredentialsContainer { Promise<Credential?> get(optional CredentialRequest request); Promise<Credential> store(optional Credential credential); Promise<void> requireUserMediation(); }; Full WebIDL here: https://github.com/AxelNennker/firefox_credentials/blob/master/Credentials.webidl But never implemented "@mozilla.org/credentials/manager;1" Actual results: ./mach build without errors Expected results: mach should complain about the missing implementation. Scan through all loaded manifests and complain if contractId @mozilla.org/example;1 is not found in contract and "category JavaScript-navigator-property" line contract @mozilla.org/example;1 {xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} category JavaScript-navigator-property impl @mozilla.org/example;1 ------------------ ./mach webidl-example CredentialsContainer could generate CredentialsContainer-chrome.manifest and nsCredentialsContainer-example.js
Component: Untriaged → DOM
Product: Firefox → Core
Contracts and category entries can be added programmatically, not just via manifests. There's really no good way to reliably detect that a contract is _not_ registered and won't be by the time the DOM cares about it, and this is a situation where a false positive has much worse consequences (code that _should_ build doesn't) than a false negative (error reported at runtime, not compile time).
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.