WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 165251
Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
https://bugs.webkit.org/show_bug.cgi?id=165251
Summary
Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
Alex. Gouaillard
Reported
2016-12-01 04:42:06 PST
It has been brought to my attention that apparently Safari Tech Preview Release 18 (Safari 10.1, WebKit 12603.1.12) is exposing RTCPeerConnection and navigator.mediaDevices.getUserMedia. Since a check for navigator.mediaDevices.getUserMedia && window.RTCPeerConnection and redirecting browsers that support neither is pretty common this is rather unfortunate. The getUserMedia implementation does not seems to work on one of the most basic GUM samples at
https://webrtc.github.io/samples/src/content/getusermedia/gum/
I am actually not seeing GUM resolve or reject the promise at all. And RTCPeerConnection did not work either in
https://webrtc.github.io/samples/src/content/peerconnection/pc1/
What is the plan here? Philipp
Attachments
Patch
(7.26 KB, patch)
2016-12-02 02:16 PST
,
Alex. Gouaillard
no flags
Details
Formatted Diff
Diff
Patch
(8.29 KB, patch)
2016-12-02 10:48 PST
,
Alex. Gouaillard
no flags
Details
Formatted Diff
Diff
Patch
(8.45 KB, patch)
2016-12-02 11:09 PST
,
Alex. Gouaillard
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews114 for mac-yosemite
(1.58 MB, application/zip)
2016-12-02 12:25 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews103 for mac-yosemite
(949.25 KB, application/zip)
2016-12-02 12:26 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(
deleted
)
2016-12-02 12:44 PST
,
Build Bot
no flags
Details
Archive of layout-test-results from ews106 for mac-yosemite-wk2
(1.67 MB, application/zip)
2016-12-02 12:46 PST
,
Build Bot
no flags
Details
Updated patch.
(25.07 KB, patch)
2016-12-09 15:19 PST
,
Eric Carlson
dino
: review+
Details
Formatted Diff
Diff
Patch for landing.
(25.42 KB, patch)
2016-12-09 18:14 PST
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Updated to fix broken API test.
(4.85 KB, patch)
2016-12-13 07:35 PST
,
Eric Carlson
youennf
: review+
Details
Formatted Diff
Diff
Show Obsolete
(7)
View All
Add attachment
proposed patch, testcase, etc.
Alex. Gouaillard
Comment 1
2016-12-01 04:43:52 PST
I think we should add runtime flags for getUserMedia and RTCPeerConnection and set them to off in Safari Tech Preview until stable enough. Then we might just need to make the related IDLs exposed according that flag through EnabledAtRuntime keyword.
Philippe Normand
Comment 2
2016-12-01 05:14:25 PST
There's a Setting already for gUM, AFAIK.
Philippe Normand
Comment 3
2016-12-01 05:16:21 PST
(In reply to
comment #2
)
> There's a Setting already for gUM, AFAIK.
For the GTK port only though :)
youenn fablet
Comment 4
2016-12-01 05:38:00 PST
You might want to consider the following IDLs: Source/WebCore/Modules/mediastream/MediaStreamEvent.idl Source/WebCore/Modules/mediastream/NavigatorMediaDevices.idl Source/WebCore/Modules/mediastream/NavigatorUserMedia.idl Source/WebCore/Modules/mediastream/RTCDTMFToneChangeEvent.idl Source/WebCore/Modules/mediastream/RTCIceCandidate.idl Source/WebCore/Modules/mediastream/RTCPeerConnection.idl Source/WebCore/Modules/mediastream/RTCRtpReceiver.idl Source/WebCore/Modules/mediastream/RTCRtpSender.idl Source/WebCore/Modules/mediastream/RTCRtpTransceiver.idl Source/WebCore/Modules/mediastream/RTCSessionDescription.idl Source/WebCore/Modules/mediastream/RTCTrackEvent.idl You might also need to update CommonIdentifiers.h
Alex. Gouaillard
Comment 5
2016-12-01 05:58:50 PST
and not
https://trac.webkit.org/browser/trunk/Source/WebCore/Modules/mediastream/NavigatorMediaDevices.idl
?
Alex. Gouaillard
Comment 6
2016-12-01 05:59:52 PST
my bad, was in the list .... waiting for webkit checkout ... i will never complain about chromium checkout time again ....
Alex. Gouaillard
Comment 7
2016-12-02 02:16:50 PST
Created
attachment 295935
[details]
Patch
youenn fablet
Comment 8
2016-12-02 04:22:15 PST
Updating CommonIdentifiers.h should fix the build issue
youenn fablet
Comment 9
2016-12-02 04:24:31 PST
Comment on
attachment 295935
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=295935&action=review
> Source/WebCore/Modules/mediastream/RTCIceCandidate.idl:37 > ImplementationLacksVTable,
You probable need to do something like EnabledAtRuntime=PeerConnection (or MediaStream) depending on the IDL.
Alex. Gouaillard
Comment 10
2016-12-02 04:26:31 PST
(In reply to
comment #8
)
> Updating CommonIdentifiers.h should fix the build issue
thanks for the comment. I took a look at the file (eventually the one in JavaScriptCore), however, I'm not sure what I am supposed to do there. Please educate me.
Alex. Gouaillard
Comment 11
2016-12-02 04:31:05 PST
Should I add some entries in generic/RuntimeEnabledFeatures.h instead?
youenn fablet
Comment 12
2016-12-02 04:35:28 PST
If you look at the generated code, it is searching for property names that are not defined (like XxEvent). You need to add them directly by hand in CommonIdentifiers.h. please have a look at other IDLs having EnabledAtRuntime. You will see the name of these interfaces in CommonIdentifiers.h We probably should have a better way to handle that in the future.
Alex. Gouaillard
Comment 13
2016-12-02 10:39:23 PST
ok, looked at IDBTransaction and I see the corresponding entry in the CommonIdentifiers.h. I do not understand what the =InterfaceName is doing there though, and if I should add it for the RTC objects. I will take care of the CommonIdentifiers additions first.
Chris Dumez
Comment 14
2016-12-02 10:44:07 PST
Comment on
attachment 295935
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=295935&action=review
> Source/WebCore/Modules/mediastream/MediaStreamEvent.idl:28 > + EnabledAtRuntime,
It needs to be EnabledAtRuntime=Something And Something needs to be defined in RuntimeEnabledFeatures.h
Chris Dumez
Comment 15
2016-12-02 10:45:11 PST
Comment on
attachment 295935
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=295935&action=review
>> Source/WebCore/Modules/mediastream/MediaStreamEvent.idl:28 >> + EnabledAtRuntime, > > It needs to be EnabledAtRuntime=Something > > And Something needs to be defined in RuntimeEnabledFeatures.h
There is already one for MediaStream: EnabledAtRuntime=MediaStream
Alex. Gouaillard
Comment 16
2016-12-02 10:48:58 PST
Created
attachment 295964
[details]
Patch
Alex. Gouaillard
Comment 17
2016-12-02 10:58:24 PST
(In reply to
comment #15
)
> Comment on
attachment 295935
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=295935&action=review
> > >> Source/WebCore/Modules/mediastream/MediaStreamEvent.idl:28 > >> + EnabledAtRuntime, > > > > It needs to be EnabledAtRuntime=Something > > > > And Something needs to be defined in RuntimeEnabledFeatures.h > > There is already one for MediaStream: > EnabledAtRuntime=MediaStream
thanks. understood. changes in the way.
Alex. Gouaillard
Comment 18
2016-12-02 11:09:45 PST
Created
attachment 295965
[details]
Patch
Build Bot
Comment 19
2016-12-02 12:24:57 PST
Comment on
attachment 295965
[details]
Patch
Attachment 295965
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/2608563
New failing tests: imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl.html imported/w3c/web-platform-tests/webrtc/datachannel-emptystring.html imported/w3c/web-platform-tests/webrtc/no-media-call.html imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor.html imported/w3c/web-platform-tests/webrtc/promises-call.html
Build Bot
Comment 20
2016-12-02 12:25:01 PST
Created
attachment 295977
[details]
Archive of layout-test-results from ews114 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews114 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 21
2016-12-02 12:26:22 PST
Comment on
attachment 295965
[details]
Patch
Attachment 295965
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/2608607
New failing tests: imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl.html imported/w3c/web-platform-tests/webrtc/datachannel-emptystring.html imported/w3c/web-platform-tests/webrtc/no-media-call.html imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor.html imported/w3c/web-platform-tests/webrtc/promises-call.html
Build Bot
Comment 22
2016-12-02 12:26:27 PST
Created
attachment 295978
[details]
Archive of layout-test-results from ews103 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-yosemite Platform: Mac OS X 10.10.5
Build Bot
Comment 23
2016-12-02 12:43:54 PST
Comment on
attachment 295965
[details]
Patch
Attachment 295965
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/2608610
New failing tests: imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl.html imported/w3c/web-platform-tests/webrtc/datachannel-emptystring.html imported/w3c/web-platform-tests/webrtc/no-media-call.html imported/w3c/web-platform-tests/webrtc/promises-call.html http/tests/ssl/media-stream/get-user-media-nested.html http/tests/ssl/media-stream/get-user-media-secure-connection.html http/tests/ssl/media-stream/get-user-media-different-host.html imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor.html
Build Bot
Comment 24
2016-12-02 12:44:00 PST
Created
attachment 295983
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 25
2016-12-02 12:45:56 PST
Comment on
attachment 295965
[details]
Patch
Attachment 295965
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/2608650
Number of test failures exceeded the failure limit.
Build Bot
Comment 26
2016-12-02 12:46:00 PST
Created
attachment 295984
[details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-yosemite-wk2 Platform: Mac OS X 10.10.5
Philippe Normand
Comment 27
2016-12-04 23:55:53 PST
If this runtime flag is off by default then the test harness needs to turn it on, to avoid the test failures reported by the EWS.
Philippe Normand
Comment 28
2016-12-05 07:42:00 PST
See how it was done for SubtleCrypto, for instance, in
bug #164982
Alex. Gouaillard
Comment 29
2016-12-05 07:45:19 PST
Thanks phil. I will address in 12 hours.
Eric Carlson
Comment 30
2016-12-09 15:19:54 PST
Created
attachment 296718
[details]
Updated patch.
Alex. Gouaillard
Comment 31
2016-12-09 15:29:03 PST
Comment on
attachment 296718
[details]
Updated patch. thanks eric for pushing this through the finish line. I'm not sure I would have been able to find all the remaining needed modifications this week-end.
Dean Jackson
Comment 32
2016-12-09 15:49:06 PST
Comment on
attachment 296718
[details]
Updated patch. To make it easier for testing you might want to add support for the comment lines in DRT and WKTR.
Eric Carlson
Comment 33
2016-12-09 18:14:26 PST
Created
attachment 296759
[details]
Patch for landing.
Eric Carlson
Comment 34
2016-12-09 18:40:14 PST
(In reply to
comment #31
)
> Comment on
attachment 296718
[details]
> Updated patch. > > thanks eric for pushing this through the finish line. I'm not sure I would > have been able to find all the remaining needed modifications this week-end.
Thank you for getting things started!
WebKit Commit Bot
Comment 35
2016-12-09 18:47:02 PST
Comment on
attachment 296759
[details]
Patch for landing. Clearing flags on attachment: 296759 Committed
r209643
: <
http://trac.webkit.org/changeset/209643
>
Alexey Proskuryakov
Comment 36
2016-12-12 09:13:02 PST
This change appears to have made WebKit2.EnumerateDevices API test always time out.
Eric Carlson
Comment 37
2016-12-13 07:35:36 PST
Created
attachment 297013
[details]
Updated to fix broken API test.
Eric Carlson
Comment 38
2016-12-13 09:02:01 PST
Committed rr209757:
https://trac.webkit.org/r209757
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug