Closed
Bug 1428927
Opened 8 years ago
Closed 8 years ago
DOMPrefs depends on Unified Build order for header inclusion
Categories
(Core :: DOM: Core & HTML, enhancement, P1)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
People
(Reporter: qdot, Assigned: qdot)
References
Details
(Whiteboard: [stockwell fixed:product])
As of bug 1419771, we now use DOMPrefs in WebIDL files as an exposure conditional. However, since nothing was added to WebIDL codegen to include the DOMPrefs file, we depend on it coming in through Unified Build header inclusion order. This means we can have build errors seemingly unrelated to a patch when inclusion orders change. For example:
https://treeherder.mozilla.org/logviewer.html#?job_id=154862092&repo=mozilla-inbound&lineNumber=17178
| Assignee | ||
Comment 1•8 years ago
|
||
For some reason, we're parsing the header out of the Func annotation in WebIDL, but its not making it into the implementation file header list. Poking around in Codegen now to figure out what's up.
Depends on: 1419771
| Assignee | ||
Comment 2•8 years ago
|
||
This include is missing from any file that uses a different interface type header than the default. For instance, with PushMessageData, the header file is set to ServiceWorkerEvents.h in bindings.conf, which causes the check at https://searchfox.org/mozilla-central/source/dom/bindings/Codegen.py#1211 to fail, so the binding header isn't included.
bz, what's the best plan of action here?
Flags: needinfo?(bzbarsky)
| Assignee | ||
Comment 3•8 years ago
|
||
Fixing comment 2, that was supposed to be "the Func header isn't included".
Comment 4•8 years ago
|
||
Given that this is causing active bustage, I'm upgrading the priority here. It's luckily only breaking a Tier 2 build at the moment, but we're one unified boundary change away from breaking nightlies too.
Severity: normal → critical
Priority: -- → P1
Comment 5•8 years ago
|
||
The setup for Func is simple:
1) If you use the default header name for your implementation (mozilla/dom/InterfaceName.h), then codegen will parse the Func value and include the right headers for that value.
2) If you use a non-default header name for your implementation, clearly codegen can't depend on you putting any of your things in headers named in a predictable way. It won't even try. It is your responsibility to include any headers needed by your Funcs from your implementation header.
For the specific example in comment 2, ServiceWorkerEvents.h needs to include the DOMPrefs header.
This should all have been checked in the webidl review in bug 1419771...
I should probably add some documentation to https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings somewhere about this, but really it would be best if people just stop using non-default header file values.
Flags: needinfo?(bzbarsky)
| Assignee | ||
Comment 6•8 years ago
|
||
Ok, cool. Just wanted background on that "know what they're doing" comment in Codegen. That makes sense.
| Assignee | ||
Comment 7•8 years ago
|
||
ServiceWorkerEvents.h include was fixed as part of bug 1419771 before I could get this patch in. Marking this invalid now.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
| Assignee | ||
Comment 8•8 years ago
|
||
Actually I guess it was fixed so changing to FIXED.
Resolution: INVALID → FIXED
| Comment hidden (Intermittent Failures Robot) |
Comment 10•8 years ago
|
||
I updated https://developer.mozilla.org/en-US/docs/Mozilla/WebIDL_bindings to make the headerFile/Func interaction clearer.
| Comment hidden (Intermittent Failures Robot) |
Updated•8 years ago
|
Whiteboard: [stockwell fixed:product]
| Comment hidden (Intermittent Failures Robot) |
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•