mirror of
https://github.com/pion/webrtc.git
synced 2025-09-27 03:25:58 +08:00
Create WASM covering review
We have a few things that need to be addressed, I have ticketed them. We should now completely pass godox! Resolves #106
This commit is contained in:
@@ -67,7 +67,7 @@ func (d *DataChannel) OnMessage(f func(msg DataChannelMessage)) {
|
||||
defer oldHandler.Release()
|
||||
}
|
||||
onMessageHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
|
||||
// TODO: Ensure message order?
|
||||
// pion/webrtc/projects/15
|
||||
data := args[0].Get("data")
|
||||
go func() {
|
||||
// valueToDataChannelMessage may block when handling 'Blob' data
|
||||
|
@@ -19,10 +19,10 @@ func newDetachedDataChannel(dc *DataChannel) *detachedDataChannel {
|
||||
|
||||
// Wire up callbacks
|
||||
dc.OnMessage(func(msg DataChannelMessage) {
|
||||
read <- msg // TODO: Potential leak?
|
||||
read <- msg // pion/webrtc/projects/15
|
||||
})
|
||||
|
||||
// TODO: OnClose?
|
||||
// pion/webrtc/projects/15
|
||||
|
||||
return &detachedDataChannel{
|
||||
dc: dc,
|
||||
|
@@ -73,10 +73,11 @@ func (pc *PeerConnection) OnDataChannel(f func(*DataChannel)) {
|
||||
defer oldHandler.Release()
|
||||
}
|
||||
onDataChannelHandler := js.FuncOf(func(this js.Value, args []js.Value) interface{} {
|
||||
// BUG(albrow): This reference to the underlying DataChannel doesn't know
|
||||
// pion/webrtc/projects/15
|
||||
// This reference to the underlying DataChannel doesn't know
|
||||
// about any other references to the same DataChannel. This might result in
|
||||
// memory leaks where we don't clean up handler functions. Could possibly
|
||||
// fix by keeping a mutex-protected list of all DataChannel references as a
|
||||
// memory leaks where we don't clean up handler functions. Could possibly fix
|
||||
// by keeping a mutex-protected list of all DataChannel references as a
|
||||
// property of this PeerConnection, but at the cost of additional overhead.
|
||||
dataChannel := &DataChannel{
|
||||
underlying: args[0].Get("channel"),
|
||||
@@ -124,7 +125,7 @@ func (pc *PeerConnection) checkConfiguration(configuration Configuration) error
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Enable these checks once Certificates are supported.
|
||||
// https://github.com/pion/webrtc/issues/513
|
||||
// https://www.w3.org/TR/webrtc/#set-the-configuration (step #4)
|
||||
// if len(configuration.Certificates) > 0 {
|
||||
// if len(configuration.Certificates) != len(existingConfiguration.Certificates) {
|
||||
|
@@ -125,7 +125,6 @@ func (t *QUICTransport) Start(remoteParameters QUICParameters) error {
|
||||
}
|
||||
|
||||
// Check the fingerprint if a certificate was exchanged
|
||||
// TODO: Check why never received.
|
||||
remoteCerts := t.TransportBase.GetRemoteCertificates()
|
||||
if len(remoteCerts) > 0 {
|
||||
err := t.validateFingerPrint(remoteParameters, remoteCerts[0])
|
||||
|
@@ -236,8 +236,8 @@ func (r *SCTPTransport) updateMessageSize() {
|
||||
r.lock.Lock()
|
||||
defer r.lock.Unlock()
|
||||
|
||||
var remoteMaxMessageSize float64 = 65536 // TODO: get from SDP
|
||||
var canSendSize float64 = 65536 // TODO: Get from SCTP implementation
|
||||
var remoteMaxMessageSize float64 = 65536 // pion/webrtc#758
|
||||
var canSendSize float64 = 65536 // pion/webrtc#758
|
||||
|
||||
r.maxMessageSize = r.calcMessageSize(remoteMaxMessageSize, canSendSize)
|
||||
}
|
||||
|
Reference in New Issue
Block a user