Skip to content

Commit d4fb159

Browse files
browser(webkit): fix webcontent startup crash on macos 11 (#4370)
reverts #4357 and provides the real fix. Apple accidentally landed some code that will crash the web process if it is not signed by them. I'm sure they will figure it out once they get test bots for macos 11. But until then, we can just revert. https://bugs.webkit.org/show_bug.cgi?id=218342
1 parent fff36a7 commit d4fb159

File tree

2 files changed

+34
-19
lines changed

2 files changed

+34
-19
lines changed

browser_patches/webkit/BUILD_NUMBER

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
1380
2-
Changed: yurys@chromium.org Fri Nov 6 01:49:33 GMTST 2020
1+
1381
2+
Changed: einbinder@chromium.org Fri 06 Nov 2020 10:35:03 AM PST

browser_patches/webkit/patches/bootstrap.diff

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7650,23 +7650,6 @@ index e40a6e172bfd2b75076fd4053da643ebab9eb81f..2516655bbc9e5bc863537a554c5faac0
76507650

76517651
-#endif // ENABLE(TOUCH_EVENTS)
76527652
+#endif // ENABLE(TOUCH_EVENTS) && PLATFORM(IOS_FAMILY)
7653-
diff --git a/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm b/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm
7654-
index 22c0b189aafc69405083c36004b4d4de4f3bbfd1..1d883c903018a2bb33db8f1458adda8b04a089bc 100644
7655-
--- a/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm
7656-
+++ b/Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm
7657-
@@ -63,7 +63,11 @@
7658-
#endif
7659-
7660-
#if PLATFORM(MAC)
7661-
-#define USE_CACHE_COMPILED_SANDBOX 1
7662-
+// Playwright begin
7663-
+// Disable compiled sandbox since it doesn't work on BigSUr.
7664-
+// #define USE_CACHE_COMPILED_SANDBOX 1
7665-
+#define USE_CACHE_COMPILED_SANDBOX 0
7666-
+// Playwright end
7667-
#else
7668-
#define USE_CACHE_COMPILED_SANDBOX 0
7669-
#endif
76707653
diff --git a/Source/WebKit/Shared/win/WebEventFactory.cpp b/Source/WebKit/Shared/win/WebEventFactory.cpp
76717654
index 88d53d236cd6d62735f03678a04ca9c198dddacb..b8f8efc57ab00dc5725660c5a8ad56a3e6384de5 100644
76727655
--- a/Source/WebKit/Shared/win/WebEventFactory.cpp
@@ -16559,6 +16542,38 @@ index dfa57c655ada7cf97189b757c59aa901950aa9e8..56832e0190d11e0894a4c537b3ff3806
1655916542
}
1656016543

1656116544
void WebProcess::initializeConnection(IPC::Connection* connection)
16545+
diff --git a/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in b/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
16546+
index 3c3fbaab081e5775e9c6e40e571e56521c8de843..25ca899fc5fb6be42aceec515fcabbec7753a586 100644
16547+
--- a/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
16548+
+++ b/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in
16549+
@@ -1218,14 +1218,19 @@
16550+
#include <WebKitAdditions/WebContentSandboxAdditionsMac.sb>
16551+
#endif
16552+
16553+
-(when (defined? 'mach-bootstrap)
16554+
- (allow mach-bootstrap
16555+
- (apply-message-filter
16556+
- (allow xpc-message-send (with telemetry))
16557+
- (allow xpc-message-send (with telemetry) (message-number 206))
16558+
- )
16559+
- )
16560+
-)
16561+
+;;; Playwright: This requires an entitlement
16562+
+;;; that only exists in builds signed by Apple.
16563+
+;;; It looks like we can disable it for now
16564+
+;;; without side effects
16565+
+;;;
16566+
+;;; (when (defined? 'mach-bootstrap)
16567+
+;;; (allow mach-bootstrap
16568+
+;;; (apply-message-filter
16569+
+;;; (allow xpc-message-send (with telemetry))
16570+
+;;; (allow xpc-message-send (with telemetry) (message-number 206))
16571+
+;;; )
16572+
+;;; )
16573+
+;;; )
16574+
16575+
(when (defined? 'mach-kernel-endpoint)
16576+
(allow mach-kernel-endpoint
1656216577
diff --git a/Source/WebKit/WebProcess/win/WebProcessMainWin.cpp b/Source/WebKit/WebProcess/win/WebProcessMainWin.cpp
1656316578
index 89bc159df35910abe133c68d71057cdfe1995cbb..aba8e9110a3ec4c59e9888b148e1e908d477cbe4 100644
1656416579
--- a/Source/WebKit/WebProcess/win/WebProcessMainWin.cpp

0 commit comments

Comments
 (0)