Bug 218172 - [EME][GStreamer][Thunder] Make response parsing message more robust
Summary: [EME][GStreamer][Thunder] Make response parsing message more robust
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: Xabier Rodríguez Calvar
URL:
Keywords: InRadar
Depends on: 218171
Blocks:
  Show dependency treegraph
 
Reported: 2020-10-26 03:53 PDT by Xabier Rodríguez Calvar
Modified: 2020-10-27 04:25 PDT (History)
7 users (show)

See Also:


Attachments
Patch (6.32 KB, patch)
2020-10-26 04:01 PDT, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff
Patch (6.27 KB, patch)
2020-10-26 09:21 PDT, Xabier Rodríguez Calvar
no flags Details | Formatted Diff | Diff

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