[Webkit-unassigned] [Bug 158940] WebRTC: Add support for RTCPeerConnection legacy MediaStream-based API
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 21 00:37:51 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=158940
--- Comment #4 from Adam Bergkvist <adam.bergkvist at ericsson.com> ---
(In reply to comment #3)
> Comment on attachment 281658 [details]
> Proposed patch
Thanks for reviewing Youenn.
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=281658&action=review
>
> > Source/WebCore/Modules/mediastream/RTCPeerConnection.js:57
> > + return this. at localStreams.slice();
>
> Array.slice may be corrupted by user scripts.
> The same applies to find findIndex, push, forEach, splice methods.
> This should be robustified.
Looking at the array prototype implementation, we seem to have a private name for push, but the rest needs fixing. New bug: [1].
[1] http://webkit.org/b/158978
> > Source/WebCore/Modules/mediastream/RTCPeerConnection.js:94
> > + stream.getTracks().forEach(track => this. at addTrack(track, stream));
>
> Potentially, we know that this, track and stream are of the right type.
> So we could replace if statements by assert statements in the binding
> generated code.
> That said, this might be too early to do so.
MediaStream.getTracks is actually part of the public API so we need a safe way to call it. New bug [2].
[2] webkit.org/b/158979
I agree that assertions would be sufficient for [PrivateOnly] bindings. The bug [3] suggests that one might want to use the type checking of a [PrivateOnly] function as part of a public API call, but that might be unlikely now when we have [PrivateAlso]. I wouldn't mind closing [3] as a WONTFIX.
[3] webkit.org/b/158778
>
> > Source/WebCore/bindings/js/JSDOMGlobalObject.cpp:87
> > + JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().MediaStreamPrivateName(), JSMediaStream::getConstructor(vm, this), DontDelete | ReadOnly),
>
> It might be good to add a keyword similar to PrivateAlso for exposing DOM
> constructors safely to JS builtins.
> Ideally, we should not need to create the constructor but just pass a getter
> function that would create it if needed
That would be useful indeed.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160621/9c281e19/attachment.html>
More information about the webkit-unassigned
mailing list