Closed
Bug 1333117
Opened 8 years ago
Closed 8 years ago
partial interface definitions in files other than the file that declares the interface are a footgun
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla54
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
We have no documentation saying not to do this, nor do we have anything enforcing people don't do it. But it doesn't work correctly, because of build dependency issues. Specifically, if I do a build, then add "partial interface Navigator { void foo(); };" to Window.webidl, then do a dep build I will NOT get a "foo()" method on Navigator. That's because NavigatorBinding.cpp had no previous dependency on Window.webidl, and we have no idea that there is now such a dependency and we need to regenerate NavigatorBinding.cpp. So we don't regenerate it. This is similar to the issue described in bug 1071490, where we removed the footgun in bug 1071615. We should probably do something similar here...
Assignee | ||
Comment 1•8 years ago
|
||
Of course NavigatorProperty does just this. I'll have to whitelist it; I also added notes about it needing a clobber on https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings
Assignee | ||
Comment 2•8 years ago
|
||
Attachment #8829521 -
Flags: review?(kyle)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Comment 3•8 years ago
|
||
Comment on attachment 8829521 [details] [diff] [review] We should ensure, at build-time, that partial interfaces are defined in the same file as the interface they extend, since our build system doesn't really support correct dep builds if they're placed in a different file Review of attachment 8829521 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Worth throwing a test in to continue confirming this fails?
Attachment #8829521 -
Flags: review?(kyle) → review+
Assignee | ||
Comment 4•8 years ago
|
||
We don't really have any infrastructure I know of for testing this, unfortunately. That is, we don't have infra for testing that codegen failures (unlike parser failures) happen when they should.
Comment 5•8 years ago
|
||
Ah, ok, thanks.
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a0974b1960a9 We should ensure, at build-time, that partial interfaces are defined in the same file as the interface they extend, since our build system doesn't really support correct dep builds if they're placed in a different file. r=qdot
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a0974b1960a9
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•