Bug 210509

Summary: Remove generic parameter serialization fallback
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit2Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, ddkilzer, ggaren, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 189709, 201810    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Brent Fulgham 2020-04-14 12:04:52 PDT
Improved injected bundle serialization was implemented in Bug 201810. It is time to remove the compatibility fallback so that we can ensure we are always using the modern implementation.
Comment 1 Brent Fulgham 2020-04-14 12:07:49 PDT
Created attachment 396447 [details]
Patch
Comment 2 Brent Fulgham 2020-04-14 12:09:30 PDT
<rdar://problem/55522650>
Comment 3 Brent Fulgham 2020-04-14 14:53:40 PDT
The api-ios test failure looks relevant:

u'TestWebKitAPI.WebKit.WKWebProcessPlugInWithoutRegisteredCustomClass
Comment 4 Brent Fulgham 2020-04-14 15:53:18 PDT
(In reply to Brent Fulgham from comment #3)
> The api-ios test failure looks relevant:
> 
> u'TestWebKitAPI.WebKit.WKWebProcessPlugInWithoutRegisteredCustomClass

Oh! This is behaving correctly, now that we are denying serialization of unregistered classes. The related WKWebProcessPlugInWithRegisteredCustomClass works as expected.

I'll update the test expectation.
Comment 5 Brent Fulgham 2020-04-14 16:06:23 PDT
Created attachment 396471 [details]
Patch
Comment 6 Geoffrey Garen 2020-04-14 20:50:32 PDT
Comment on attachment 396471 [details]
Patch

r=me

How did we determine that clients have stopped using the legacy code path?
Comment 7 EWS 2020-04-15 09:35:19 PDT
Committed r260134: <https://trac.webkit.org/changeset/260134>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 396471 [details].
Comment 8 Brent Fulgham 2020-04-15 09:36:20 PDT
(In reply to Geoffrey Garen from comment #6)
> Comment on attachment 396471 [details]
> Patch
> 
> r=me
> 
> How did we determine that clients have stopped using the legacy code path?

In 2017 I reached out to the relevant clients (since injected bundles are SPI) and worked with them to stop using the old code path. Foundation now generates simulated crashes any time NSKeyedUnarchiver uses 'NSObject class' as the root for unarchiving so it was possible to see what wasn't updated yet.