Title: [215443] trunk/Source/WebKit2
- Revision
- 215443
- Author
- commit-qu...@webkit.org
- Date
- 2017-04-17 17:14:21 -0700 (Mon, 17 Apr 2017)
Log Message
com.apple.WebKit.Networking.Development crashed in com.apple.WebKit: WebKit::NetworkRTCProvider::resolvedName
https://bugs.webkit.org/show_bug.cgi?id=170889
Patch by Youenn Fablet <you...@apple.com> on 2017-04-17
Reviewed by Alex Christensen.
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::Resolver::~Resolver): Unschedule the host resolution in addition to cancelling it.
Providing a test would need to stop the resolver between the time the resolver is created and gets
data in the network process. Or we would need to change Resolver to be instantiated/tested on its own.
* NetworkProcess/webrtc/NetworkRTCProvider.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (215442 => 215443)
--- trunk/Source/WebKit2/ChangeLog 2017-04-17 23:26:32 UTC (rev 215442)
+++ trunk/Source/WebKit2/ChangeLog 2017-04-18 00:14:21 UTC (rev 215443)
@@ -1,3 +1,16 @@
+2017-04-17 Youenn Fablet <you...@apple.com>
+
+ com.apple.WebKit.Networking.Development crashed in com.apple.WebKit: WebKit::NetworkRTCProvider::resolvedName
+ https://bugs.webkit.org/show_bug.cgi?id=170889
+
+ Reviewed by Alex Christensen.
+
+ * NetworkProcess/webrtc/NetworkRTCProvider.cpp:
+ (WebKit::NetworkRTCProvider::Resolver::~Resolver): Unschedule the host resolution in addition to cancelling it.
+ Providing a test would need to stop the resolver between the time the resolver is created and gets
+ data in the network process. Or we would need to change Resolver to be instantiated/tested on its own.
+ * NetworkProcess/webrtc/NetworkRTCProvider.h:
+
2017-04-17 Brady Eidson <beid...@apple.com>
Make WKHTTPCookieStore public.
Modified: trunk/Source/WebKit2/NetworkProcess/webrtc/NetworkRTCProvider.cpp (215442 => 215443)
--- trunk/Source/WebKit2/NetworkProcess/webrtc/NetworkRTCProvider.cpp 2017-04-17 23:26:32 UTC (rev 215442)
+++ trunk/Source/WebKit2/NetworkProcess/webrtc/NetworkRTCProvider.cpp 2017-04-18 00:14:21 UTC (rev 215443)
@@ -159,11 +159,17 @@
m_resolvers.add(identifier, WTFMove(resolver));
}
+NetworkRTCProvider::Resolver::~Resolver()
+{
+ CFHostUnscheduleFromRunLoop(host.get(), CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
+ CFHostSetClient(host.get(), nullptr, nullptr);
+}
+
void NetworkRTCProvider::stopResolver(uint64_t identifier)
{
auto resolver = m_resolvers.take(identifier);
if (resolver)
- CFHostCancelInfoResolution(resolver->host, CFHostInfoType::kCFHostAddresses);
+ CFHostCancelInfoResolution(resolver->host.get(), CFHostInfoType::kCFHostAddresses);
}
void NetworkRTCProvider::resolvedName(CFHostRef hostRef, CFHostInfoType typeInfo, const CFStreamError *error, void *info)
Modified: trunk/Source/WebKit2/NetworkProcess/webrtc/NetworkRTCProvider.h (215442 => 215443)
--- trunk/Source/WebKit2/NetworkProcess/webrtc/NetworkRTCProvider.h 2017-04-17 23:26:32 UTC (rev 215442)
+++ trunk/Source/WebKit2/NetworkProcess/webrtc/NetworkRTCProvider.h 2017-04-18 00:14:21 UTC (rev 215443)
@@ -91,11 +91,11 @@
: identifier(identifier)
, rtcProvider(rtcProvider)
, host(WTFMove(host)) { }
- ~Resolver() { CFRelease(host); }
+ ~Resolver();
uint64_t identifier;
NetworkRTCProvider& rtcProvider;
- CFHostRef host;
+ RetainPtr<CFHostRef> host;
};
HashMap<uint64_t, std::unique_ptr<Resolver>> m_resolvers;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes