Bug 239760

Summary: PlatformDisplay::PlatformDisplay(GdkDisplay* display) does not set m_eglDisplay to EGL_NO_DISPLAY
Product: WebKit Reporter: Xi Ruoyao <xry111>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, mcatanzaro
Priority: P2    
Version: WebKit Local Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch
none
Patch none

Description Xi Ruoyao 2022-04-26 00:40:27 PDT
The value of PlatformDisplay::m_eglDisplay is left with a random value, then triggers

    EGLDisplay Initialization failed: EGL_BAD_DISPLAY

in PlatformDisplay::initializeEGLDisplay.
Comment 1 Xi Ruoyao 2022-04-26 05:05:42 PDT
Created attachment 458354 [details]
Patch
Comment 2 Michael Catanzaro 2022-04-26 08:30:58 PDT
Comment on attachment 458354 [details]
Patch

Oops.

This change looks safe and good. But could you please use the initializer list, as in the constructor above?
Comment 3 Xi Ruoyao 2022-04-26 08:40:40 PDT
Created attachment 458371 [details]
Patch
Comment 4 Xi Ruoyao 2022-04-26 08:44:20 PDT
(In reply to Michael Catanzaro from comment #2)
> Comment on attachment 458354 [details]
> Patch
> 
> Oops.
> 
> This change looks safe and good. But could you please use the initializer
> list, as in the constructor above?

Updated.  I initially didn't like a "," leading the line but now I've found out WebKit widely uses initializer lists with such a format.
Comment 5 EWS 2022-04-26 11:52:36 PDT
Committed r293441 (249996@main): <https://commits.webkit.org/249996@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458371 [details].