Bug 186348 - Use the default label for snapshotted plug-ins if no mime-type is available
Summary: Use the default label for snapshotted plug-ins if no mime-type is available
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-06 06:31 PDT by Antoine Quint
Modified: 2018-06-06 11:24 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.25 KB, patch)
2018-06-06 06:34 PDT, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2018-06-06 06:31:52 PDT
We currently crash in titleText() or subtitleText() in HTMLPlugInImageElement.cpp if there is no mime-type specified.
Comment 1 Antoine Quint 2018-06-06 06:32:10 PDT
<rdar://problem/38278978>
Comment 2 Antoine Quint 2018-06-06 06:34:20 PDT
Created attachment 342045 [details]
Patch
Comment 3 Alexey Proskuryakov 2018-06-06 10:16:52 PDT
Comment on attachment 342045 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        In case the mime-type is not available, use the default labels otherwise we'd crash trying to look up the empty string in the HashMap.

Is it feasible to have a test for this?
Comment 4 Jon Lee 2018-06-06 11:09:56 PDT
To answer ap's question, there is a test, but it hits RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(isSafeToUpdateStyleOrLayout(*this)) in Document::updateLayout()

See rdar://40849498.
Comment 5 WebKit Commit Bot 2018-06-06 11:24:44 PDT
Comment on attachment 342045 [details]
Patch

Clearing flags on attachment: 342045

Committed r232551: <https://trac.webkit.org/changeset/232551>
Comment 6 WebKit Commit Bot 2018-06-06 11:24:46 PDT
All reviewed patches have been landed.  Closing bug.