WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
120880
[MediaStream API] Updating NavigatorUserMediaError to match the spec
https://bugs.webkit.org/show_bug.cgi?id=120880
Summary
[MediaStream API] Updating NavigatorUserMediaError to match the spec
Eric Carlson
Reported
2013-09-06 12:00:20 PDT
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.
Attachments
Proposed patch
(5.78 KB, patch)
2013-09-11 15:01 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Eric Carlson
Comment 1
2013-09-11 15:01:24 PDT
Created
attachment 211357
[details]
Proposed patch
Darin Adler
Comment 2
2013-09-11 15:12:09 PDT
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.
Jer Noble
Comment 3
2013-09-11 15:12:51 PDT
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?
Eric Carlson
Comment 4
2013-09-11 16:46:25 PDT
(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
Eric Carlson
Comment 5
2013-09-11 16:48:08 PDT
(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.
Eric Carlson
Comment 6
2013-09-11 16:51:50 PDT
Committed
r155579
:
https://trac.webkit.org/r155579
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