Title: [230644] trunk/Source/WebCore
Revision
230644
Author
rn...@webkit.org
Date
2018-04-13 15:42:24 -0700 (Fri, 13 Apr 2018)

Log Message

WebKit crashes when libwebrtc.dylib is missing
https://bugs.webkit.org/show_bug.cgi?id=184607

Rubber-stamped by Jer Noble.

Don't call LibWebRTC related code when libwebrtc is not available.

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
(WebCore::Document::suspend):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (230643 => 230644)


--- trunk/Source/WebCore/ChangeLog	2018-04-13 21:23:54 UTC (rev 230643)
+++ trunk/Source/WebCore/ChangeLog	2018-04-13 22:42:24 UTC (rev 230644)
@@ -1,3 +1,16 @@
+2018-04-13  Ryosuke Niwa  <rn...@webkit.org>
+
+        WebKit crashes when libwebrtc.dylib is missing
+        https://bugs.webkit.org/show_bug.cgi?id=184607
+
+        Rubber-stamped by Jer Noble.
+
+        Don't call LibWebRTC related code when libwebrtc is not available.
+
+        * dom/Document.cpp:
+        (WebCore::Document::prepareForDestruction):
+        (WebCore::Document::suspend):
+
 2018-04-13  Chris Dumez  <cdu...@apple.com>
 
         Split WindowProxy handling out of ScriptController and into a new class owned by AbstractFrame

Modified: trunk/Source/WebCore/dom/Document.cpp (230643 => 230644)


--- trunk/Source/WebCore/dom/Document.cpp	2018-04-13 21:23:54 UTC (rev 230643)
+++ trunk/Source/WebCore/dom/Document.cpp	2018-04-13 22:42:24 UTC (rev 230644)
@@ -2358,8 +2358,11 @@
         m_frame->animation().detachFromDocument(this);
 
 #if USE(LIBWEBRTC)
-    if (auto* page = this->page())
-        page->libWebRTCProvider().unregisterMDNSNames(identifier().toUInt64());
+    // FIXME: This should be moved to Modules/mediastream.
+    if (LibWebRTCProvider::webRTCAvailable()) {
+        if (auto* page = this->page())
+            page->libWebRTCProvider().unregisterMDNSNames(identifier().toUInt64());
+    }
 #endif
 
 #if ENABLE(SERVICE_WORKER)
@@ -4891,8 +4894,11 @@
     }
 
 #if USE(LIBWEBRTC)
-    if (auto* page = this->page())
-        page->libWebRTCProvider().unregisterMDNSNames(identifier().toUInt64());
+    // FIXME: This should be moved to Modules/mediastream.
+    if (LibWebRTCProvider::webRTCAvailable()) {
+        if (auto* page = this->page())
+            page->libWebRTCProvider().unregisterMDNSNames(identifier().toUInt64());
+    }
 #endif
 
 #if ENABLE(SERVICE_WORKER)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to