Bug 219972

Summary: SpeechRecognitionRemoteRealtimeMediaSourceManager should not issue sandbox extension for mocked devices
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: New BugsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, hta, jer.noble, philipj, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch for landing none

Sihui Liu
Reported 2020-12-16 19:52:10 PST
...
Attachments
Patch (11.71 KB, patch)
2020-12-16 19:58 PST, Sihui Liu
ews-feeder: commit-queue-
Patch (11.71 KB, patch)
2020-12-16 20:27 PST, Sihui Liu
no flags
Patch (11.71 KB, patch)
2020-12-17 09:12 PST, Sihui Liu
no flags
Patch for landing (13.51 KB, patch)
2020-12-18 11:33 PST, Sihui Liu
no flags
Sihui Liu
Comment 1 2020-12-16 19:58:49 PST
Sihui Liu
Comment 2 2020-12-16 20:27:42 PST
Sihui Liu
Comment 3 2020-12-17 09:12:26 PST
Eric Carlson
Comment 4 2020-12-17 15:06:36 PST
Comment on attachment 416426 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=416426&action=review > Source/WebCore/platform/mediastream/CaptureDevice.h:70 > + bool mocked() const { return m_mocked; } > + void setMocked(bool mocked) { m_mocked = mocked; } Nit: I think `mockDevice` or `isMockDevice` would be better than `mocked` > Source/WebCore/platform/mediastream/CaptureDevice.h:133 > + bool m_mocked { false }; Is there any reason to not add this to the encoder and decoder methods? > Source/WebKit/UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.h:76 > + HashSet<WebCore::RealtimeMediaSourceIdentifier> m_sourcesNeedSandboxExtension; Nit: `m_sourcesNeedingSandboxExtension` might be a better name. > Source/WebKit/UIProcess/SpeechRecognitionServer.h:85 > + SpeechRecognitionCheckIfMockSpeechRecognitionEnabled m_checkIfmockSpeechRecognitionEnabled; s/m_checkIfmock/m_checkIfMock/
Sihui Liu
Comment 5 2020-12-18 09:12:15 PST
(In reply to Eric Carlson from comment #4) > Comment on attachment 416426 [details] > Patch Thanks for the review! > > View in context: > https://bugs.webkit.org/attachment.cgi?id=416426&action=review > > > Source/WebCore/platform/mediastream/CaptureDevice.h:70 > > + bool mocked() const { return m_mocked; } > > + void setMocked(bool mocked) { m_mocked = mocked; } > > Nit: I think `mockDevice` or `isMockDevice` would be better than `mocked` Will update. > > > Source/WebCore/platform/mediastream/CaptureDevice.h:133 > > + bool m_mocked { false }; > > Is there any reason to not add this to the encoder and decoder methods? Nope, will add > > > Source/WebKit/UIProcess/SpeechRecognitionRemoteRealtimeMediaSourceManager.h:76 > > + HashSet<WebCore::RealtimeMediaSourceIdentifier> m_sourcesNeedSandboxExtension; > > Nit: `m_sourcesNeedingSandboxExtension` might be a better name. Will update! > > > Source/WebKit/UIProcess/SpeechRecognitionServer.h:85 > > + SpeechRecognitionCheckIfMockSpeechRecognitionEnabled m_checkIfmockSpeechRecognitionEnabled; > > s/m_checkIfmock/m_checkIfMock/
Sihui Liu
Comment 6 2020-12-18 11:33:51 PST
Created attachment 416534 [details] Patch for landing
EWS
Comment 7 2020-12-18 12:32:28 PST
Committed r270986: <https://trac.webkit.org/changeset/270986> All reviewed patches have been landed. Closing bug and clearing flags on attachment 416534 [details].
Radar WebKit Bug Importer
Comment 8 2020-12-18 12:33:20 PST
Note You need to log in before you can comment on or make changes to this bug.