Consider merging https://chromium.googlesource.com/chromium/blink/+/f07305e49ddebaa166f5dee514bcc881a8efd341 Adding support for CONSTRAINT_NOT_SATISFIED as well as uppdating the error callback to match the spec.
Created attachment 211357 [details] Proposed patch
Comment on attachment 211357 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=211357&action=review > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:163 > + RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create(ASCIILiteral("PERMISSION_DENIED"), description, String()); > + m_errorCallback->handleEvent(error.get()); I sometimes like the way these read without a local variable. The single line would be no longer than the first of these two lines of code.
Comment on attachment 211357 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=211357&action=review Apart from a minor nit (which could, if anything, be fixed in a future patch), LGTM. r=me. > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:162 > + RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create(ASCIILiteral("PERMISSION_DENIED"), description, String()); Nit: Should this and... > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:174 > + RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create(ASCIILiteral("CONSTRAINT_NOT_SATISFIED"), description, constraintName); ...this be static keywords on NavigatorUserMediaError?
(In reply to comment #2) > (From update of attachment 211357 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=211357&action=review > > > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:163 > > + RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create(ASCIILiteral("PERMISSION_DENIED"), description, String()); > > + m_errorCallback->handleEvent(error.get()); > > I sometimes like the way these read without a local variable. The single line would be no longer than the first of these two lines of code. Done
(In reply to comment #3) > (From update of attachment 211357 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=211357&action=review > > Apart from a minor nit (which could, if anything, be fixed in a future patch), LGTM. r=me. > > > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:162 > > + RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create(ASCIILiteral("PERMISSION_DENIED"), description, String()); > > Nit: Should this and... > > > Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:174 > > + RefPtr<NavigatorUserMediaError> error = NavigatorUserMediaError::create(ASCIILiteral("CONSTRAINT_NOT_SATISFIED"), description, constraintName); > > ...this be static keywords on NavigatorUserMediaError? Great idea. It turns out that the spec has changed and both of those error strings are incorrect, so I will fix this when I update.
Committed r155579: https://trac.webkit.org/r155579