Title: [269690] trunk/Source/WebKit
- Revision
- 269690
- Author
- cdu...@apple.com
- Date
- 2020-11-11 10:43:48 -0800 (Wed, 11 Nov 2020)
Log Message
REGRESSION (r269657): ASSERTION FAILED: Completion handler should always be called under WebKit::GPUProcessProxy::~GPUProcessProxy
https://bugs.webkit.org/show_bug.cgi?id=218807
<rdar://problem/71285627>
Reviewed by Geoffrey Garen.
GPUProcessProxy::sendPrepareToSuspend() was failing to send the IPC to the GPUProcess and was also
failing to call its completion handler, thus asserting in Debug. Update GPUProcessProxy to actually
send the PrepareToSuspend / ProcessDidResume IPCs to the GPUProcess. The GPUProcess actually already
had an implementation to deal with those IPCs.
No new tests, covered by existing tests that are crashing in debug.
* GPUProcess/GPUProcess.messages.in:
* UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::sendPrepareToSuspend):
(WebKit::GPUProcessProxy::sendProcessDidResume):
* UIProcess/GPU/GPUProcessProxy.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (269689 => 269690)
--- trunk/Source/WebKit/ChangeLog 2020-11-11 18:27:52 UTC (rev 269689)
+++ trunk/Source/WebKit/ChangeLog 2020-11-11 18:43:48 UTC (rev 269690)
@@ -1,3 +1,24 @@
+2020-11-11 Chris Dumez <cdu...@apple.com>
+
+ REGRESSION (r269657): ASSERTION FAILED: Completion handler should always be called under WebKit::GPUProcessProxy::~GPUProcessProxy
+ https://bugs.webkit.org/show_bug.cgi?id=218807
+ <rdar://problem/71285627>
+
+ Reviewed by Geoffrey Garen.
+
+ GPUProcessProxy::sendPrepareToSuspend() was failing to send the IPC to the GPUProcess and was also
+ failing to call its completion handler, thus asserting in Debug. Update GPUProcessProxy to actually
+ send the PrepareToSuspend / ProcessDidResume IPCs to the GPUProcess. The GPUProcess actually already
+ had an implementation to deal with those IPCs.
+
+ No new tests, covered by existing tests that are crashing in debug.
+
+ * GPUProcess/GPUProcess.messages.in:
+ * UIProcess/GPU/GPUProcessProxy.cpp:
+ (WebKit::GPUProcessProxy::sendPrepareToSuspend):
+ (WebKit::GPUProcessProxy::sendProcessDidResume):
+ * UIProcess/GPU/GPUProcessProxy.h:
+
2020-11-11 Wenson Hsieh <wenson_hs...@apple.com>
[Concurrent display lists] Add an initial implementation of concurrent display list rendering
Modified: trunk/Source/WebKit/GPUProcess/GPUProcess.messages.in (269689 => 269690)
--- trunk/Source/WebKit/GPUProcess/GPUProcess.messages.in 2020-11-11 18:27:52 UTC (rev 269689)
+++ trunk/Source/WebKit/GPUProcess/GPUProcess.messages.in 2020-11-11 18:43:48 UTC (rev 269690)
@@ -30,6 +30,9 @@
ProcessDidTransitionToForeground()
ProcessDidTransitionToBackground()
+ PrepareToSuspend(bool isSuspensionImminent) -> () Async
+ ProcessDidResume()
+
AddSession(PAL::SessionID sessionID, struct WebKit::GPUProcessSessionParameters parameters)
RemoveSession(PAL::SessionID sessionID)
Modified: trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp (269689 => 269690)
--- trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp 2020-11-11 18:27:52 UTC (rev 269689)
+++ trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp 2020-11-11 18:43:48 UTC (rev 269690)
@@ -324,6 +324,17 @@
send(Messages::GPUProcess::RemoveSession { sessionID }, 0);
}
+void GPUProcessProxy::sendPrepareToSuspend(IsSuspensionImminent isSuspensionImminent, CompletionHandler<void()>&& completionHandler)
+{
+ sendWithAsyncReply(Messages::GPUProcess::PrepareToSuspend(isSuspensionImminent == IsSuspensionImminent::Yes), WTFMove(completionHandler), 0, { }, ShouldStartProcessThrottlerActivity::No);
+}
+
+void GPUProcessProxy::sendProcessDidResume()
+{
+ if (canSendMessage())
+ send(Messages::GPUProcess::ProcessDidResume(), 0);
+}
+
#if HAVE(VISIBILITY_PROPAGATION_VIEW)
void GPUProcessProxy::didCreateContextForVisibilityPropagation(LayerHostingContextID contextID)
{
Modified: trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.h (269689 => 269690)
--- trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.h 2020-11-11 18:27:52 UTC (rev 269689)
+++ trunk/Source/WebKit/UIProcess/GPU/GPUProcessProxy.h 2020-11-11 18:43:48 UTC (rev 269690)
@@ -61,10 +61,6 @@
ProcessThrottler& throttler() final { return m_throttler; }
void updateProcessAssertion();
- // ProcessThrottlerClient
- void sendProcessDidResume() final { }
- ASCIILiteral clientName() const final { return "GPUProcess"_s; }
-
#if ENABLE(MEDIA_STREAM)
void setUseMockCaptureDevices(bool);
void setOrientationForMediaCapture(uint64_t orientation);
@@ -92,7 +88,9 @@
void gpuProcessCrashed();
// ProcessThrottlerClient
- void sendPrepareToSuspend(IsSuspensionImminent, CompletionHandler<void()>&&) final { }
+ ASCIILiteral clientName() const final { return "GPUProcess"_s; }
+ void sendPrepareToSuspend(IsSuspensionImminent, CompletionHandler<void()>&&) final;
+ void sendProcessDidResume() final;
// ProcessLauncher::Client
void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes