Exception message for use of WebVR in a cross-origin iframe is incorrect |
||||||||||||
Issue descriptionStarting in M62, Feature Policy must be used to enable WebVR in cross-origin iframes. Otherwise, navigator.getVRDisplays() throws. As noted in issue 764407 , the rejection message is "The object is no longer associated with a document." This message comes from NavigatorVR.cpp:RejectNavigatorDetached(), which was reused when adding the Feature Policy requirement [1]. We should review all uses of RejectNavigatorDetached() and provide different strings where appropriate. [1] https://chromium-review.googlesource.com/c/chromium/src/+/636663/10/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
,
Sep 13 2017
bshe@, can you please take a look? cc'ing bajones@ in case you have input on the error message.
,
Sep 13 2017
We should look at the messages other Feature Policy-using features use.
,
Sep 13 2017
We could do something similar like what USB is doing here: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/webusb/USB.cpp?rcl=e7d7e16bb5af641db6f4e77f1877605a005cd0ee&l=85 I will upload a patch and we can discuss strings/messages in the CL.
,
Sep 13 2017
uploaded https://chromium-review.googlesource.com/c/chromium/src/+/665418 for review. Feel free to add yourself as reviewer.
,
Sep 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2ada1d99198538352ade379b4d9d518b3e253211 commit 2ada1d99198538352ade379b4d9d518b3e253211 Author: Biao She <bshe@chromium.org> Date: Wed Sep 20 00:13:45 2017 More accurate WebVR API exception message Bug: 764447 Change-Id: I914d1703cc5f3564503810fcbd0b0058e392fa7b Reviewed-on: https://chromium-review.googlesource.com/665418 Commit-Queue: Biao She <bshe@chromium.org> Reviewed-by: David Dorwin <ddorwin@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Cr-Commit-Position: refs/heads/master@{#503001} [modify] https://crrev.com/2ada1d99198538352ade379b4d9d518b3e253211/third_party/WebKit/LayoutTests/vr/getVRDisplays_detached.html [modify] https://crrev.com/2ada1d99198538352ade379b4d9d518b3e253211/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
,
Sep 20 2017
,
Sep 20 2017
Sorry. Didn't notice the it is marked as M62 before I mark it as fixed. Do we want to merge it back to M62? @bajones @ddorwin @vollick I don't feel this is super important but I might not have enough context.
,
Sep 20 2017
The concern is that we changed API behavior in M62 but provide an unhelpful message to developers that might encounter it. The change is part of a new Origin Trial and will be communicated to existing sites, but there is no guarantee developers will connect the two.
,
Sep 21 2017
OK. Try to merge it back to M62 then.
,
Sep 21 2017
This bug requires manual review: M62 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 27 2017
Can this merge break something in M62?
,
Sep 29 2017
Is this merge safe for M62? Please provide the rationale why this has to be in M62.
,
Sep 29 2017
Sorry for the slow reply. The rationale is that we'd made a behavior change in 62 but our error message that will be hit by developers that are affected by this behavior change is incorrect. We'll try to do developer outreach, but the worry is that some developers will be confused. As for risk, it's a small change, and because the change is limited to NavigatorVR, any potential breakage should only affect VR.
,
Sep 29 2017
Thanks vollick@! Merge approved to branch 3202.
,
Sep 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a8247326522c7333a5d9d887d4d8632f7316a0f2 commit a8247326522c7333a5d9d887d4d8632f7316a0f2 Author: Biao She <bshe@chromium.org> Date: Fri Sep 29 18:59:00 2017 More accurate WebVR API exception message TBR=bshe@chromium.org (cherry picked from commit 2ada1d99198538352ade379b4d9d518b3e253211) Bug: 764447 Change-Id: I914d1703cc5f3564503810fcbd0b0058e392fa7b Reviewed-on: https://chromium-review.googlesource.com/665418 Commit-Queue: Biao She <bshe@chromium.org> Reviewed-by: David Dorwin <ddorwin@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#503001} Reviewed-on: https://chromium-review.googlesource.com/693011 Reviewed-by: Biao She <bshe@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#516} Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} [modify] https://crrev.com/a8247326522c7333a5d9d887d4d8632f7316a0f2/third_party/WebKit/LayoutTests/vr/getVRDisplays_detached.html [modify] https://crrev.com/a8247326522c7333a5d9d887d4d8632f7316a0f2/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
,
Sep 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8b8180a6d363f2d07b3141d63f116038fd14b6a0 commit 8b8180a6d363f2d07b3141d63f116038fd14b6a0 Author: Biao She <bshe@chromium.org> Date: Sat Sep 30 00:20:51 2017 Revert "More accurate WebVR API exception message" This reverts commit a8247326522c7333a5d9d887d4d8632f7316a0f2. Reason for revert: Bad merge. Unused variable. Original change's description: > More accurate WebVR API exception message > > TBR=bshe@chromium.org > > (cherry picked from commit 2ada1d99198538352ade379b4d9d518b3e253211) > > Bug: 764447 > Change-Id: I914d1703cc5f3564503810fcbd0b0058e392fa7b > Reviewed-on: https://chromium-review.googlesource.com/665418 > Commit-Queue: Biao She <bshe@chromium.org> > Reviewed-by: David Dorwin <ddorwin@chromium.org> > Reviewed-by: Brandon Jones <bajones@chromium.org> > Cr-Original-Commit-Position: refs/heads/master@{#503001} > Reviewed-on: https://chromium-review.googlesource.com/693011 > Reviewed-by: Biao She <bshe@chromium.org> > Cr-Commit-Position: refs/branch-heads/3202@{#516} > Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} TBR=ddorwin@chromium.org,bshe@chromium.org,bajones@chromium.org Change-Id: I6f516229ffa8d0a51b90b86713e90e3934d97b10 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 764447 Reviewed-on: https://chromium-review.googlesource.com/693012 Reviewed-by: Biao She <bshe@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#524} Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} [modify] https://crrev.com/8b8180a6d363f2d07b3141d63f116038fd14b6a0/third_party/WebKit/LayoutTests/vr/getVRDisplays_detached.html [modify] https://crrev.com/8b8180a6d363f2d07b3141d63f116038fd14b6a0/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
,
Sep 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e39c763bf31c86b2dbeacc0b62f20aab439bf26b commit e39c763bf31c86b2dbeacc0b62f20aab439bf26b Author: Biao She <bshe@chromium.org> Date: Sat Sep 30 01:07:03 2017 Reland "More accurate WebVR API exception message" This reverts commit 8b8180a6d363f2d07b3141d63f116038fd14b6a0. And applied a fix on top it. TBR=bajones@chromium.org, bshe@chromium.org, ddrowin@chromium.org Bug: 764447 Change-Id: I8ebade1b184079bf60e85e6438251d8c7a0b1e83 Reviewed-on: https://chromium-review.googlesource.com/693517 Reviewed-by: Biao She <bshe@chromium.org> Cr-Commit-Position: refs/branch-heads/3202@{#526} Cr-Branched-From: fa6a5d87adff761bc16afc5498c3f5944c1daa68-refs/heads/master@{#499098} [modify] https://crrev.com/e39c763bf31c86b2dbeacc0b62f20aab439bf26b/third_party/WebKit/LayoutTests/vr/getVRDisplays_detached.html [modify] https://crrev.com/e39c763bf31c86b2dbeacc0b62f20aab439bf26b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
,
Oct 2 2017
,
Oct 10 2017
I think the new message is still not very helpful: eGKmmq:1 Uncaught (in promise) DOMException: Access to the method is blocked on a user gesture in cross-origin embedded frames. Promise rejected (async) (anonymous) @ pen.js:98 This is from loading https://codepen.io/Mamboleoo/pen/eGKmmq?editors=0010 which was linked on the WebVR Slack when feature policy is disabled. (If feature policy is enabled, I get "Access to the feature \"vr\" is disallowed by feature policy." which is clearer.) Could you rephrase that to replace "the method" with "Using VR APIs" or similar to give the message some context? It's not really clear from the message that this is referring to getVRDisplays.
,
Oct 11 2017
,
Oct 16 2017
,
Oct 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c58b83f35b22710ee19da555457156350bb8ac0d commit c58b83f35b22710ee19da555457156350bb8ac0d Author: Anna Maria <offenwanger@chromium.org> Date: Tue Oct 17 19:44:26 2017 Clarify error message for cross-origin getVRDisplays use Previous error message was confusing as it only mentioned 'the method' without giving any context for what 'the method' was. Bug: 764447 Change-Id: Ia59c07bde9b9965674b3fee746b5152e33818d79 Reviewed-on: https://chromium-review.googlesource.com/722030 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: David Dorwin <ddorwin@chromium.org> Commit-Queue: Anna Offenwanger <offenwanger@chromium.org> Cr-Commit-Position: refs/heads/master@{#509490} [modify] https://crrev.com/c58b83f35b22710ee19da555457156350bb8ac0d/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
,
Oct 17 2017
Thanks, offenwanger. I'm moving the state of the issue back to the original bug fix. To summarize: * The exception message is correct in M62 (merged) and M63. * The cross-origin message when Feature Policy is disabled was clarified in M64.
,
Jul 4
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by ddorwin@chromium.org
, Sep 12 2017