Bug 194666 - Make navigator.mediaDevices SecureContext
Summary: Make navigator.mediaDevices SecureContext
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks: 194713
  Show dependency treegraph
 
Reported: 2019-02-14 13:08 PST by youenn fablet
Modified: 2020-12-30 12:30 PST (History)
6 users (show)

See Also:


Attachments
Patch (7.15 KB, patch)
2019-02-14 14:21 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (7.21 KB, patch)
2019-02-14 15:55 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (7.22 KB, patch)
2019-02-15 10:44 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-02-14 13:08:36 PST
Make navigator.mediaDevices SecureContext
Comment 1 youenn fablet 2019-02-14 14:21:50 PST
Created attachment 362061 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2019-02-14 14:22:50 PST
<rdar://problem/48088224>
Comment 3 youenn fablet 2019-02-14 15:55:48 PST
Created attachment 362076 [details]
Patch
Comment 4 Eric Carlson 2019-02-15 09:55:21 PST
Comment on attachment 362076 [details]
Patch

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

> Source/WebCore/Modules/mediastream/NavigatorMediaDevices.idl:35
> +    [SameObject, SecureContext, ContextHasMediaDevices] readonly attribute MediaDevices mediaDevices;

Nit: I think something like "ContextAllowsMediaDevices" might be clearer.
Comment 5 youenn fablet 2019-02-15 09:57:22 PST
(In reply to Eric Carlson from comment #4)
> Comment on attachment 362076 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=362076&action=review
> 
> > Source/WebCore/Modules/mediastream/NavigatorMediaDevices.idl:35
> > +    [SameObject, SecureContext, ContextHasMediaDevices] readonly attribute MediaDevices mediaDevices;
> 
> Nit: I think something like "ContextAllowsMediaDevices" might be clearer.

Yes, makes sense!
Comment 6 youenn fablet 2019-02-15 10:44:32 PST
Created attachment 362128 [details]
Patch for landing
Comment 7 Jon Lee 2019-02-15 11:05:52 PST
Comment on attachment 362128 [details]
Patch for landing

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

> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3695
> +                . "|| jsCast<JSDOMGlobalObject*>(" . $globalObjectPtr . ")->scriptExecutionContext()->allowsMediaDevices())");

Do we not add binding generator tests for extended attributes such as these?
Comment 8 youenn fablet 2019-02-15 11:08:14 PST
(In reply to Jon Lee from comment #7)
> Comment on attachment 362128 [details]
> Patch for landing
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=362128&action=review
> 
> > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:3695
> > +                . "|| jsCast<JSDOMGlobalObject*>(" . $globalObjectPtr . ")->scriptExecutionContext()->allowsMediaDevices())");
> 
> Do we not add binding generator tests for extended attributes such as these?

Filed https://bugs.webkit.org/show_bug.cgi?id=194713
Comment 9 WebKit Commit Bot 2019-02-15 11:22:40 PST
Comment on attachment 362128 [details]
Patch for landing

Clearing flags on attachment: 362128

Committed r241602: <https://trac.webkit.org/changeset/241602>
Comment 10 WebKit Commit Bot 2019-02-15 11:22:42 PST
All reviewed patches have been landed.  Closing bug.