Bug 214875

Summary: WTF Crash occurring with Safari App Extension after WebPageProxy::runJavaScriptInMainFrameScriptWorld
Product: WebKit Reporter: Chad <cscharf>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: beidson, cdumez, cscharf, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Mac   
OS: macOS 10.15   
URL: https://github.com/bitwarden/browser/issues/1021
Attachments:
Description Flags
truncated crash log none

Description Chad 2020-07-28 08:05:21 PDT
Created attachment 405358 [details]
truncated crash log

Overview:
Runtime crashes occurring with a Safari App Extension intermittently (but frequently) for users. The crash log shows a consistent pattern and process where the Swift code from the app extension itself calls back to the UIProcess, and then the WebPageProxy runs runJavaScriptInMainFrameScriptWorld, followed by CallbackMap::put(). This in turn causes or at least what occurs is a WTFCrashWithInfo().

Steps to Reproduce:
1. Install and enable latest Bitwarden Safari App Extension
2. Log into extension
3. Navigate to a page
4. Open extension
5. Wait ~1 to 4 minutes, re-open extension
6. Note you are no longer logged in (vault is locked)
7. Note there is a crash log for Safari generated (silent crash)

see https://github.com/bitwarden/browser/issues/1021 for more detail.

Actual Results:
The application crashed.

Expected Results:
The application should not have crashed and the extension should have remained logged in/unlocked past the short threshold.

Build Date & Hardware:
Safari 13.0.1, macOS 10.14.6

Additional Builds and Platforms:
Safari Version 13.1.1, macOS 10.15.5

Crash Log: (truncated version attached)
Comment 1 Radar WebKit Bug Importer 2020-07-29 19:22:52 PDT
<rdar://problem/66305505>