Title: [201612] trunk/Source/WebKit2
- Revision
- 201612
- Author
- [email protected]
- Date
- 2016-06-02 12:57:41 -0700 (Thu, 02 Jun 2016)
Log Message
Crash under WebProcess::registerWithStateDumper()
https://bugs.webkit.org/show_bug.cgi?id=158304
<rdar://problem/25329276>
Reviewed by Anders Carlsson.
The issue is that the block in registerWithStateDumper() was executed in
a background thread and is iterating over m_pageMap HashMap. The crash
occurs when a page gets removed from the m_pageMap HashMap while the
block is iterating over this same HashMap in another thread.
The solution proposed is to execute the registerWithStateDumper()'s
block in the main thread.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::registerWithStateDumper):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (201611 => 201612)
--- trunk/Source/WebKit2/ChangeLog 2016-06-02 19:40:20 UTC (rev 201611)
+++ trunk/Source/WebKit2/ChangeLog 2016-06-02 19:57:41 UTC (rev 201612)
@@ -1,3 +1,22 @@
+2016-06-02 Chris Dumez <[email protected]>
+
+ Crash under WebProcess::registerWithStateDumper()
+ https://bugs.webkit.org/show_bug.cgi?id=158304
+ <rdar://problem/25329276>
+
+ Reviewed by Anders Carlsson.
+
+ The issue is that the block in registerWithStateDumper() was executed in
+ a background thread and is iterating over m_pageMap HashMap. The crash
+ occurs when a page gets removed from the m_pageMap HashMap while the
+ block is iterating over this same HashMap in another thread.
+
+ The solution proposed is to execute the registerWithStateDumper()'s
+ block in the main thread.
+
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::registerWithStateDumper):
+
2016-06-02 Brady Eidson <[email protected]>
Overhaul cross-thread use of ResourceRequest, ResourceResponse, and ResourceError.
Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (201611 => 201612)
--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2016-06-02 19:40:20 UTC (rev 201611)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2016-06-02 19:57:41 UTC (rev 201612)
@@ -217,8 +217,7 @@
#if USE(OS_STATE)
void WebProcess::registerWithStateDumper()
{
- dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
- os_state_add_handler(queue, ^(os_state_hints_t hints) {
+ os_state_add_handler(dispatch_get_main_queue(), ^(os_state_hints_t hints) {
@autoreleasepool {
os_state_data_t os_state = nil;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes