Closed Bug 926799 Opened 6 years ago Closed 6 years ago

--disable-webrtc build failure with "WebIDL.WebIDLError: error: Unresolved type '<unresolved scope>::DataChannel'., PeerConnectionImpl.webidl line 70:2"


(Core :: WebRTC, defect)

Not set





(Reporter: dholbert, Assigned: dholbert)




(1 file)

mozilla-inbound fails to build currently, with --disable-webrtc.

Error output is as follows:
 0:37.18 Traceback (most recent call last):
 0:37.18   File "/scratch/work/builds/mozilla-inbound/mozilla/config/", line 56, in <module>
 0:37.18     main(sys.argv[1:])
 0:37.18   File "/scratch/work/builds/mozilla-inbound/mozilla/config/", line 48, in main
 0:37.18     execfile(script, frozenglobals)
 0:37.18   File "/scratch/work/builds/mozilla-inbound/mozilla/dom/bindings/", line 81, in <module>
 0:37.18     main()
 0:37.18   File "/scratch/work/builds/mozilla-inbound/mozilla/dom/bindings/", line 56, in main
 0:37.18     parserResults = parser.finish()
 0:37.18   File "/scratch/work/builds/mozilla-inbound/mozilla/dom/bindings/parser/", line 4849, in finish
 0:37.18     production.finish(self.globalScope())
 0:37.18   File "/scratch/work/builds/mozilla-inbound/mozilla/dom/bindings/parser/", line 642, in finish
 0:37.18     member.finish(scope)
 0:37.18   File "/scratch/work/builds/mozilla-inbound/mozilla/dom/bindings/parser/", line 3196, in finish
 0:37.18     type = returnType.complete(scope)
 0:37.18   File "/scratch/work/builds/mozilla-inbound/mozilla/dom/bindings/parser/", line 1448, in complete
 0:37.18     [self.location])
 0:37.18 WebIDL.WebIDLError: error: Unresolved type '<unresolved scope>::DataChannel'., PeerConnectionImpl.webidl line 70:2
 0:37.18   DataChannel createDataChannel(DOMString label, DOMString protocol,
 0:37.18   ^
Looks like this file (PeerConnectionImpl.webidl) was just added, in bug 917328.
Blocks: 917328
I suspect the file (& its friends) really belong in this "if CONFIG['MOZ_WEBRTC']:" chunk of their file:
...but instead they were added to the generic section:
Attached patch fix v1Splinter Review
Per previous comment, I suspect this is what was intended over in bug 917328.
Assignee: nobody → dholbert
Attachment #817010 - Flags: review?(rjesup)
(I confirmed that this patch lets my --disable-webrtc build get past this stage of the build.)

(If & when this has received r+, please feel free to land this on my behalf, if anyone feels like landing it before I get around to it.)
Thanks! Seems reasonable. Pity there was no test to catch this.

I'm curious, I notice only DataChannel.webidl and MediaStreamList.webidl is excluded, which is a tiny part of webrtc. How come RTCPeerConnection.webidl for instance is not excluded by --disable-webrtc?

The reason I ask is that RTCPeerConnection.webidl (the public api) isn't going to work without PeerConnectionImpl.webidl now (the internal api), so moving one and not the other seems wrong if any running code will call it.

Yes DataChannel dependency in webidl is new and unfortunate. I suppose an alternative would be to forward-declare it. I don't know enough about --disable-webrtc and its use to know which way to go.
Flags: needinfo?(rjesup)
(BTW Please don't let my question hold up the fix)
Attachment #817010 - Flags: review?(rjesup) → review+
Flags: needinfo?(rjesup)
Target Milestone: --- → mozilla27
Duplicate of this bug: 926959
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.