Title: [231221] trunk/Source/WebCore
- Revision
- 231221
- Author
- [email protected]
- Date
- 2018-05-01 20:33:55 -0700 (Tue, 01 May 2018)
Log Message
Add release assertions in CFNetwork's SocketStreamHandleImpl to help debug a threading issue
https://bugs.webkit.org/show_bug.cgi?id=185181
Reviewed by Geoffrey Garen.
Add release assertions in CFNetwork's SocketStreamHandleImpl to help debug a threading issue
on iOS WebKitLegacy (Bug 185073). It appears readStreamCallback() can get called on the UIThread,
which should not be possible if scheduleStreams() was called on the WebThread, as it is supposed
to. The new release assertion in scheduleStreams() should tell us if somebody is calling it from
the UIthread instead of the WebThread on iOS WebKitLegacy.
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::SocketStreamHandleImpl::scheduleStreams):
(WebCore::SocketStreamHandleImpl::readStreamCallback):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231220 => 231221)
--- trunk/Source/WebCore/ChangeLog 2018-05-02 00:01:49 UTC (rev 231220)
+++ trunk/Source/WebCore/ChangeLog 2018-05-02 03:33:55 UTC (rev 231221)
@@ -1,3 +1,20 @@
+2018-05-01 Chris Dumez <[email protected]>
+
+ Add release assertions in CFNetwork's SocketStreamHandleImpl to help debug a threading issue
+ https://bugs.webkit.org/show_bug.cgi?id=185181
+
+ Reviewed by Geoffrey Garen.
+
+ Add release assertions in CFNetwork's SocketStreamHandleImpl to help debug a threading issue
+ on iOS WebKitLegacy (Bug 185073). It appears readStreamCallback() can get called on the UIThread,
+ which should not be possible if scheduleStreams() was called on the WebThread, as it is supposed
+ to. The new release assertion in scheduleStreams() should tell us if somebody is calling it from
+ the UIthread instead of the WebThread on iOS WebKitLegacy.
+
+ * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
+ (WebCore::SocketStreamHandleImpl::scheduleStreams):
+ (WebCore::SocketStreamHandleImpl::readStreamCallback):
+
2018-05-01 Wenson Hsieh <[email protected]>
Unreviewed, remove an unused variable in RuntimeEnabledFeatures.h
Modified: trunk/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp (231220 => 231221)
--- trunk/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp 2018-05-02 00:01:49 UTC (rev 231220)
+++ trunk/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp 2018-05-02 03:33:55 UTC (rev 231221)
@@ -123,6 +123,7 @@
CFReadStreamScheduleWithRunLoop(m_readStream.get(), loaderRunLoop(), kCFRunLoopDefaultMode);
CFWriteStreamScheduleWithRunLoop(m_writeStream.get(), loaderRunLoop(), kCFRunLoopDefaultMode);
#else
+ RELEASE_ASSERT(isMainThread());
CFReadStreamScheduleWithRunLoop(m_readStream.get(), CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
CFWriteStreamScheduleWithRunLoop(m_writeStream.get(), CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
#endif
@@ -469,7 +470,7 @@
handle->readStreamCallback(type);
});
#else
- ASSERT(isMainThread());
+ RELEASE_ASSERT(isMainThread());
handle->readStreamCallback(type);
#endif
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes