Bug 218172

Summary: [EME][GStreamer][Thunder] Make response parsing message more robust
Product: WebKit Reporter: Xabier Rodríguez Calvar <calvaris>
Component: New BugsAssignee: Xabier Rodríguez Calvar <calvaris>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, ews-watchlist, gustavo, menard, pnormand, vjaquez, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 218171    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Xabier Rodríguez Calvar 2020-10-26 03:53:03 PDT
[EME][GStreamer][Thunder] Make response parsing message more robust
Comment 1 Xabier Rodríguez Calvar 2020-10-26 04:01:02 PDT
Created attachment 412301 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2020-10-26 04:01:57 PDT
This patch will properly build when bug 218171 lands.
Comment 3 Philippe Normand 2020-10-26 04:49:36 PDT
Comment on attachment 412301 [details]
Patch

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

> Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp:342
> +    explicit operator bool() const { return m_isValid; }
> +    bool operator!() const { return !m_isValid; }

What is the difference between this and hasType()? Can hasType() be removed then? I'm not sure casting an Optional<> to a bool works as expected anyway.
Comment 4 Xabier Rodríguez Calvar 2020-10-26 06:18:03 PDT
(In reply to Philippe Normand from comment #3)
> Comment on attachment 412301 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=412301&action=review
> 
> > Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp:342
> > +    explicit operator bool() const { return m_isValid; }
> > +    bool operator!() const { return !m_isValid; }
> 
> What is the difference between this and hasType()? Can hasType() be removed
> then? I'm not sure casting an Optional<> to a bool works as expected anyway.

There is no difference. It is the same thing but it works similarly in Optional so I wanted to keep it parallel.
Comment 5 Xabier Rodríguez Calvar 2020-10-26 09:21:17 PDT
Created attachment 412320 [details]
Patch
Comment 6 EWS 2020-10-27 04:24:53 PDT
Committed r269030: <https://trac.webkit.org/changeset/269030>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 412320 [details].
Comment 7 Radar WebKit Bug Importer 2020-10-27 04:25:25 PDT
<rdar://problem/70717329>