Title: [217932] trunk/Source/WebCore
- Revision
- 217932
- Author
- [email protected]
- Date
- 2017-06-08 10:13:16 -0700 (Thu, 08 Jun 2017)
Log Message
ASSERTION FAILED: !m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction on webrtc/ephemeral-certificates-and-cnames.html
https://bugs.webkit.org/show_bug.cgi?id=173039
<rdar://problem/32600412>
Reviewed by Youenn Fablet.
RTCPeerConnection was an ActiveDOMObject but failed to override ActiveDOMObject::hasPendingActivity()
to make sure its JS wrapper stays alive as long as it needs to. In this patch, we override
ActiveDOMObject::hasPendingActivity() and have it return true if !m_isStopped. I believe this is
the right thing to do to keep the wrapper alive as long as the connection is not closed.
RTCPeerConnection::close() closes the connection and then posts a task to call
RTCPeerConnection::doStop(), setting m_isStopped to true.
No new tests, already covered by webrtc/ephemeral-certificates-and-cnames.html which
was a flaky crash.
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::canSuspendForDocumentSuspension):
(WebCore::RTCPeerConnection::hasPendingActivity):
* Modules/mediastream/RTCPeerConnection.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (217931 => 217932)
--- trunk/Source/WebCore/ChangeLog 2017-06-08 17:01:50 UTC (rev 217931)
+++ trunk/Source/WebCore/ChangeLog 2017-06-08 17:13:16 UTC (rev 217932)
@@ -1,3 +1,26 @@
+2017-06-08 Chris Dumez <[email protected]>
+
+ ASSERTION FAILED: !m_isolatedWorld->isNormal() || m_wrapper || !m_jsFunction on webrtc/ephemeral-certificates-and-cnames.html
+ https://bugs.webkit.org/show_bug.cgi?id=173039
+ <rdar://problem/32600412>
+
+ Reviewed by Youenn Fablet.
+
+ RTCPeerConnection was an ActiveDOMObject but failed to override ActiveDOMObject::hasPendingActivity()
+ to make sure its JS wrapper stays alive as long as it needs to. In this patch, we override
+ ActiveDOMObject::hasPendingActivity() and have it return true if !m_isStopped. I believe this is
+ the right thing to do to keep the wrapper alive as long as the connection is not closed.
+ RTCPeerConnection::close() closes the connection and then posts a task to call
+ RTCPeerConnection::doStop(), setting m_isStopped to true.
+
+ No new tests, already covered by webrtc/ephemeral-certificates-and-cnames.html which
+ was a flaky crash.
+
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension):
+ (WebCore::RTCPeerConnection::hasPendingActivity):
+ * Modules/mediastream/RTCPeerConnection.h:
+
2017-06-08 Miguel Gomez <[email protected]>
[GTK][WPE][GSTREAMER_GL] Change the colorspace used by the video frames provided by GStreamer
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (217931 => 217932)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2017-06-08 17:01:50 UTC (rev 217931)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2017-06-08 17:13:16 UTC (rev 217932)
@@ -430,10 +430,14 @@
bool RTCPeerConnection::canSuspendForDocumentSuspension() const
{
- // FIXME: We should try and do better here.
- return false;
+ return !hasPendingActivity();
}
+bool RTCPeerConnection::hasPendingActivity() const
+{
+ return !m_isStopped;
+}
+
void RTCPeerConnection::addTransceiver(Ref<RTCRtpTransceiver>&& transceiver)
{
m_transceiverSet->append(WTFMove(transceiver));
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (217931 => 217932)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2017-06-08 17:01:50 UTC (rev 217931)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2017-06-08 17:13:16 UTC (rev 217932)
@@ -147,6 +147,9 @@
void clearController() { m_controller = nullptr; }
+ // ActiveDOMObject.
+ bool hasPendingActivity() const final;
+
private:
RTCPeerConnection(ScriptExecutionContext&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes