Bug 177306 - REGRESSION(r221465) WKWebViews without WebGL delegate callbacks crash when WebGL contexts are created
Summary: REGRESSION(r221465) WKWebViews without WebGL delegate callbacks crash when We...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-09-21 09:36 PDT by Alex Christensen
Modified: 2017-09-27 12:19 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.40 KB, patch)
2017-09-21 09:37 PDT, Alex Christensen
cdumez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2017-09-21 09:36:11 PDT
REGRESSION(r221465) WKWebViews without WebGL delegate callbacks crash when WebGL contexts are created
Comment 1 Alex Christensen 2017-09-21 09:37:11 PDT
Created attachment 321438 [details]
Patch
Comment 2 Chris Dumez 2017-09-21 09:38:40 PDT
Comment on attachment 321438 [details]
Patch

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

r=me

> Source/WebKit/UIProcess/Cocoa/NavigationState.mm:311
> +        return completionHandler(WebGLAllowCreation);

I seem to remember Darin not liking this pattern and preferring doing this on 2 lines.

> Source/WebKit/UIProcess/Cocoa/NavigationState.mm:326
> +        return completionHandler(WebGLAllowCreation);

ditto.
Comment 3 Alex Christensen 2017-09-21 09:41:30 PDT
http://trac.webkit.org/r222322
Comment 4 Darin Adler 2017-09-24 17:09:20 PDT
Comment on attachment 321438 [details]
Patch

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

>> Source/WebKit/UIProcess/Cocoa/NavigationState.mm:311
>> +        return completionHandler(WebGLAllowCreation);
> 
> I seem to remember Darin not liking this pattern and preferring doing this on 2 lines.

I think that for the WebKit project style guide we have said we should do it on two lines. Maybe should write that out explicitly.

But, to be clear, I personally am OK with this pattern, and might adopt it as the style for my own programming outside the WebKit project.

As I understand it, this feature was originally added to C++ make template programming easier, rather than because the people proposing it thought it was elegant for non-template cases like this one.
Comment 5 Radar WebKit Bug Importer 2017-09-27 12:19:35 PDT
<rdar://problem/34693051>