Title: [215049] trunk/Source/ThirdParty/libwebrtc
- Revision
- 215049
- Author
- commit-qu...@webkit.org
- Date
- 2017-04-06 11:53:17 -0700 (Thu, 06 Apr 2017)
Log Message
WebRTC aborts when trying to sleep on a wrong thread
https://bugs.webkit.org/show_bug.cgi?id=170492
<rdar://problem/31446377>
Patch by Youenn Fablet <you...@apple.com> on 2017-04-06
Reviewed by Eric Carlson.
Libwebrtc network thread is set up so that it does not accept blocking calls to other threads.
as per ChannelManager::Init() in channelmanager.cc.
But rtc::Thread::SleepMs expects to block it.
Marking thread as blockable before calling SleepMs and resetting the value if needed afterwards.
* Source/webrtc/media/sctp/sctptransport.cc:
Modified Paths
Diff
Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (215048 => 215049)
--- trunk/Source/ThirdParty/libwebrtc/ChangeLog 2017-04-06 18:52:46 UTC (rev 215048)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog 2017-04-06 18:53:17 UTC (rev 215049)
@@ -1,3 +1,17 @@
+2017-04-06 Youenn Fablet <you...@apple.com>
+
+ WebRTC aborts when trying to sleep on a wrong thread
+ https://bugs.webkit.org/show_bug.cgi?id=170492
+ <rdar://problem/31446377>
+
+ Reviewed by Eric Carlson.
+
+ Libwebrtc network thread is set up so that it does not accept blocking calls to other threads.
+ as per ChannelManager::Init() in channelmanager.cc.
+ But rtc::Thread::SleepMs expects to block it.
+ Marking thread as blockable before calling SleepMs and resetting the value if needed afterwards.
+ * Source/webrtc/media/sctp/sctptransport.cc:
+
2017-03-27 Alejandro G. Castro <a...@igalia.com>
Fixes for libwebrtc logging after r214288
Modified: trunk/Source/ThirdParty/libwebrtc/Source/webrtc/media/sctp/sctptransport.cc (215048 => 215049)
--- trunk/Source/ThirdParty/libwebrtc/Source/webrtc/media/sctp/sctptransport.cc 2017-04-06 18:52:46 UTC (rev 215048)
+++ trunk/Source/ThirdParty/libwebrtc/Source/webrtc/media/sctp/sctptransport.cc 2017-04-06 18:53:17 UTC (rev 215049)
@@ -261,7 +261,12 @@
return;
}
+ // WEBKIT Change: disabling the blocking assertion as this is what SleepMs is about.
+ // FIXME: ensure usrsctp_finish is probably called without making blocking calls.
+ bool allowBlockingCalls = rtc::Thread::Current()->SetAllowBlockingCalls(true);
rtc::Thread::SleepMs(10);
+ if (!allowBlockingCalls)
+ rtc::Thread::Current()->SetAllowBlockingCalls(false);
}
LOG(LS_ERROR) << "Failed to shutdown usrsctp.";
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes