Closed Bug 835712 Opened 13 years ago Closed 13 years ago

Stop hand-rolling sequence conversion code

Categories

(Core :: WebRTC, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: bzbarsky, Assigned: jib)

References

Details

(Whiteboard: [WebRTC] [blocking-webrtc-] [qa-])

Attachments

(1 file, 1 obsolete file)

Both part of converting to WebIDL and a spec bug to bring up in W3 WebRTC.
Whiteboard: [WebRTC] [blocking-webrtc-]
Partly needed by Bug 835370 which I built on-top of this one, and partly a good-will patch to make up for what I wasn't able to do with webIDL in that bug :-)
Attachment #713422 - Flags: review?(rjesup)
Attachment #713422 - Flags: review?(bzbarsky)
Comment on attachment 713422 [details] [diff] [review] Uses more webidl for safer JS traversal >+ RTCIceServer RTCIceServer(); Is this still needed? If RTCConfiguration includes RTCIceServer somewhere inside it, then it shouldn't be. The patch doesn't have an RTCConfiguration.webidl. Forgot to hg add? > + if (!(config.Init(aCx, nullptr, aSrc)) && config.mIceServers.WasPassed()) { That looks wrong. It should either be: if (!(config.Init(aCx, nullptr, aSrc) && config.mIceServers.WasPassed())) { or: if (!config.Init(aCx, nullptr, aSrc) || !config.mIceServers.WasPassed()) { but the patch as written will fail to return early if mIceServers was in fact not passed, afaict. >- if (!server.mUrl.WasPassed()) { >- return NS_ERROR_FAILURE; >- } I don't think you can remove this check. r=me with the above fixed, though I'd like to see the new WebIDL file too. Thank you for doing this!
Attachment #713422 - Flags: review?(bzbarsky) → review+
Blocks: 835370
>>+ RTCIceServer RTCIceServer(); > > Is this still needed? If RTCConfiguration includes RTCIceServer somewhere inside it, > then it shouldn't be. I did that because without it, RTCIceServer got defined AFTER its use in the bindings, and I got errors. But when I remove it now it works, so not sure what happened. Removed. > The patch doesn't have an RTCConfiguration.webidl. Forgot to hg add? Yes :*) Now added! >> + if (!(config.Init(aCx, nullptr, aSrc)) && config.mIceServers.WasPassed()) { > > That looks wrong. It should either be: > > if (!(config.Init(aCx, nullptr, aSrc) && config.mIceServers.WasPassed())) { Good catch, thanks! >>- if (!server.mUrl.WasPassed()) { >>- return NS_ERROR_FAILURE; >>- } > > I don't think you can remove this check. Agree. Now back. Side-note with validation done in JS now, perhaps all these check could be squeaky NS_ENSURE_SUCCESS()?
Attachment #713422 - Attachment is obsolete: true
Attachment #713422 - Flags: review?(rjesup)
Attachment #713541 - Flags: review?(rjesup)
Attachment #713541 - Flags: review?(bzbarsky)
Comment on attachment 713541 [details] [diff] [review] Uses more webidl for safer JS traversal r=me
Attachment #713541 - Flags: review?(bzbarsky) → review+
Depends on: 841404
Attachment #713541 - Flags: review?(rjesup) → review+
Assignee: nobody → jib
Attachment #713541 - Flags: checkin?(rjesup)
Attachment #713541 - Flags: checkin?(rjesup)
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Whiteboard: [WebRTC] [blocking-webrtc-] → [WebRTC] [blocking-webrtc-] [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: