Bug 173126 - Crash in -[WKWebView _initializeWithConfiguration:]
Summary: Crash in -[WKWebView _initializeWithConfiguration:]
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-08 20:33 PDT by Jer Noble
Modified: 2017-06-09 15:09 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.00 KB, patch)
2017-06-08 20:35 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Follow-up Patch (3.47 KB, patch)
2017-06-09 13:34 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.