Title: [258671] trunk/Source/WebKit
Revision
258671
Author
[email protected]
Date
2020-03-18 17:41:36 -0700 (Wed, 18 Mar 2020)

Log Message

Avoid calling 'notifyThisWebProcessPoolWasCreated' inside the constructor
https://bugs.webkit.org/show_bug.cgi?id=209254
<rdar://problem/60564526>

Reviewed by Alex Christensen and Chris Dumez.

Enqueue calls to 'notifyThisWebProcessPoolWasCreated' so they are not invoked until
after the process pool is finished with its constructor.

Behavior covered by existing tests.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (258670 => 258671)


--- trunk/Source/WebKit/ChangeLog	2020-03-19 00:04:50 UTC (rev 258670)
+++ trunk/Source/WebKit/ChangeLog	2020-03-19 00:41:36 UTC (rev 258671)
@@ -1,3 +1,19 @@
+2020-03-18  Brent Fulgham  <[email protected]>
+
+        Avoid calling 'notifyThisWebProcessPoolWasCreated' inside the constructor
+        https://bugs.webkit.org/show_bug.cgi?id=209254
+        <rdar://problem/60564526>
+
+        Reviewed by Alex Christensen and Chris Dumez.
+
+        Enqueue calls to 'notifyThisWebProcessPoolWasCreated' so they are not invoked until
+        after the process pool is finished with its constructor.
+
+        Behavior covered by existing tests.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::WebProcessPool):
+
 2020-03-18  Ross Kirsling  <[email protected]>
 
         Unreviewed WinCairo build fix following r258665.

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (258670 => 258671)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2020-03-19 00:04:50 UTC (rev 258670)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2020-03-19 00:41:36 UTC (rev 258671)
@@ -306,8 +306,14 @@
     processPoolCounter.increment();
 #endif
 
-    notifyThisWebProcessPoolWasCreated();
+    ASSERT(RunLoop::isMain());
+    RunLoop::main().dispatch([weakPtr = makeWeakPtr(*this)] {
+        if (!weakPtr)
+            return;
 
+        weakPtr->notifyThisWebProcessPoolWasCreated();
+    });
+
     updateBackForwardCacheCapacity();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to