Bug 173126

Summary: Crash in -[WKWebView _initializeWithConfiguration:]
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: MediaAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, darin, dbates, eric.carlson, jonlee, koivisto, mkwst
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Follow-up Patch none

Description Jer Noble 2017-06-08 20:33:40 PDT
Crash in -[WKWebView _initializeWithConfiguration:]
Comment 1 Jer Noble 2017-06-08 20:35:15 PDT
Created attachment 312374 [details]
Patch
Comment 2 WebKit Commit Bot 2017-06-09 01:05:35 PDT
Comment on attachment 312374 [details]
Patch

Clearing flags on attachment: 312374

Committed r217967: <http://trac.webkit.org/changeset/217967>
Comment 3 WebKit Commit Bot 2017-06-09 01:05:37 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Matthew Hanson 2017-06-09 07:05:15 PDT
<rdar://problem/32664993>
Comment 5 Darin Adler 2017-06-09 12:02:20 PDT
Comment on attachment 312374 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=312374&action=review

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:140
>      NSString *_overrideContentSecurityPolicy;

Looks like this has exactly the same problem as _mediaContentTypesRequiringHardwareSupport. Would you fix that, or would you like me to do it?

> Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:141
> +    RetainPtr<NSString> _mediaContentTypesRequiringHardwareSupport;

The setter should copy the string, not just retain it.
Comment 6 Jer Noble 2017-06-09 12:29:15 PDT
(In reply to Darin Adler from comment #5)
> Comment on attachment 312374 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=312374&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:140
> >      NSString *_overrideContentSecurityPolicy;
> 
> Looks like this has exactly the same problem as
> _mediaContentTypesRequiringHardwareSupport. Would you fix that, or would you
> like me to do it?

Sure I'll take care of it when I do the followup below:

> > Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:141
> > +    RetainPtr<NSString> _mediaContentTypesRequiringHardwareSupport;
> 
> The setter should copy the string, not just retain it.

Good catch!
Comment 7 Jer Noble 2017-06-09 13:34:46 PDT
Reopening to attach new patch.
Comment 8 Jer Noble 2017-06-09 13:34:46 PDT
Created attachment 312484 [details]
Follow-up Patch
Comment 9 WebKit Commit Bot 2017-06-09 15:09:04 PDT
Comment on attachment 312484 [details]
Follow-up Patch

Clearing flags on attachment: 312484

Committed r218021: <http://trac.webkit.org/changeset/218021>
Comment 10 WebKit Commit Bot 2017-06-09 15:09:06 PDT
All reviewed patches have been landed.  Closing bug.