[PresentationAPI] Improve handling of invalid URLs in PresentationService::start() |
|||
Issue descriptionFrom comments in PresentationServiceDelegateImpl in https://codereview.chromium.org/2547703002: A couple of things: - Ideally the validation in the PresentationRequest constructor in Blink should match up as closely as we can with any re-validation we do on the browser side, so the developer can't construct a PresentationRequest that is guaranteed to fail. - It would be better to define a specific content:: error code for this case so we can reject the Promise to start() with a NotFoundError; that seems like the best thing to do.
,
Dec 7 2016
Here is the code we call to validate whether the URL passed in from Blink for start() is valid. https://cs.chromium.org/chromium/src/chrome/browser/media/router/media_source_helper.h?rcl=0&l=41
,
Dec 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f49e92ef385bdb28898d838bb814f8e278259f49 commit f49e92ef385bdb28898d838bb814f8e278259f49 Author: lethalantidote <lethalantidote@chromium.org> Date: Thu Dec 08 03:30:35 2016 Changes error code to NotFoundError. Addresses the second part of Bug 670848 , changes the error code to a NoPresentationFound ErrorCode. BUG= 670848 Review-Url: https://codereview.chromium.org/2553903002 Cr-Commit-Position: refs/heads/master@{#437167} [modify] https://crrev.com/f49e92ef385bdb28898d838bb814f8e278259f49/chrome/browser/media/router/presentation_service_delegate_impl.cc
,
Dec 8 2016
,
Jan 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a65f8aef002b29053fcd5ef52d118018c596d1c5 commit a65f8aef002b29053fcd5ef52d118018c596d1c5 Author: lethalantidote <lethalantidote@chromium.org> Date: Thu Jan 19 01:21:54 2017 Adds HTTP check to PresentationRequest creation. BUG= 670848 Review-Url: https://codereview.chromium.org/2566503002 Cr-Commit-Position: refs/heads/master@{#444586} [modify] https://crrev.com/a65f8aef002b29053fcd5ef52d118018c596d1c5/third_party/WebKit/LayoutTests/presentation/presentation-api.html [modify] https://crrev.com/a65f8aef002b29053fcd5ef52d118018c596d1c5/third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp [modify] https://crrev.com/a65f8aef002b29053fcd5ef52d118018c596d1c5/third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp
,
Jan 19 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by lethalantidote@chromium.org
, Dec 5 2016Status: Assigned (was: Untriaged)