[webkit-changes] [WebKit/WebKit] 0532f1: RELEASE_ASSERT() under GPUProcessConnection::creat...

Chris Dumez noreply at github.com
Fri Nov 10 14:21:47 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0532f1c87a6343cadfb1072ed1ce6cc71ccb3e26
      https://github.com/WebKit/WebKit/commit/0532f1c87a6343cadfb1072ed1ce6cc71ccb3e26
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-11-10 (Fri, 10 Nov 2023)

  Changed paths:
    M Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp
    M Source/WebKit/WebProcess/WebProcess.cpp
    M Source/WebKit/WebProcess/WebProcess.h

  Log Message:
  -----------
  RELEASE_ASSERT() under GPUProcessConnection::create(IPC::Connection&)
https://bugs.webkit.org/show_bug.cgi?id=264612
rdar://117840925

Reviewed by Brent Fulgham.

When a WebProcess requests a connection to the GPUProcess, the UIProcess
needs to pass preferences for this WebProcess. Preferences are associated
with WebPages and thus we cannot initiate a connection to the GPUProcess
before a WebPage has been created.

I had tried to add an assertion to this effect in
GPUProcessConnection::create(). However, my assertion was a little
stricter than needed and could get hit in the wild. It is sufficient for
a process to have ever had a WebPage (The WebProcessProxy stores the
preferences locally), we don't need to have a living WebPage at the
moment when the connection gets requested.

* Source/WebKit/WebProcess/GPU/GPUProcessConnection.cpp:
(WebKit::GPUProcessConnection::create):
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::createWebPage):
* Source/WebKit/WebProcess/WebProcess.h:
(WebKit::WebProcess::hasEverHadAnyWebPages const):
(WebKit::WebProcess::hasWebPages const): Deleted.

Canonical link: https://commits.webkit.org/270569@main




More information about the webkit-changes mailing list