Title: [209660] trunk/Source/WebKit2
- Revision
- 209660
- Author
- [email protected]
- Date
- 2016-12-10 02:00:33 -0800 (Sat, 10 Dec 2016)
Log Message
CrashTracer: com.apple.WebKit.Networking at WTF::ThreadSafeRefCounted<WebKit::NetworkCache::IOChannel>::deref
https://bugs.webkit.org/show_bug.cgi?id=165659
<rdar://problem/27077977>
Reviewed by Darin Adler.
* NetworkProcess/cache/NetworkCacheIOChannel.h:
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::~IOChannel):
Add non-inlined destructor and release assert against double deletion to narrow down this crash.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (209659 => 209660)
--- trunk/Source/WebKit2/ChangeLog 2016-12-10 09:58:06 UTC (rev 209659)
+++ trunk/Source/WebKit2/ChangeLog 2016-12-10 10:00:33 UTC (rev 209660)
@@ -1,3 +1,17 @@
+2016-12-10 Antti Koivisto <[email protected]>
+
+ CrashTracer: com.apple.WebKit.Networking at WTF::ThreadSafeRefCounted<WebKit::NetworkCache::IOChannel>::deref
+ https://bugs.webkit.org/show_bug.cgi?id=165659
+ <rdar://problem/27077977>
+
+ Reviewed by Darin Adler.
+
+ * NetworkProcess/cache/NetworkCacheIOChannel.h:
+ * NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
+ (WebKit::NetworkCache::IOChannel::~IOChannel):
+
+ Add non-inlined destructor and release assert against double deletion to narrow down this crash.
+
2016-12-09 Brent Fulgham <[email protected]>
WebCore::Timer is not compatible with UIProcess
Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannel.h (209659 => 209660)
--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannel.h 2016-12-10 09:58:06 UTC (rev 209659)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannel.h 2016-12-10 10:00:33 UTC (rev 209660)
@@ -56,6 +56,8 @@
int fileDescriptor() const { return m_fileDescriptor; }
+ ~IOChannel();
+
private:
IOChannel(const String& filePath, IOChannel::Type);
@@ -67,6 +69,7 @@
Type m_type;
int m_fileDescriptor { 0 };
+ std::atomic<bool> m_wasDeleted { false }; // Try to narrow down a crash, https://bugs.webkit.org/show_bug.cgi?id=165659
#if PLATFORM(COCOA)
DispatchPtr<dispatch_io_t> m_dispatchIO;
#endif
Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm (209659 => 209660)
--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm 2016-12-10 09:58:06 UTC (rev 209659)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm 2016-12-10 10:00:33 UTC (rev 209660)
@@ -82,6 +82,11 @@
}
}
+IOChannel::~IOChannel()
+{
+ RELEASE_ASSERT(!m_wasDeleted.exchange(true));
+}
+
Ref<IOChannel> IOChannel::open(const String& filePath, IOChannel::Type type)
{
return adoptRef(*new IOChannel(filePath, type));
Modified: trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp (209659 => 209660)
--- trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp 2016-12-10 09:58:06 UTC (rev 209659)
+++ trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp 2016-12-10 10:00:33 UTC (rev 209660)
@@ -64,6 +64,11 @@
}
}
+IOChannel::~IOChannel()
+{
+ RELEASE_ASSERT(!m_wasDeleted.exchange(true));
+}
+
Ref<IOChannel> IOChannel::open(const String& filePath, IOChannel::Type type)
{
return adoptRef(*new IOChannel(filePath, type));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes